Send an MCP message
/mcp/{token}
The endpoint of an MCP server. Give its url (returned when you create an MCP server for an integrated account) to an MCP client; the client sends JSON-RPC 2.0 messages here over Streamable HTTP. Tools are the integrated account's resources and methods, filtered by the server's config.methods and config.tags. With config.tool_exposure set to discovery, only search_tools, get_tool_schema and call_tool are listed.
Auth: the token in the URL. When the server has config.require_api_token_auth, the request must also carry an API token as a Bearer token. A GET is answered 405: there is no server-sent event stream.
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.
Errors
| Status | Description |
|---|---|
401 | The server requires an API token and none, or an invalid one, was sent. |
404 | The token is unknown or expired, or its integrated account no longer exists. |
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())