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"
}'
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/call",
"params": {
"name": "web_search",
"arguments": {"query": "latest AI news"}
}
}'
import httpx
async with httpx.AsyncClient() as client:
response = await client.post(
"https://api.mcprank.com/v1/mcp/call",
headers={"X-API-Key": "sk_mcp_rank_..."},
json={
"server_id": "ai.exa/exa",
"method": "tools/call",
"params": {
"name": "web_search",
"arguments": {"query": "latest AI news"}
}
}
)
result = response.json()
print(result["result"])
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Here are the latest AI news..."
}
]
}
}
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "Request to MCP server timed out"
}
}
MCP Server Proxy
Call Server
Make a JSON-RPC call to an MCP server
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"
}'
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/call",
"params": {
"name": "web_search",
"arguments": {"query": "latest AI news"}
}
}'
import httpx
async with httpx.AsyncClient() as client:
response = await client.post(
"https://api.mcprank.com/v1/mcp/call",
headers={"X-API-Key": "sk_mcp_rank_..."},
json={
"server_id": "ai.exa/exa",
"method": "tools/call",
"params": {
"name": "web_search",
"arguments": {"query": "latest AI news"}
}
}
)
result = response.json()
print(result["result"])
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Here are the latest AI news..."
}
]
}
}
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "Request to MCP server timed out"
}
}
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
string
required
Your MCP Rank API key
Body Parameters
string
required
The MCP Rank server ID (e.g.,
ai.exa/exa)string
required
JSON-RPC method name (e.g.,
tools/list, tools/call, resources/list)object
Method parameters (optional, depends on method)
string | number
JSON-RPC request ID (default: 1)
Response
Standard JSON-RPC 2.0 response:string
Always “2.0”
string | number
Request ID from the request
any
Method result (on success)
object
Error object (on failure) with
code and messagecurl -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"
}'
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/call",
"params": {
"name": "web_search",
"arguments": {"query": "latest AI news"}
}
}'
import httpx
async with httpx.AsyncClient() as client:
response = await client.post(
"https://api.mcprank.com/v1/mcp/call",
headers={"X-API-Key": "sk_mcp_rank_..."},
json={
"server_id": "ai.exa/exa",
"method": "tools/call",
"params": {
"name": "web_search",
"arguments": {"query": "latest AI news"}
}
}
)
result = response.json()
print(result["result"])
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Here are the latest AI news..."
}
]
}
}
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "Request to MCP server timed out"
}
}
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 |