Loading...

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.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
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.
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.
Performance is likely limited by the MetaTrader 5 API and network latency. High-frequency trading may be constrained by these factors.
Cost is primarily related to MetaTrader 5 account fees and potential API usage costs if applicable. AI assistant costs (e.g., ChatGPT tokens) should also be considered.
pip install metatrader-mcp-server{
"mcpServers": {
"metatrader": {
"command": "metatrader-mcp-server",
"args": [
"--login", "YOUR_MT5_LOGIN",
"--password", "YOUR_MT5_PASSWORD",
"--server", "YOUR_MT5_SERVER"
]
}
}
}get_account_infoRetrieves account balance, equity, profit, margin level, leverage, and currency.
Read-only operation; no modification of account data.
get_symbolsLists all available trading symbols.
Read-only operation; provides a list of symbols.
get_symbol_priceGets the current bid/ask price for a symbol.
Read-only operation; retrieves market data.
place_market_orderExecutes instant BUY/SELL orders.
Executes trades, directly impacting account balance.
close_positionCloses a specific open position.
Closes existing trades, affecting profit/loss.
close_all_positionsCloses all open positions.
Closes all trades, with potentially significant financial impact.
get_dealsGets historical completed trades.
Read-only operation; retrieves historical data.
Environment Variable
cloud
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.
The system defaults to full read and write access, allowing the AI to execute trades and manage positions without explicit confirmation. No sandboxing is implemented, increasing the risk of unintended actions.
Production Tip
Start with a demo account and small trade volumes to validate AI behavior before deploying to a live account.
Python 3.10+, MetaTrader 5 terminal, and an MT5 trading account.
Go to Tools -> Options -> Expert Advisors and check 'Allow algorithmic trading'.
Add the MCP server configuration to your Claude Desktop config file (claude_desktop_config.json).
Your MetaTrader 5 login number, password, and server name.
Credentials stay on your machine, but automated trading carries inherent financial risk. Use responsibly.
Yes, via Open WebUI by configuring it as a tool server.
You can place market orders, set stop loss/take profit, and manage existing positions.