Claude Desktop
Connect Claude Desktop to MT-MCP over the hosted server.
Requires a terminal key that's already bound to a terminal.
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-remoteConfigure
Open claude_desktop_config.json and add an mt-mcp entry:
{
"mcpServers": {
"mt-mcp": {
"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:
- Look for the connector/plug icon in a new chat — it should show
mt-mcpas connected. - Ask something that requires live data: "What's the current price of EURUSD?"
- Claude should call
get_tickand return a real quote from your connected terminal.
Enabling live trading
Trading tools (place_order, close_position, modify_position, and related) stay dry-run-only until two things are both true:
- Your terminal key's tier includes the
tradecapability (Pro and above — free tier is read/analytics only). inp_AllowTradingis set totrueon the EA itself, and MetaTrader's Algo Trading button is enabled. This defaults tofalse; while it's off, live calls (dry_run: false) returnTRADING_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.