MUTEX
AI · Agent keys and MCP

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.

MUTEX Settings, Agents tab: where the agent key is made. Example data.
Any MCP client with the MUTEX MCP server and that agent key. Example chat.
claude_desktop_config.json · bot key
{
  "mcpServers": {
    "mutex": {
      "command": "npx",
      "args": ["-y", "@trade-mutex/mcp"],
      "env": { "MUTEX_API_KEY": "mtx_bot_your_key_here" }
    }
  }
}
mutex mcp · 11 tools with a bot key
get_markets List markets (or one) with fees and limits.
get_candles OHLCV history.
get_account The account's balance: equity, available, margin, uPnL.
get_positions Open positions.
get_orders List orders (or fetch one by id).
get_fills Fill history.
preview_order Pre-trade fill/fee/margin quote, no side effects.
place_order Place an order; echoes estimate and resulting state.
modify_order Reprice or resize a resting order; echoes state.
cancel_order Cancel one or all; echoes state.
set_leverage Set per-symbol leverage.
Tools, bot key
11
Tools, agent key
23
incl. market data
Orders per minute
60
per key, currently
Signing key, max
90days
What it is

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.

Scoped keys

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 keyAgent key
Prefixmtx_bot_mtx_agent_
ReachesOne isolated bot sub-accountYour whole account, as you. The MCP tools cover your main perp account and funding balance
TradesPreview, place, modify and cancel orders, set leverageThe same, plus OCO exits and cancel all
Moves moneyNever: no deposit, withdrawal, swap or transferWithdraws only to your own linked wallets, with a signing key you authorized
Worst caseThe bot's balanceAnything you can do in the app except key, wallet and agent-access changes; withdrawals reach only your own wallets
Created inSettings, API, once an AI Agent + API bot is armedSettings, Agents, after you turn Agent access on
How manyOne per botOne 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.

Setup

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. 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. 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. 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"
      }
    }
  }
}
Tools

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

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.
Costs and risks

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 it is for

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.

Questions

Can I connect Claude to a crypto exchange with MCP?
Yes. The MUTEX MCP server (@trade-mutex/mcp on npm) runs on your own machine through npx, and Claude Desktop, Claude Code or any MCP client that starts local servers can then read markets and place orders on your MUTEX account with the key you give it.
What is the difference between a bot trading key and an agent key?
A bot trading key (mtx_bot_) trades one isolated bot sub-account and cannot move money in or out, so that bot's balance is the most it can lose. An agent key (mtx_agent_) acts as you on your main account and can withdraw, but only to wallets you already linked.
Can an AI agent withdraw my funds to its own address?
No. A bot trading key has no withdrawal at all. An agent key can only withdraw to one of your own linked wallets, it needs a signing key you authorized with a linked wallet, and both the API and the signer refuse any other destination.
How do I stop an agent?
Pause the bot in the app to stop a bot trading key; cancels keep working so positions can be unwound. For an agent key, turn Agent access off or revoke the key in Settings, Agents, and the next request is refused.
What are the rate limits?
A bot trading key currently gets 300 reads and 60 orders per minute. An agent key is limited to 60 order placements per minute per order route. Flooding past the limit can suspend a bot trading key for an hour.
Does the MUTEX MCP server cost anything?
No. MUTEX charges nothing for the MCP server or for a key. Orders an agent places pay the market's normal trading fee, which preview_order quotes before the order goes in.
Does it work with ChatGPT?
The MUTEX MCP server is a local stdio server with no hosted endpoint, so it works with clients that start MCP servers on your machine. A client that only connects to remote MCP servers cannot use it today; a script can call the REST API with the same key instead.

More on MUTEX