Skip to content

MCP JSON-RPC call

POST
/mcp
curl --request POST \
--url https://api.nexacloser.com/mcp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }'

The Model Context Protocol endpoint (streamable HTTP, protocol version 2025-06-18). Most people never call it by hand: add https://api.nexacloser.com/mcp to an MCP client and it handles this. Methods: initialize, tools/list, tools/call, ping.

Every tool, with its arguments, is listed at https://docs.nexacloser.com/mcp/tools/. A tool that fails still answers 200 with result.isError: true and the reason as text.

Media typeapplication/json
object
jsonrpc
required
string
Allowed value: 2.0
id
integer | string
method
required
string
Allowed values: initialize tools/list tools/call ping
params
object
key
additional properties
any

Examples

List tools

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}

JSON-RPC response.

Media typeapplication/json
object
jsonrpc
string
Allowed value: 2.0
id
integer | string | null
result
object
key
additional properties
any
error
object
code
integer
message
string

Example

{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "{ \"found\": false }"
}
],
"isError": false
}
}

No valid credential.

Media typeapplication/json

Example

{
"jsonrpc": "2.0",
"id": null,
"error": {
"code": -32001,
"message": "Unauthorized"
}
}

Too many requests. Wait Retry-After seconds.

Media typeapplication/json
object
error
string
Allowed value: rate_limited
message
string
retry_after

Seconds to wait.

integer

Example

{
"error": "rate_limited",
"message": "Too many requests",
"retry_after": 7
}
Retry-After
integer

Seconds to wait before retrying.