Developer & agent API

Theralya Games publishes a small, honest machine-readable surface: an MCP (Model Context Protocol) endpoint, .well-known discovery catalogues, and the contact / newsletter form endpoint. There is intentionally no CRUD REST API — the product is a therapeutic board game.

MCP (Model Context Protocol)

GET /api/mcp

MCP discovery / initialize probe. Returns the initialize result payload.

curl -s https://theralya.vercel.app/api/mcp

POST /api/mcp

MCP Streamable HTTP JSON-RPC 2.0 (initialize, ping, tools/list, tools/call, resources/list, prompts/list).

curl -s https://theralya.vercel.app/api/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"0.0.1"}}}'

Discovery (.well-known)

GET /.well-known/mcp

MCP server card (short form).

curl -s https://theralya.vercel.app/.well-known/mcp

GET /.well-known/mcp/server-card.json

MCP server card.

curl -s https://theralya.vercel.app/.well-known/mcp/server-card.json

GET /.well-known/api-catalog

RFC 9727 style API catalog (linkset).

curl -s https://theralya.vercel.app/.well-known/api-catalog

GET /.well-known/ai-catalog.json

AI / agent discovery catalog.

curl -s https://theralya.vercel.app/.well-known/ai-catalog.json

Forms

POST /api/forms

Submit a contact, newsletter or questionnaire form. Errors always return JSON.

curl -s https://theralya.vercel.app/api/forms \
  -H 'Content-Type: application/json' \
  -d '{"kind":"newsletter","email":"you@example.com","locale":"en"}'

Errors

Every API error is returned as JSON (never HTML), using a stable shape:

{
  "error": {
    "code": "invalid_json",
    "message": "Request body must be valid JSON.",
    "detail": "optional extra context"
  }
}

Unsupported HTTP methods return 405 with the same JSON shape and an Allow header. MCP JSON-RPC protocol errors are returned inside the JSON-RPC error object.

Canonical spec URL: https://theralya.vercel.app/openapi.json. Agent summary: https://theralya.vercel.app/llms.txt.