A crypto trading MCP server. Your agent, your rules.
Give Claude, Cursor or your own script a scoped MUTEX API key and the MUTEX MCP server, and it reads the market, sizes the trade and places the order on your account. The key decides how far it reaches: one isolated bot, or your whole account with withdrawals fenced to your own wallets.
{
"mcpServers": {
"mutex": {
"command": "npx",
"args": ["-y", "@trade-mutex/mcp"],
"env": { "MUTEX_API_KEY": "mtx_bot_your_key_here" }
}
}
}An MCP server and API keys for AI agent trading
The MUTEX MCP server is a small program, published on npm as @trade-mutex/mcp, that runs on your own computer and speaks the Model Context Protocol. Your AI client starts it with npx (Node 20 or newer), and the agent gets a set of MUTEX tools: read markets and candles, check the account, preview an order, place it, change it, cancel it.
What the agent can touch is set by the MUTEX API key in the server's environment, not by the prompt. The server picks its mode from the key's prefix and the API enforces the limits, so a confused or hijacked agent hits the same wall a careful one does.
MUTEX does not host a strategy here. The thinking is your agent's; MUTEX supplies the account, the order routing and the limits. If you would rather hire an agent MUTEX runs for you, see AI Agent and Assistant.
Two keys: a bot trading key or an agent key
MUTEX offers two keys for agents, and the difference is how much an agent can lose. Start with a bot trading key: fund a bot small and its balance is a hard ceiling. Use an agent key only for an agent you already trust with your account.
| Bot trading key | Agent key | |
|---|---|---|
| Prefix | mtx_bot_ | mtx_agent_ |
| Reaches | One isolated bot sub-account | Your whole account, as you. The MCP tools cover your main perp account and funding balance |
| Trades | Preview, place, modify and cancel orders, set leverage | The same, plus OCO exits and cancel all |
| Moves money | Never: no deposit, withdrawal, swap or transfer | Withdraws only to your own linked wallets, with a signing key you authorized |
| Worst case | The bot's balance | Anything you can do in the app except key, wallet and agent-access changes; withdrawals reach only your own wallets |
| Created in | Settings, API, once an AI Agent + API bot is armed | Settings, Agents, after you turn Agent access on |
| How many | One per bot | One per account: revoke, then create, to rotate |
Both MUTEX keys are shown once, when you create them, and stored only as a hash. The bot trading key also drives the plain REST trading API, so your own code and an agent can share one bot. More on the tiers in Agent access.
Connect Claude to MUTEX in 3 steps
The MUTEX MCP server needs no install step: npx fetches it the first time your client starts it. These steps use a bot trading key, the safe way to try an agent.
- 1 · Make a bot and its key
In the terminal, start a bot from the AI Agent + API template, fund it with an amount you would accept losing, and arm it. Then open Settings, API and generate its trading key. Copy it: it is shown once.
- 2 · Add the server
Put the config above into claude_desktop_config.json, .mcp.json or your client's MCP settings, with your key as MUTEX_API_KEY, and restart the client.
- 3 · Give it the rules and ask
Paste the system prompt from the MCP docs so the agent previews first and sizes in coin units, then ask: "check BTC and my balance, preview a small long, and place it with a stop."
With an agent key instead
In Settings, Agents, turn Agent access on and create an agent key. The app shows the key and the API host as two lines; put both in the config. The MUTEX MCP server then trades your main perp account.
For withdrawals, ask the agent for its signing address (the mutex_signer_address tool). The server makes that key on first run and keeps it in a local file. Paste the address under Agent signing key, pick 30 or 90 days and authorize it with your linked wallet. Until then trading works and withdrawals are refused.
{
"mcpServers": {
"mutex": {
"command": "npx",
"args": ["-y", "@trade-mutex/mcp"],
"env": {
"MUTEX_API_KEY": "mtx_agent_your_key_here",
"MUTEX_API_BASE": "https://api.mutex.trade"
}
}
}
}What the MUTEX MCP server lets an agent do
The MUTEX MCP server shows 11 tools with a bot trading key and 23 with an agent key, grouped here by job. Inputs, outputs and retry rules for each are in the tool reference.
Market data
- get_markets
- get_candles
Account
- get_accountbot key only
- get_balancesagent key only
- get_positions
- get_orders
- get_fills
Trading
- preview_order
- place_order
- place_ocoagent key only
- modify_order
- cancel_order
- cancel_allagent key only
- set_leverage
Money
- mutex_deposit_addressagent key only
- get_withdrawalsagent key only
- mutex_withdrawagent key only
- mutex_signer_addressagent key only
Rules, rate limits and kill switches
- Rate limits
- A MUTEX bot trading key currently gets 300 reads and 60 orders per minute, in fixed one-minute buckets. An agent key is limited to 60 order placements per minute on each order route.
- Auto-suspend
- A bot trading key that keeps hammering past its limit (currently more than 1,000 refusals in ten minutes) is suspended for an hour. The third suspension in a day needs a new key. A client that waits out a refusal never trips it.
- Agent access switch
- Off by default. While it is off, every agent key is refused on every endpoint, reads included.
- Keys only from a browser
- An agent can never create a key, turn agent access on, or add, change or remove a linked wallet. Those need you, signed in to the MUTEX app.
- Signing key term
- 30 or 90 days, your choice. The signer refuses anything longer than 90 days.
- Stopping an agent
- Pause the bot to stop a bot trading key; cancels still work so it can unwind. Revoke the agent key, or turn Agent access off, to stop an agent key at its next request.
Fees and risks of letting an AI agent trade
MUTEX charges nothing for the MCP server or for a key. Orders an agent places pay the market's normal trading fee, which get_markets lists and preview_order quotes before the order goes in.
MUTEX has no testnet, so every fill is real money. An agent can misread a market, size a trade wrong or follow an injected instruction from something it read. With a bot trading key the most it can lose is the bot's balance. With an agent key it trades your main account, and while withdrawals can only reach your own linked wallets, the agent picks the amount and the asset: a swap into a thin token can lose most of the value to slippage on the way. Nothing on your machine asks you before the signing key signs.
Keep the signing key file like an SSH key: back it up to keep the authorization, delete it and revoke the address if the machine is lost.
Who the MUTEX MCP server is for
- Traders who already work with Claude, Cursor or another MCP client and want it to read MUTEX markets and place orders in plain language.
- Developers building their own agent or bot who want one account their code and their agent both drive, with a balance as the risk limit.
- Not for you if you want a ready-made strategy: the MUTEX bots run grid, TWAP and more without any code, and the hosted AI agent is one MUTEX runs for you, with no key to manage.