Skip to content

MCP Server Overview

The TokenBot MCP (Model Context Protocol) server lets AI assistants and LLMs interact with the TokenBot platform programmatically.

MCP is a protocol that lets AI models call tools and access data sources. The TokenBot MCP server exposes trading operations as tools, plus resources and prompts an assistant can use.

It provides:

  • 25 tools — exchanges, strategies, copiers, trades, and user context (Tools Reference)
  • 6 resources — read-only data under the tokenbot:// scheme
  • 4 prompts — onboarding, portfolio_summary, troubleshoot, optimize_strategy

The server runs locally and communicates over stdio. Its binary is tokenbot-mcp.

// Example Claude Desktop config (mcpServers entry)
{
"mcpServers": {
"tokenbot": {
"command": "tokenbot-mcp",
"env": {
"GRAPHQL_ENDPOINT": "https://gql-api.tokenbot.com/graphql",
"GRAPHQL_SERVICE_TOKEN": "your_service_token",
"DEFAULT_USER_ID": "user_123"
}
}
}
}

The server authenticates to the TokenBot GraphQL backend using header credentials supplied via environment variables:

VariablePurpose
GRAPHQL_ENDPOINTBackend GraphQL URL. Defaults to http://localhost:4000/graphql, so set it to https://gql-api.tokenbot.com/graphql for production
GRAPHQL_SERVICE_TOKENSent as the X-Service-Token header
DEFAULT_USER_IDSent as the X-User-Id header (the acting user)

At runtime, an assistant can switch the acting user with the set_user_context tool, passing either a userId or a tb_-format API key (the user ID is extracted from the key).

URIDescription
tokenbot://exchanges/listYour exchange accounts
tokenbot://strategies/listYour strategies
tokenbot://copiers/listYour copiers
tokenbot://trades/listRecent trades
tokenbot://trades/analyticsTrade analytics
tokenbot://system/supported-exchangesSupported exchanges

See the Tools Reference for the full tool list.