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"
}'
Body Parameters
The MCP Rank server ID (e.g., ai.exa/exa)
JSON-RPC method name (e.g., tools/list, tools/call, resources/list)
Method parameters (optional, depends on method)
JSON-RPC request ID (default: 1)
Response
Standard JSON-RPC 2.0 response:
Request ID from the request
Method result (on success)
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
| Method | Description |
|---|
tools/list | List available tools |
tools/call | Execute a tool |
resources/list | List available resources |
resources/read | Read a resource |
prompts/list | List available prompts |
prompts/get | Get a prompt |
Error Codes
| Code | Meaning |
|---|
| -32700 | Parse error - invalid JSON |
| -32600 | Invalid request |
| -32601 | Method not found |
| -32602 | Invalid params |
| -32603 | Internal error |
| -32000 | Server error (timeout, connection failed, etc.) |
Error Responses
| Status Code | Description |
|---|
| 401 | Missing or invalid API key |
| 404 | Server not found |
| 410 | Server is no longer active |
| 429 | Rate limit exceeded |