Skip to content
POST /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

tokenstring
required·

The MCP server's token, from its url.

Request Body

idstring | number

The request ID. Omitted on notifications.

jsonrpcstring
Possible values:
2.0
methodstring

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.

Example: tools/call
paramsRecord<string, any>

The method's parameters. For tools/call, name is the tool and arguments its input. For initialize, protocolVersion and clientInfo.

Example: {"name":"list_all_hub_spot_contacts","arguments":{"limit":10}}

Response Body

idstring | number
jsonrpcstring
Possible values:
2.0
resultRecord<string, any>

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

StatusDescription
401The server requires an API token and none, or an invalid one, was sent.
404The 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())