Trader
Tools

MCP server

Let Claude, Cursor, VS Code and other AI agents manage your accounts, copiers and followers through the Model Context Protocol, with an API key.

View as Markdown

The API is also available as an MCP server. MCP (Model Context Protocol) is a standard way for AI agents such as Claude or Cursor to use outside tools. With this server, an agent can manage your copy trading for you. It can list your accounts and copiers, set up a copier, add followers with their rules, pause and resume copying, and read what was copied.

https://mcp.algotradertools.com/mcp

It uses an API key, like the rest of the API. Each tool matches one API endpoint and follows the same rules as that endpoint, including its scopes, rate limits and errors.

Create a key for the agent

Create a separate key for each agent under API keys in the app, so you can revoke it on its own. Give it only the scopes the agent needs. The agent sees only the tools that its key's scopes allow.

The agent shouldScopes
Report on accounts, copiers and what was copiedaccounts:read, copiers:read
Also set up and change copiers and followersaccounts:read, copiers:write
Also disconnect accountsadd accounts:write

Add it to your client

Claude Code

claude mcp add --transport http algotradertools https://mcp.algotradertools.com/mcp \
  --header "X-API-Key: $ATT_API_KEY"

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "algotradertools": {
      "url": "https://mcp.algotradertools.com/mcp",
      "headers": { "X-API-Key": "att_…" }
    }
  }
}

VS Code (.vscode/mcp.json, asks for the key once)

{
  "inputs": [
    { "type": "promptString", "id": "att-key", "description": "Algo Trader Tools API key", "password": true }
  ],
  "servers": {
    "algotradertools": {
      "type": "http",
      "url": "https://mcp.algotradertools.com/mcp",
      "headers": { "X-API-Key": "${input:att-key}" }
    }
  }
}

Claude Desktop and other clients that can only start local servers can reach it through mcp-remote (needs Node.js):

{
  "mcpServers": {
    "algotradertools": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.algotradertools.com/mcp", "--header", "X-API-Key:${ATT_API_KEY}"],
      "env": { "ATT_API_KEY": "att_…" }
    }
  }
}

Wherever a client lets you set headers, Authorization: Bearer att_… works too.

Tools

ToolDoesScope
list_accountsYour connected accounts with status, role and latest figuresaccounts:read
get_accountOne accountaccounts:read
disconnect_accountStops the account's terminal and deletes it with its historyaccounts:write
list_copiersYour copiers with their followerscopiers:read
get_copierOne copier, with what the engine reports about each followercopiers:read
create_copierA new copier for a master accountcopiers:write
update_copierRename, pause or resume a copiercopiers:write
delete_copierDeletes a copier, optionally closing its copies firstcopiers:write
list_followersA copier's followerscopiers:read
get_followerOne follower with its rules and statuscopiers:read
add_followerAttaches an account to a copier with its own rulescopiers:write
update_followerChanges a follower's rules, pauses or resumes itcopiers:write
remove_followerDetaches a follower, optionally closing its copies firstcopiers:write
list_copy_eventsWhat the copier engine did on a copier's followerscopiers:read

A tool takes the same inputs as its endpoint: the path and query parameters and the request body, all at the same level. For example, update_follower takes copier_id, follower_id and the rules to change. The API reference describes each one in full.

There is no tool for connecting or reconnecting an account. Both need the broker password, and a password typed into a chat ends up in the AI provider's logs. Connect accounts in the app or through the API.

Changes reach live trading

A paused follower stops copying at once. delete_copier and remove_follower with close_positions: true close positions at market. Clients mark these tools as destructive and usually ask before running them. Keep that confirmation switched on, or use a key with read scopes only.

Errors

A failed tool call returns an error result with the API's problem details. The agent can read code, detail and the invalid fields in errors, and try again. A tool call outside the key's scopes fails with insufficient_scope.

Limits

Each key can send 120 messages a minute to the MCP server. A tool call also counts once toward the key's API limit of 120 requests a minute, the same as the matching request on the REST API. See Limits.

Request IDs

A tool call uses the request ID of the MCP message that carried it. So the X-Request-Id header of the response and the request_id in a tool's error are the same.

On this page