MTContext Docs
Setup

Claude Desktop

Connect Claude Desktop to MTContext over the hosted server.

Requires a terminal key that's already bound to a terminal.

Preflight

Before configuring Claude Desktop, confirm:

  • mcp-remote is installed globally and available in PATH.
  • Your terminal key has already been bound by a successful EA connection.
  • Your internet/proxy settings allow outbound HTTPS to mcp.mtcontext.com.

Install mcp-remote

Claude Desktop's built-in remote-server support varies by version, so the reliable path is mcp-remote, a small connector that runs locally as a stdio server and forwards to the hosted MCP endpoint over HTTPS with your headers attached.

npm install -g mcp-remote

Configure

Open claude_desktop_config.json and add an mtcontext entry:

{
  "mcpServers": {
    "mtcontext": {
      "command": "mcp-remote",
      "args": ["https://mcp.mtcontext.com/mcp/v1"],
      "headers": {
        "Authorization": "Bearer MTMCP-YOUR-TERMINAL-KEY"
      }
    }
  }
}

Replace MTMCP-YOUR-TERMINAL-KEY with your actual terminal key. You only need to set this once — the server automatically refreshes your session token before it expires, so you never touch this config again unless the key is revoked or rotated.

Config file locations:

~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json (typical; varies by install method)

Verify

Restart Claude Desktop, then:

  1. Look for the connector/plug icon in a new chat — it should show mtcontext as connected.
  2. Ask something that requires live data: "What's the current price of EURUSD?"
  3. Claude should call get_tick and return a real quote from your connected terminal.

If you only get planning text and no tool call, make the prompt explicit: "Use MTContext tool get_tick for EURUSD now."

Enabling live trading

Trading tools (place_order, close_position, modify_position, and related) stay dry-run-only until two things are both true:

  1. Your terminal key's tier includes the trade capability (Pro and above — free tier is read/analytics only).
  2. inp_AllowTrading is set to true on the EA itself, and MetaTrader's Algo Trading button is enabled. This defaults to false; while it's off, live calls (dry_run: false) return TRADING_DISABLED, though dry runs still work so you can preflight orders safely.

Until both conditions hold, every trading tool defaults dry_run to true regardless of what's asked — a request has to explicitly pass dry_run: false to attempt a real order.

If you need to manage the token yourself

For CI/CD or custom tooling where mcp-remote doesn't fit, you can exchange your terminal key for a session token directly:

JWT=$(curl -s -X POST https://gateway.mtcontext.com/api/token \
  -H "Authorization: Bearer MTMCP-YOUR-TERMINAL-KEY" | jq -r .token)

In this mode you're responsible for refreshing it before it expires (default 24h) — the mcp-remote approach above handles that automatically, which is why it's the default recommendation.

Troubleshooting

  • mcp-remote: command not found: reinstall globally, then restart Claude Desktop.
  • Server appears disconnected: verify JSON syntax and file location for your OS.
  • Auth errors: confirm the key is current and not revoked.
  • Timeout or network errors: test connectivity to https://mcp.mtcontext.com/mcp/v1 from the same machine.
  • No live data returned: check terminal is online and EA is still attached/running.

On this page