Skip to content

Getting Started

This MCP server connects AI agents to cTrader’s FIX 4.4 trading gateway over TLS/TCP. It provides 10 trading tools, 12 resources (4 core + 8 knowledge base), and 3 prompts, with built-in risk management and optional real-time market data via a dedicated QUOTE session.

Open cTrader desktop or web platform:

  1. Click the Cog (settings) icon in the bottom-left corner
  2. Select FIX API from the settings menu
  3. You will see two connection types: Price and Trade
  4. This server uses both connections: Trade for orders/positions, Price for real-time quotes
  5. Use the Copy button to copy each credential

Reference: https://help.ctrader.com/fix/getting-credentials/

FieldExample
Hostuat-demo1.p.c-trader.com
Trade Port5212
SenderCompIDdemo.axioryuat.3008144
Password(from cTrader FIX API settings)
  • Username: Automatically extracted from SenderCompID (last segment after final dot). Example: demo.axioryuat.3008144 -> 3008144
  • TargetCompID: Defaults to cServer
  • SenderSubID: Defaults to TRADE

You only need to override these if your broker requires different values.

Each symbol has a unique numeric ID required for FIX messages:

  1. In cTrader, open the Active Symbol Panel
  2. Scroll down to Symbol info dropdown
  3. At the bottom of Symbol info, find FIX symbol ID

Important: FIX Symbol IDs may differ across brokers. Always verify with your broker.

There are two connection methods. Use whichever works with your client.

Most MCP clients support OAuth natively. When you add the server URL, the client opens a browser window where you enter your FIX credentials. Tokens refresh automatically.

  1. In your MCP client: Settings → MCP Servers → Add Server
  2. Enter the connector URL: https://mcp.axiory.ai/mcp
  3. A browser window opens with the FIX credentials form
  4. Select your broker server from the dropdown (trade/quote ports auto-fill)
  5. Enter your FIX credentials (SenderCompID, Password)
  6. Optionally configure mode, risk limits under “Advanced Settings”
  7. Click “Connect” — the browser redirects back and you’re connected!

Supported clients: Claude Desktop, claude.ai, Cursor, Windsurf, Cline, Claude Code CLI, OpenAI/ChatGPT, Google Gemini, Perplexity, and more.

If your client doesn’t complete the OAuth browser flow:

  1. Visit the Token Portal in your browser: https://mcp.axiory.ai/token-portal
  2. Select your broker server and enter your FIX credentials
  3. Choose your trading mode (readonly / paper / live)
  4. Click “Generate Token”
  5. Copy the token immediately — it is shown only once
  6. Add the token to your client’s config as a Bearer token

Portal tokens expire after 30 days. Store the token in an environment variable, never hardcoded.

Example (Cursor ~/.cursor/mcp.json):

{ "mcpServers": { "ctrader": { "url": "https://mcp.axiory.ai/mcp",
"headers": { "Authorization": "Bearer ${env:CTRADER_TOKEN}" } } } }

Your credentials are encrypted server-side. Raw credentials are never logged or stored in plaintext.

The QUOTE session is enabled by default. It typically uses the same host and credentials as TRADE, but a different port (e.g., 5211 instead of 5212).

In the OAuth credentials form, expand “Advanced Settings” to configure:

FieldDefault
Quote HostSame as Trade Host
Quote PortSame as Trade Port
Quote PasswordSame as Password
ModeBehaviorUse Case
readonlyView positions/orders onlyMonitoring
paperValidate + log, no executionTesting (default)
liveReal order executionProduction trading

Start with paper mode to verify everything works before switching to live. Select the mode during OAuth setup or on the Token Portal form.

  1. Connect from your preferred AI agent client
  2. Use get_positions to verify the FIX connection
  3. Use get_orders to check for any pending orders
  4. Check ctrader://health resource for connection status
  5. Try a test order with place_order (paper mode won’t execute)
  6. Review the audit log entry in the journal

This server works with any MCP-compatible AI agent client:

  • Claude Desktop / claude.ai — OAuth (built-in)
  • Claude Code CLI — OAuth or Bearer token via --header
  • Cursor — OAuth or Bearer token via ~/.cursor/mcp.json
  • Windsurf — OAuth or Bearer token via ~/.codeium/windsurf/mcp_config.json
  • Cline — OAuth or Bearer token via UI
  • Continue — Bearer token via ~/.continue/config.yaml
  • OpenAI / ChatGPT — OAuth or Bearer token via Developer Mode
  • Google Gemini CLI — OAuth or Bearer token
  • Perplexity — OAuth or API key
  • Manus — OAuth or Bearer token via Connector UI

For detailed per-client setup instructions with exact config snippets, ask about “agent client setup”.