Skip to main content
The MCP server is a JSON-RPC 2.0 dispatcher mounted at POST /api/mcp. All methods are invoked through the same request envelope, and all failures stay inside the JSON-RPC error envelope at HTTP 200 — they never use the REST error shape.

Request envelope

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ping",
  "params": {}
}
FieldTypeRequiredDescription
jsonrpc"2.0"YesProtocol version; must be exactly "2.0".
idstring | number | nullNoEchoed back on the response. Omit or null for a notification.
methodstringYesThe method (tool) to invoke.
paramsobjectNoMethod parameters.

Success response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": { "pong": true }
}

Error response

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": { "code": -32601, "message": "Method not found" }
}

Error codes

CodeMeaningWhen
-32700Parse errorThe body wasn’t valid JSON.
-32600Invalid RequestThe body wasn’t a valid JSON-RPC request.
-32601Method not foundThe method isn’t a registered tool.
-32603Internal errorThe tool threw while handling the request.
Authentication failures are the one exception: a missing or invalid API key is rejected by middleware before the JSON-RPC dispatcher runs, so it returns a REST 401 rather than a JSON-RPC error.

Example

curl -X POST https://api-atlaswork.vercel.app/api/mcp \
  -H "Authorization: Bearer $ATLAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "jsonrpc": "2.0", "id": 1, "method": "ping", "params": {} }'
{ "jsonrpc": "2.0", "id": 1, "result": { "pong": true } }