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á referencia je v angličtine (rovnako ako strojovo čitateľný dokument OpenAPI). Celú skupinu pre AI agenta načítate z /api/openapi.json?tag=MCP.
Operácie
| Metóda | 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.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
MCP-Protocol-Version | header | one of: 2025-11-25, 2025-06-18, 2025-03-26 | nie |
Telo požiadavky (application/json)
JsonRpcRequest or array of JsonRpcRequest
Odpovede
- 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émy
JsonRpcRequest
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
jsonrpc | 2.0 | áno | |
id | string or integer | nie | |
method | string | áno | |
params | object | nie |
JsonRpcResponse
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
jsonrpc | 2.0 | áno | |
id | string or integer or null | nie | |
result | any | nie | |
error | object | nie |