Skip to main content
POST
/
v1
/
mcp
/
call
curl -X POST https://api.mcprank.com/v1/mcp/call \
  -H "X-API-Key: sk_mcp_rank_..." \
  -H "Content-Type: application/json" \
  -d '{
    "server_id": "ai.exa/exa",
    "method": "tools/list"
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Here are the latest AI news..."
      }
    ]
  }
}

Call Server

Make a generic JSON-RPC call to an MCP server. This endpoint handles:
  • Server URL lookup
  • Transport abstraction (SSE responses are buffered to JSON)
  • Error normalization

Request

curl -X POST https://api.mcprank.com/v1/mcp/call \
  -H "X-API-Key: sk_mcp_rank_..." \
  -H "Content-Type: application/json" \
  -d '{
    "server_id": "ai.exa/exa",
    "method": "tools/list"
  }'

Headers

X-API-Key
string
required
Your MCP Rank API key

Body Parameters

server_id
string
required
The MCP Rank server ID (e.g., ai.exa/exa)
method
string
required
JSON-RPC method name (e.g., tools/list, tools/call, resources/list)
params
object
Method parameters (optional, depends on method)
id
string | number
JSON-RPC request ID (default: 1)

Response

Standard JSON-RPC 2.0 response:
jsonrpc
string
Always “2.0”
id
string | number
Request ID from the request
result
any
Method result (on success)
error
object
Error object (on failure) with code and message
curl -X POST https://api.mcprank.com/v1/mcp/call \
  -H "X-API-Key: sk_mcp_rank_..." \
  -H "Content-Type: application/json" \
  -d '{
    "server_id": "ai.exa/exa",
    "method": "tools/list"
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Here are the latest AI news..."
      }
    ]
  }
}

Common Methods

MethodDescription
tools/listList available tools
tools/callExecute a tool
resources/listList available resources
resources/readRead a resource
prompts/listList available prompts
prompts/getGet a prompt

Error Codes

CodeMeaning
-32700Parse error - invalid JSON
-32600Invalid request
-32601Method not found
-32602Invalid params
-32603Internal error
-32000Server error (timeout, connection failed, etc.)

Error Responses

Status CodeDescription
401Missing or invalid API key
404Server not found
410Server is no longer active
429Rate limit exceeded