Přeskočit na obsah
API dokumentace

MCP server for AI assistants

Model Context Protocol over Streamable HTTP (JSON-RPC 2.0). Tools map to API v1 routes; sending, deleting and other irreversible actions need a preview and a confirm token.

Technická reference je anglicky (stejně jako strojově čitelný dokument OpenAPI). Celou skupinu pro AI agenta načtete z /api/openapi.json?tag=MCP.

Operace

MCP JSON-RPC endpoint (Streamable HTTP, stateless)

POST /mcp

Model Context Protocol 2025-11-25 (also 2025-06-18 and 2025-03-26). Methods initialize, ping, tools/list, tools/call, resources/list, resources/read, resources/templates/list, prompts/list, logging/setLevel. A batch (array) of at most 20 messages. Without a valid token 401 with WWW-Authenticate: Bearer resource_metadata=".../.well-known/oauth-protected-resource/mcp". 300 messages a minute per token. Tools wrap API v1 routes (x-mcp-tool on each operation); routes marked x-mcp-confirm answer a preview with a confirm token first.

Parametry

NázevKdeTypPovinnéPopis
MCP-Protocol-Versionheaderone of: 2025-11-25, 2025-06-18, 2025-03-26ne

Tělo požadavku (application/json)

JsonRpcRequest or array of JsonRpcRequest

Odpovědi

  • 200 JSON-RPC result or error: application/json JsonRpcResponse
  • 202 Accepted (a notification or a client response)

Chyby

StavKódHodnoty message
400Bad JSON-RPC envelope or unsupported protocol version
401No or invalid token; WWW-Authenticate names the resource metadata
403Origin not allowed
429Over 300 messages a minute

Schémata

JsonRpcRequest

PoleTypPovinnéPopis
jsonrpc2.0ano
idstring or integerne
methodstringano
paramsobjectne

JsonRpcResponse

PoleTypPovinnéPopis
jsonrpc2.0ano
idstring or integer or nullne
resultanyne
errorobjectne