Model Context Protocol endpoint
POST
/api/mcpJSON-RPC 2.0 over streamable HTTP: one message or a batch of up to 20. The tools offered follow the key's scopes.
En esta página
Cuerpo
Opción 1: object
| Campo | Tipo | Descripción |
|---|---|---|
jsonrpcobligatorio | string |
|
id | string | number | |
methodobligatorio | string | |
params | object |
Opción 2: object[]
Esquema JSON
{
"anyOf": [
{
"type": "object",
"properties": {
"jsonrpc": {
"const": "2.0"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"method": {
"type": "string"
},
"params": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"jsonrpc",
"method"
]
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
}
]
}Petición de ejemplo
curl -X POST "https://polaris.example.com/api/mcp" \
-H "Authorization: Bearer $POLARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "string",
"method": "string",
"params": {}
}'Respuestas
| Estado | Qué es |
|---|---|
200 | OK |
También puede dar los errores comunes 400, 401, 403, 404, 429. Ver errores comunes