MCP Directory

How to add MetaTrader MCP Server to Claude Desktop

Let AI assistants trade on MetaTrader 5 using natural language. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 533โ˜… ยท stdio ยท no auth

Claude Desktop config for MetaTrader MCP Server

pip install metatrader-mcp-server
{
  "mcpServers": {
    "metatrader-mcp-server": {
      "command": "metatrader-mcp-server",
      "args": [
        "--login",
        "YOUR_MT5_LOGIN",
        "--password",
        "YOUR_MT5_PASSWORD",
        "--server",
        "YOUR_MT5_SERVER",
        "--transport",
        "stdio"
      ]
    }
  }
}

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the MetaTrader MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm MetaTrader MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • Python 3.10 or higher
  • MetaTrader 5 terminal installed
  • An MT5 trading account (demo or live): login number, password, and server name
  • Algorithmic trading enabled in MT5 (Tools โ†’ Options โ†’ Expert Advisors โ†’ Allow algorithmic trading)

What MetaTrader MCP Server can do in Claude Desktop

get_account_info

Get balance, equity, profit, margin level, leverage, and currency.

get_symbols

List all available trading symbols.

get_symbol_price

Get the current bid/ask price for a symbol.

get_candles_latest

Get recent price candles (OHLCV data).

get_candles_by_date

Get historical candles for a date range.

get_symbol_info

Get detailed symbol information.

place_market_order

Execute an instant BUY/SELL order.

place_pending_order

Place a limit/stop order for future execution.

Security

Trading involves significant risk of loss; the software is provided as-is with no liability for trading outcomes. Requires MT5 account credentials (login, password, server) passed as CLI args or via a .env file โ€” keep these private. The MCP protocol includes no authentication: when exposing the SSE server over a network, restrict access by IP with a firewall, place it behind an authenticated reverse proxy, or use an SSH tunnel. Algorithmic trading must be explicitly enabled in the MT5 terminal.

MetaTrader MCP Server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the MetaTrader MCP Server config there under the "mcpServers" key and restart the client.

Is MetaTrader MCP Server safe to use with Claude Desktop?

Trading involves significant risk of loss; the software is provided as-is with no liability for trading outcomes. Requires MT5 account credentials (login, password, server) passed as CLI args or via a .env file โ€” keep these private. The MCP protocol includes no authentication: when exposing the SSE server over a network, restrict access by IP with a firewall, place it behind an authenticated reverse proxy, or use an SSH tunnel. Algorithmic trading must be explicitly enabled in the MT5 terminal.

Which AI clients does it support?

Claude Desktop and Claude Code via local stdio or remote SSE; ChatGPT and other LLMs via Open WebUI using the REST/HTTP API server. It can also be used directly as a Python library (MT5Client).

What transports are available?

The MCP server supports stdio, sse, and streamable-http (via --transport / MCP_TRANSPORT). SSE/HTTP bind to 0.0.0.0:8080 by default. There is also a separate FastAPI REST server and a WebSocket quote server (default ws://0.0.0.0:8765).

Is it safe to run the remote SSE server?

The MCP protocol has no built-in authentication. When exposing the SSE server over a network, restrict access by IP with a firewall, put it behind an authenticated reverse proxy, or use an SSH tunnel.

View repo Full MetaTrader MCP Server page