curl -X POST https://api.mcprank.com/v1/mcp/tools/call \
-H "X-API-Key: sk_mcp_rank_..." \
-H "Content-Type: application/json" \
-d '{
"server_id": "ai.exa/exa",
"name": "web_search",
"arguments": {"query": "latest AI news", "numResults": 5}
}'
import httpx
async with httpx.AsyncClient() as client:
response = await client.post(
"https://api.mcprank.com/v1/mcp/tools/call",
headers={"X-API-Key": "sk_mcp_rank_..."},
json={
"server_id": "ai.exa/exa",
"name": "web_search",
"arguments": {"query": "latest AI news", "numResults": 5}
}
)
result = response.json()
print(result)
{
"content": [
{
"type": "text",
"text": "Here are the top results for 'latest AI news':\n\n1. OpenAI announces GPT-5...\n2. Google DeepMind releases..."
}
],
"isError": false
}
MCP Server Proxy
Call Tool
Call a specific tool on an MCP server
POST
/
v1
/
mcp
/
tools
/
call
curl -X POST https://api.mcprank.com/v1/mcp/tools/call \
-H "X-API-Key: sk_mcp_rank_..." \
-H "Content-Type: application/json" \
-d '{
"server_id": "ai.exa/exa",
"name": "web_search",
"arguments": {"query": "latest AI news", "numResults": 5}
}'
import httpx
async with httpx.AsyncClient() as client:
response = await client.post(
"https://api.mcprank.com/v1/mcp/tools/call",
headers={"X-API-Key": "sk_mcp_rank_..."},
json={
"server_id": "ai.exa/exa",
"name": "web_search",
"arguments": {"query": "latest AI news", "numResults": 5}
}
)
result = response.json()
print(result)
{
"content": [
{
"type": "text",
"text": "Here are the top results for 'latest AI news':\n\n1. OpenAI announces GPT-5...\n2. Google DeepMind releases..."
}
],
"isError": false
}
Call Tool
Call a specific tool on an MCP server. This is a convenience wrapper around the generic/mcp/call endpoint.
Request
curl -X POST https://api.mcprank.com/v1/mcp/tools/call \
-H "X-API-Key: sk_mcp_rank_..." \
-H "Content-Type: application/json" \
-d '{
"server_id": "ai.exa/exa",
"name": "web_search",
"arguments": {"query": "latest AI news"}
}'
Headers
string
required
Your MCP Rank API key
Body Parameters
string
required
The MCP Rank server ID
string
required
Name of the tool to call
object
Tool arguments (structure depends on tool’s inputSchema)
Response
Returns the tool’s execution result. The structure depends on the specific tool.curl -X POST https://api.mcprank.com/v1/mcp/tools/call \
-H "X-API-Key: sk_mcp_rank_..." \
-H "Content-Type: application/json" \
-d '{
"server_id": "ai.exa/exa",
"name": "web_search",
"arguments": {"query": "latest AI news", "numResults": 5}
}'
import httpx
async with httpx.AsyncClient() as client:
response = await client.post(
"https://api.mcprank.com/v1/mcp/tools/call",
headers={"X-API-Key": "sk_mcp_rank_..."},
json={
"server_id": "ai.exa/exa",
"name": "web_search",
"arguments": {"query": "latest AI news", "numResults": 5}
}
)
result = response.json()
print(result)
{
"content": [
{
"type": "text",
"text": "Here are the top results for 'latest AI news':\n\n1. OpenAI announces GPT-5...\n2. Google DeepMind releases..."
}
],
"isError": false
}
Tool Result Format
MCP tools return results in a standard format:| Field | Type | Description |
|---|---|---|
content | array | Array of content blocks |
isError | boolean | Whether the tool encountered an error |
- Text:
{"type": "text", "text": "..."} - Image:
{"type": "image", "data": "base64...", "mimeType": "image/png"} - Resource:
{"type": "resource", "resource": {...}}
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 |
| 502 | Tool execution failed |
Error Response
{
"detail": "Tool call failed: Invalid query parameter"
}