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.
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/mcpIt 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 should | Scopes |
|---|---|
| Report on accounts, copiers and what was copied | accounts:read, copiers:read |
| Also set up and change copiers and followers | accounts:read, copiers:write |
| Also disconnect accounts | add 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
| Tool | Does | Scope |
|---|---|---|
list_accounts | Your connected accounts with status, role and latest figures | accounts:read |
get_account | One account | accounts:read |
disconnect_account | Stops the account's terminal and deletes it with its history | accounts:write |
list_copiers | Your copiers with their followers | copiers:read |
get_copier | One copier, with what the engine reports about each follower | copiers:read |
create_copier | A new copier for a master account | copiers:write |
update_copier | Rename, pause or resume a copier | copiers:write |
delete_copier | Deletes a copier, optionally closing its copies first | copiers:write |
list_followers | A copier's followers | copiers:read |
get_follower | One follower with its rules and status | copiers:read |
add_follower | Attaches an account to a copier with its own rules | copiers:write |
update_follower | Changes a follower's rules, pauses or resumes it | copiers:write |
remove_follower | Detaches a follower, optionally closing its copies first | copiers:write |
list_copy_events | What the copier engine did on a copier's followers | copiers: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.
Authentication
Authenticate with API keys, choose their scopes, revoke them, keep them out of browsers, and trace requests with request IDs.
Accounts
Connect MetaTrader 4 and 5 accounts, follow their status while the terminal starts, read their figures, reconnect them after a lapse and disconnect them.