PhoenixPerpetualsDocs API v1
Get an API key

Tools

AI assistants (MCP)⁠.

Connect Claude, ChatGPT, Gemini, Mistral Le Chat, GitHub Copilot, OpenClaw, Cursor or any MCP client to your accounts: sign-in, what an assistant may do, previews before trades, and how to let an AI trade safely.

View as Markdown

On this page
  1. Connect your assistant
  2. Claude Code
  3. Claude (web and desktop)
  4. Cursor
  5. VS Code and GitHub Copilot
  6. ChatGPT
  7. Gemini CLI
  8. Mistral Le Chat
  9. OpenClaw
  10. DeepSeek
  11. Any other client
  12. What you choose when you sign in
  13. Previews before trades
  14. What an assistant can and cannot do
  15. Letting an AI trade

Our MCP server gives an AI assistant your accounts as tools: it can read your positions, orders, fills and live risk, and, only if you allow it, trade. Every tool is one API operation, with the same name and fields as the API reference, so what an assistant does is exactly what your own code could do, under the same rules and limits.

EnvironmentAddress
Livehttps://mcp.phoenixperpsfunding.com
Sandboxhttps://mcp.phoenixperpsfunding.com/sandbox

Start with the sandbox: the assistant trades paper accounts there, on the same engine and prices.

Connect your assistant#

The first time an assistant connects, it opens a Phoenix Perpetuals sign-in in your browser. You choose there what it may do, then you are back in your assistant. There is no key to copy.

  1. Claude Code

    claude mcp add --transport http phoenix-perps https://mcp.phoenixperpsfunding.com
    claude mcp add --transport http phoenix-perps-sandbox https://mcp.phoenixperpsfunding.com/sandbox

    Then run /mcp in Claude Code and choose the server to sign in.

  2. Claude (web and desktop)

    In Settings, Connectors, choose Add custom connector, name it Phoenix Perpetuals and paste the address. Claude opens the sign-in when you first use it.

  3. Cursor

    {
      "mcpServers": {
        "phoenix-perps": { "url": "https://mcp.phoenixperpsfunding.com" }
      }
    }
  4. VS Code and GitHub Copilot

    {
      "servers": {
        "phoenix-perps": { "type": "http", "url": "https://mcp.phoenixperpsfunding.com" }
      }
    }

    Copilot uses the server in agent mode, and VS Code opens our sign-in the first time. In a Copilot Business or Enterprise organization, the MCP servers in Copilot policy must be on.

  5. ChatGPT

    In ChatGPT's Settings, Apps, turn on Developer mode, then create a connector: name it Phoenix Perpetuals, paste the address and choose OAuth. ChatGPT opens our sign-in the first time you use it. Whether Developer mode and the tools that change things are open to you depends on your ChatGPT plan.

  6. Gemini CLI

    {
      "mcpServers": {
        "phoenix-perps": { "httpUrl": "https://mcp.phoenixperpsfunding.com" }
      }
    }

    Then run /mcp auth phoenix-perps in Gemini CLI to sign in.

  7. Mistral Le Chat

    In Connectors, add a Custom MCP Connector: name it phoenix-perps and paste the address. Le Chat opens our sign-in. In an organization, an admin adds the connector.

  8. OpenClaw

    openclaw mcp set phoenix-perps '{"url":"https://mcp.phoenixperpsfunding.com","transport":"streamable-http","auth":"oauth"}'
    openclaw mcp login phoenix-perps

    The login prints our sign-in address; approve in your browser and OpenClaw keeps the access.

  9. DeepSeek

    DeepSeek's own app does not connect to MCP servers. Use a DeepSeek model in an MCP client that lets you choose your model, and add the address there as above.

  10. Any other client

    The server speaks Streamable HTTP (POST, JSON answers, no session to keep). An unsigned request is answered 401 with a WWW-Authenticate header pointing at the server's protected resource metadata, from which any MCP client finds our sign-in (OAuth 2.1 with PKCE; clients register themselves or publish a client metadata document).

On the sandbox, a key works too#

The sandbox address also takes a sandbox API key (ppk_test_), for clients that send a header rather than sign in:

claude mcp add --transport http phoenix-perps-sandbox https://mcp.phoenixperpsfunding.com/sandbox \
  --header "Authorization: Bearer $PHOENIXPERPS_API_KEY"

The live address never takes an API key: a live key would sit in plain text in your assistant's settings. On live, an assistant always signs in.

Assistants that only run local servers#

The command line serves the same tools over stdio, signed in as your pperp profile, read only unless you add --allow-trading:

claude mcp add phoenix-perps-local -- pperp mcp --sandbox

What you choose when you sign in#

  • Read is always there: accounts, live risk, positions, orders, fills, history, markets.
  • Trade is unticked. Ticking it lets the assistant place, change and cancel orders and close positions. On live it takes a code we email you.
  • Accounts: all of them, or only the ones you pick.
  • Guard rails, shown when you tick Trade and filled in for you: a largest order ($10,000), a daily loss stop ($2,000), the markets it may trade, and reduce-only. They hold whatever the assistant asks.
  • Show me a preview before each trade: on by default for live.

An assistant's sign-in lasts 90 days; it renews its access by itself every 60 minutes within that time. You can keep 5 assistants connected in each environment; connecting another one ends the oldest.

Previews before trades#

With previews on, a trade is never placed on the first call. The assistant first gets a preview: what the order would do now (whether it fills or rests, the price, the fee, the margin) and a confirmation that holds 120 seconds. It must show you the preview, and the trade happens only when it repeats the exact same call with that confirmation. Change one field, or wait too long, and it gets a new preview instead.

Together with your assistant's own approval prompt for tools that change things, you see every trade twice before it is sent.

What an assistant can and cannot do#

  • Every tool marks whether it only reads or changes something, so your client can ask you before the ones that change things. Never set your client to approve trading tools by itself.
  • Every action takes an idempotency_key: when an answer is lost, the assistant repeats the call with the same key and the action happens once.
  • On live, these are not tools at all: cancel every order, flatten an account, TradingView links and webhook endpoints. Do those yourself, from your trading platform, the dashboard, your own code or the command line.
  • Nowhere can an assistant open sandbox accounts, create keys, withdraw or ask for a payout.
  • Besides your key's own rate budget, an assistant has its own: 120 reads and 6 trading calls a minute, 60 trading calls an hour.

Letting an AI trade#

An assistant trading your account trades under your account's rules: a breach it causes is your breach, exactly as if you had placed the order.

  1. Sandbox first. Run what you plan to do on the sandbox address until it behaves the way you expect.
  2. Read first. On live, connect with Read only, and add Trade later if you still want it.
  3. Keep the guard rails tight. A small largest order and a daily loss stop well inside your account's own limit.
  4. Keep previews on, and read them.
  5. Never let the client approve trading tools by itself.

To cut every assistant off at once, open Developers, Apps in your dashboard and choose Disconnect all AI assistants. They stop at once.

Guides, endpoints, fields and error codes.