Windsurf
Windsurf is Codeium’s AI-first code editor. Use it if you prefer cutting-edge IDE integration with AI.
Prerequisites
Section titled “Prerequisites”- Windsurf IDE installed
- Your FIX credentials (see Before You Start
OAuth Method
Section titled “OAuth Method”Step 1: Open Windsurf Configuration
Section titled “Step 1: Open Windsurf Configuration”The Windsurf MCP config is at ~/.codeium/windsurf/mcp_config.json.
Create the file if it doesn’t exist:
mkdir -p ~/.codeium/windsurftouch ~/.codeium/windsurf/mcp_config.jsonStep 2: Add the Server
Section titled “Step 2: Add the Server”Edit ~/.codeium/windsurf/mcp_config.json:
{ "mcpServers": { "axiory-ai": { "type": "streamable-http", "serverUrl": "https://mcp.axiory.ai/mcp" } }}Step 3: OAuth Login
Section titled “Step 3: OAuth Login”Restart Windsurf. When you first use the Axiory.ai tools, it 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 Windsurf chat, ask:
“Are you connected to cTrader? Show me my positions.”
Windsurf 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 Windsurf
Section titled “Step 3: Configure Windsurf”Edit ~/.codeium/windsurf/mcp_config.json:
{ "mcpServers": { "axiory-ai": { "type": "streamable-http", "serverUrl": "https://mcp.axiory.ai/mcp", "headers": { "Authorization": "Bearer ${env:AXIORY_TOKEN}" } } }}Step 4: Restart Windsurf
Section titled “Step 4: Restart Windsurf”Close and reopen Windsurf to load the new environment variable.
Using in Windsurf
Section titled “Using in Windsurf”Once connected:
@axiory-ai What's the current price of EURUSD?
@axiory-ai Buy 100,000 units of EURUSD at market priceWindsurf will use the Axiory.ai tools to fetch quotes, check risk limits, and execute orders.
Making Your First Trade
Section titled “Making Your First Trade”In Windsurf:
“I want to buy 50,000 units of EURUSD. What’s the current price?”
Windsurf will:
- Fetch the current quote
- Check your risk limits
- Place the order (or simulate in paper mode)
- Show you the confirmation
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 Windsurf
If your token expires, you’ll see “401 Unauthorized”. Generate a new one.
Troubleshooting
Section titled “Troubleshooting””MCP server not found” or connection fails
Section titled “”MCP server not found” or connection fails”Check:
- File exists:
~/.codeium/windsurf/mcp_config.json - JSON is valid (no syntax errors)
- Server URL is correct:
https://mcp.axiory.ai/mcp - Restart Windsurf after editing
”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
- Restart Windsurf
Windsurf can’t find the environment variable
Section titled “Windsurf can’t find the environment variable”Make sure:
- You’ve set the variable:
export AXIORY_TOKEN="..." - You’ve restarted Windsurf (not just reloaded settings)
- Verified the var exists:
echo $AXIORY_TOKEN
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
Windsurf excels at code-based trading strategies. Start with paper mode to test.
