Cursor
Cursor is an AI-powered code editor. Use it if you want to integrate trading into development workflows.
Prerequisites
Section titled “Prerequisites”- Cursor IDE installed
- Your FIX credentials (see Before You Start
OAuth Method
Section titled “OAuth Method”Step 1: Open Cursor Configuration
Section titled “Step 1: Open Cursor Configuration”- Open Cursor
- Go to Settings > Features > MCP
- Click Add MCP Server
Step 2: Add the Server
Section titled “Step 2: Add the Server”- Name:
axiory-ai(orAxiory.ai) - Type:
streamable-http - URL:
https://mcp.axiory.ai/mcp - Click Save
Step 3: OAuth Login
Section titled “Step 3: OAuth Login”Cursor opens a browser with the FIX credentials form:
- Select your broker server
- Enter your SenderCompID (from cTrader Settings > FIX API)
- Enter your FIX API Password (NOT your cTrader login password)
- Set trading mode (readonly/paper/live)
- Click Connect
You’ll see “Connected Successfully”.
Step 4: Test Connection
Section titled “Step 4: Test Connection”In Cursor, open a chat and ask:
“Are you connected to cTrader? Show me my positions.”
Cursor should respond with your account status.
Portal Token Method (Fallback)
Section titled “Portal Token Method (Fallback)”If OAuth doesn’t work:
Step 1: Generate a Token
Section titled “Step 1: Generate a Token”Visit in your browser:
https://mcp.axiory.ai/token-portal- Select your broker server
- Enter your FIX credentials
- Choose trading mode
- Click Generate Token
- Copy the token
Step 2: Store Token
Section titled “Step 2: Store Token”Set the token in your environment:
export AXIORY_TOKEN="your-token-here"Add to ~/.zshrc or ~/.bashrc to persist:
echo 'export AXIORY_TOKEN="your-token-here"' >> ~/.zshrcsource ~/.zshrcStep 3: Configure Cursor
Section titled “Step 3: Configure Cursor”In Cursor MCP settings, add:
{ "name": "axiory-ai", "type": "streamable-http", "url": "https://mcp.axiory.ai/mcp", "headers": { "Authorization": "Bearer ${env:AXIORY_TOKEN}" }}The ${env:AXIORY_TOKEN} syntax tells Cursor to use the environment variable.
Step 4: Restart Cursor
Section titled “Step 4: Restart Cursor”Close and reopen Cursor to load the new environment variable.
Using in Cursor
Section titled “Using in Cursor”Once connected, you can:
- Ask Cursor to fetch real-time market data
- Ask it to place orders
- Build trading bots or scripts that integrate with Axiory.ai
- Backtest strategies
Examples:
@axiory-ai Show me the current EURUSD price
@axiory-ai I want to build a simple moving average crossover bot. Here's my idea:- Buy when the 20-period MA crosses above the 50-period MA- Sell when it crosses below- Position size: 100,000 units
Can you implement this?Cursor will use the Axiory.ai tools to fetch quotes, manage positions, etc.
Making Your First Trade
Section titled “Making Your First Trade”In Cursor chat:
“Buy 50,000 units of EURUSD at the current market price”
Cursor will:
- Fetch the current price
- Place the order
- Show you the confirmation
In paper mode, it simulates. In live mode, it executes.
Token Rotation
Section titled “Token Rotation”Portal tokens expire after 30 days. Before expiry:
- Visit the Token Portal
- Generate a new token
- Update your environment variable:
export AXIORY_TOKEN="new-token" - Restart Cursor
If your token expires, you’ll see “401 Unauthorized”. Generate a new one.
Troubleshooting
Section titled “Troubleshooting””MCP server not found” or “Connection refused”
Section titled “”MCP server not found” or “Connection refused””Check:
- Cursor MCP settings have the correct URL:
https://mcp.axiory.ai/mcp - The config was saved (not in edit mode)
- Restart Cursor after saving
”Invalid credentials” in the OAuth form
Section titled “”Invalid credentials” in the OAuth form”Your FIX credentials are wrong:
- Go to cTrader Settings > FIX API
- Copy SenderCompID exactly (with all dots and numbers)
- Copy FIX API Password exactly (NOT your login password)
- Retry OAuth or regenerate a Portal Token
”401 Unauthorized” (Portal Token)
Section titled “”401 Unauthorized” (Portal Token)”Your token has expired or is invalid:
- Check:
echo $AXIORY_TOKEN - If empty, set it:
export AXIORY_TOKEN="your-token" - If invalid, generate a new one at the Token Portal
- Update the env var and restart Cursor
Cursor can’t find the environment variable
Section titled “Cursor can’t find the environment variable”Make sure you’ve:
- Set the variable:
export AXIORY_TOKEN="..." - Restarted Cursor (not just reloaded settings)
- Verified the env var exists:
echo $AXIORY_TOKEN
If it still doesn’t work, hardcode the token temporarily (not recommended for production):
{ "headers": { "Authorization": "Bearer actual-token-here" }}Next Steps
Section titled “Next Steps”- Operating Modes — Understand readonly, paper, and live
- Risk Limits — Position size and daily loss limits
- Choosing an Agent — Compare with other MCP clients
Cursor is great for building custom trading scripts. Start with paper mode to test.
