Send an MCP message
/mcp/{token}
Path Parameters
The MCP server's token, from its url.
Request Body
The request ID. Omitted on notifications.
2.0
The MCP method. Truto answers initialize, notifications/initialized, tools/list, tools/call, resources/list and prompts/list (both always empty) and ping. Any other method is acknowledged with an empty 202.
tools/callThe method's parameters. For tools/call, name is the tool and arguments its input. For initialize, protocolVersion and clientInfo.
{"name":"list_all_hub_spot_contacts","arguments":{"limit":10}}Response Body
2.0
initialize returns protocolVersion, capabilities (tools only), serverInfo and instructions. tools/list returns tools. tools/call returns content, a list of text items, and isError when the call failed.
curl -X POST 'https://api.truto.one/mcp/{token}' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_all_hub_spot_contacts",
"arguments": {
"limit": 10
}
}
}'const body = {
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_all_hub_spot_contacts",
"arguments": {
"limit": 10
}
}
};
const response = await fetch('https://api.truto.one/mcp/{token}', {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/mcp/{token}"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_all_hub_spot_contacts",
"arguments": {
"limit": 10
}
}
}
response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())