Skip to content

Google Gemini CLI

Google Gemini CLI supports MCP with OAuth. Use this if you’re in the Google ecosystem.

  • Google Gemini CLI installed and configured
  • Your FIX credentials (see Before You Start
  • Google account

Edit ~/.gemini/settings.json (or wherever your Gemini config is):

{
"mcpServers": {
"axiory-ai": {
"url": "https://mcp.axiory.ai/mcp"
}
}
}

When you start Gemini CLI, it should recognize the new server:

Terminal window
gemini

In the CLI, use the /mcp auth command to authenticate:

/mcp auth axiory-ai

This opens a browser with the FIX credentials form:

  1. Select your broker server
  2. Enter your SenderCompID (from cTrader Settings > FIX API)
  3. Enter your FIX API Password (NOT your cTrader login password)
  4. Set trading mode (readonly/paper/live)
  5. Click Connect

Back in the Gemini CLI:

/use axiory-ai
> Show me my current positions
> What's the EURUSD price?
> Buy 100,000 units of EURUSD at market

If OAuth doesn’t work:

Visit in your browser:

https://mcp.axiory.ai/token-portal
  1. Select your broker server
  2. Enter your FIX credentials
  3. Choose trading mode
  4. Click Generate Token
  5. Copy the token

Edit ~/.gemini/settings.json:

{
"mcpServers": {
"axiory-ai": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.axiory.ai/mcp"],
"env": {
"AUTHORIZATION": "Bearer YOUR_TOKEN_HERE"
}
}
}
}

Replace YOUR_TOKEN_HERE with your token from the Token Portal.

Restart Gemini CLI:

Terminal window
gemini
> Show me my positions
> Place a buy order for 50,000 units of EURUSD

Once authenticated:

> Can you check that you're connected to cTrader?
> Show me my account health.
> I want to buy 100,000 units of EURUSD. What's the current price?
> Place that buy order now.

Gemini will validate, check your risk limits, and execute (or simulate in paper mode).

Portal tokens expire after 30 days. Before expiry:

  1. Visit the Token Portal
  2. Generate a new token
  3. Update your settings.json with the new token
  4. Restart Gemini CLI

If your token expires, you’ll see “401 Unauthorized”. Generate a new one.

”Server not found” or “Connection refused”

Section titled “”Server not found” or “Connection refused””

Check that ~/.gemini/settings.json was saved correctly:

Terminal window
cat ~/.gemini/settings.json

Restart Gemini CLI after editing the config.

Try using the Portal Token method instead (Method 2 above).

Your token is invalid or expired.

  1. Generate a new token at the Token Portal
  2. Update settings.json with the new token
  3. Restart Gemini CLI

”Invalid credentials” in the OAuth form

Section titled “”Invalid credentials” in the OAuth form”

Your FIX credentials are wrong:

  1. Go to cTrader Settings > FIX API
  2. Verify SenderCompID (includes broker prefix and account number)
  3. Verify FIX API Password (NOT your login password)
  4. Copy exactly and retry OAuth or regenerate your Portal Token

Start with paper mode to test, then switch to live when confident.