Skip to content

Cursor

Cursor is an AI-powered code editor. Its built-in MCP support lets you pull market data and charts without leaving your editor.

Setup

Option A — Settings UI

  1. Open Cursor Settings > MCP Servers.
  2. Click Add Server and enter the configuration below.

Option B — Config file

Create or edit .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "e8markets": {
      "url": "https://trade.e8markets.com/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Replace YOUR_API_KEY with the key from the Prerequisites step.

Verify

Ask Cursor:

"What trading assets are available?"

If the connection is working, it will call the e8_trade_asset_list tool and return a list of tradeable instruments.

Example prompts

Market data:

  • "Show me a 7-day chart for EURUSD with daily candles"
  • "What's the current bid/ask spread on BTCUSD?"
  • "Give me the latest crypto news headlines"

Trading:

  • "What's my account balance?"
  • "Buy 0.1 lots of EURUSD at market"
  • "Show me my open positions"
  • "Close my BTCUSD position"
  • "Close all my open positions"

How to trade

Once connected, you can trade through natural language:

  1. Check your account"Show me my account info"
  2. Research"What's the current price of EURUSD?"
  3. Place an order"Buy 0.1 lots of EURUSD at market"
  4. Monitor"Show me my open positions"
  5. Close"Close my EURUSD position"

All orders go through the same execution engine as the web terminal.

Note

All accounts are demo/evaluation accounts. No real money is at risk.