Use TraderX with Claude Code
Add TraderX to Claude Code with one command, then sign in or use a personal key.
Sign in with TraderX
The quickest way on your own computer. Add the server:
claude mcp add traderx --transport http https://mcp.bbtraderx.com/mcpStart Claude Code, run /mcp, pick traderx and choose to authenticate. Your browser opens a TraderX page that shows what Claude Code is asking for. Approve it and go back to the terminal.
Create a personal key
For servers, containers and CI, where there is no browser to sign in from.
Keep the key private
Open Settings > AI agents
Sign in to TraderX and open Settings > AI agents.
Create a key
Give it a name you will recognise later, like the machine or app it runs on.
Copy it once
The key starts with
bbtx_pat_and is shown only once. It doesn't expire; it works until you revoke it.
export TRADERX_API_KEY="bbtx_pat_..."Add the server with the key
claude mcp add traderx --transport http https://mcp.bbtraderx.com/mcp --header "Authorization: Bearer $TRADERX_API_KEY"Your shell fills in the key when you run the command, and Claude Code saves it in your local config. Add --scope user to make TraderX available in every project.
To share the setup with a team through a project .mcp.json, don't put the key itself in the file. Claude Code expands environment variables there, so each person keeps their own key:
{
"mcpServers": {
"traderx": {
"type": "http",
"url": "https://mcp.bbtraderx.com/mcp",
"headers": { "Authorization": "Bearer ${TRADERX_API_KEY}" }
}
}
}Verify the connection
claude mcp listtraderx should show as connected. If it asks for authentication, run /mcp again. To remove it, run claude mcp remove traderx.
“localhost refused to connect” after Approve
Claude Code picks up the sign-in on your computer, so this page means it had stopped waiting. Your TraderX account is fine.
Sign in to TraderX first
Open bbtraderx.com in your browser and sign in, so the approval page opens straight away.
Start again from the app
Keep Claude Code open, start connecting again, and approve right away in a browser on the same computer.
Or use a key
A personal key skips the browser altogether: create one in Settings > AI agents and add it as an
Authorizationheader.
Try it
Start a new Claude Code session and ask it to use TraderX:
Review
List my TraderX strategies and tell me which are paused and why.
Monitor
Show the latest trades on my BTC strategy and explain any runs that failed this week.
Discover
Show the top published strategies on TraderX and what coins they trade.
More in Example prompts. These only read your account, so they never change your strategies.
Prefer a guided setup?
The TraderX skill: Tell Claude to install the TraderX skill, then say “setup traderx”.Using Claude in the browser or the desktop app instead? See Claude.