Back to MCP Directory
Metatrader
Model Context Protocol moderate risk

Metatrader

MetaTrader MCP Server bridges AI assistants to MetaTrader 5 for natural language trading, offering account control, market data, and order management via MCP or REST API.

Connections & Capabilities

Connects To

GitHubDocker

Capabilities

readwriteexec

Quickstart

Install

pip install metatrader-mcp-server

Config

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

Exposed MCP Tools (7)

safe
get_account_info

Retrieves account balance, equity, profit, margin level, leverage, and currency.

Read-only operation; no modification of account data.

safe
get_symbols

Lists all available trading symbols.

Read-only operation; provides a list of symbols.

safe
get_symbol_price

Gets the current bid/ask price for a symbol.

Read-only operation; retrieves market data.

high
place_market_order

Executes instant BUY/SELL orders.

Executes trades, directly impacting account balance.

high
close_position

Closes a specific open position.

Closes existing trades, affecting profit/loss.

high
close_all_positions

Closes all open positions.

Closes all trades, with potentially significant financial impact.

safe
get_deals

Gets historical completed trades.

Read-only operation; retrieves historical data.

Safety Assessment

This server allows AI to execute trades, which is inherently risky. While credentials stay local, the potential for financial loss due to AI errors or market volatility exists. Use with caution and start with small amounts.

  • Credentials remain on the user's machine.
  • Algorithmic trading must be enabled manually in MetaTrader 5.
  • Clear disclaimer emphasizes user responsibility for trading outcomes.
  • Enables automated trading, which carries inherent financial risk.
  • Requires storing MetaTrader 5 credentials (login, password, server).
  • Potential for unintended trades if AI misinterprets instructions.
  • No explicit sandboxing or rate limiting is mentioned.