Connecting Cursor

Last updated on Jul 26, 2026

Cursor speaks the Model Context Protocol, so you can connect it to your MetaTrader terminal through MTContext and ask its AI for live prices, account state, and trades — right from your editor. Setup is the same idea as any MCP client: add one config block with your MTContext endpoint and key.

This assumes you've subscribed, installed the EA, and your terminal shows connected. If not, start with Installing the EA on MT5.

Get your config snippet

In your MTContext dashboard, copy the MCP config snippet for the terminal you want to connect. It contains your endpoint and license key already filled in:

{
  "mcpServers": {
    "mtcontext": {
      "type": "http",
      "url": "https://mcp.mtcontext.com/mcp/v1",
      "headers": {
        "Authorization": "Bearer YOUR_LICENSE_KEY"
      }
    }
  }
}

Use your dashboard's snippet — it always the latest snippet, you still have to replace the placeholder with your real key.

Cursor

  1. Open Settings → MCP (or Cursor Settings → Tools & Integrations → MCP), and choose Add new MCP server — or edit ~/.cursor/mcp.json directly. For a single project, use .cursor/mcp.json in the project root instead.

  2. Add the mtcontext entry inside mcpServers, alongside any existing servers.

  3. Save. Cursor picks up the change; if it doesn't, toggle the server off and on in the MCP settings, or restart Cursor.

  4. In the MCP settings you should see mtcontext with a green/active status and its tools listed.

Confirm it works

In the editor's AI chat, ask a read-only question:

"Using MTContext, what's the current XAUUSD spread?"

A live answer means you're connected. Read-only calls never touch your account.

Troubleshooting

  • Server shows red / not connecting — check the JSON is valid and the block sits inside mcpServers.

  • "No terminal connected" — your terminal is offline; confirm the EA is attached and connected.

  • Auth error — re-copy the snippet from the dashboard so the key matches.

Next steps

See Checking prices, bars, and account state for what to ask next, and Placing trades safely with dry_run before enabling trades.

Start free at mtcontext.com · full guide in the documentation.