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
| Metoda | Cesta | Popis |
|---|---|---|
| POST | /mcp | MCP JSON-RPC endpoint (Streamable HTTP, stateless) |
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ázev | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
MCP-Protocol-Version | header | one of: 2025-11-25, 2025-06-18, 2025-03-26 | ne |
Tělo požadavku (application/json)
JsonRpcRequest or array of JsonRpcRequest
Odpovědi
- 200 JSON-RPC result or error:
application/jsonJsonRpcResponse - 202 Accepted (a notification or a client response)
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | Bad JSON-RPC envelope or unsupported protocol version | |
| 401 | No or invalid token; WWW-Authenticate names the resource metadata | |
| 403 | Origin not allowed | |
| 429 | Over 300 messages a minute |
Schémata
JsonRpcRequest
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
jsonrpc | 2.0 | ano | |
id | string or integer | ne | |
method | string | ano | |
params | object | ne |
JsonRpcResponse
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
jsonrpc | 2.0 | ano | |
id | string or integer or null | ne | |
result | any | ne | |
error | object | ne |