Listed from the MCP registry; nobody on Odel publishes it.
Full MCP server for MT5: access trades, logs, compilation, etc..
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
uvx mt5-mcp-by-leo
MCP client config
{
"mcpServers": {
"mt5-by-leo": {
"command": "uvx",
"args": [
"mt5-mcp-by-leo"
]
}
}
}Universal MCP Server for MetaTrader 5 Trading & Data Operations
FullMt5McpByLeo is a complete, production-ready MCP server that enables Claude and other AI assistants to control MetaTrader 5 directly. Execute trades, retrieve market data, manage charts, analyze trading history, and automate MT5 operations through natural language.
Execute and manage trading positions and orders:
Access real-time and historical data:
Create and modify chart visualizations:
Control chart windows and redraw operations:
Compile and execute Expert Advisors:
Note: Python version package mt5_mcp_by_leo is deprecated. now replace by C++ exe server. Note: Unlike other MCPs that use .ini files to launch backtests, this MCP doesn't need that because it controls the entire MT5 tester from the same EA, without .ini files, without wasted terminals. In addition, the code compilation is more complete since its AI can choose whether or not to optimize the code, instructions, etc.
FullMt5McpByLeo/
├── Src/ # MQL5 Backend Functions
│ ....
├── mt5_mcp_by_leo/ # Json tools definition
│ ....
Your MCP server won't work without an active license from TheBotPlace.
args array in your claude_desktop_config.json or the JSON that your AI platform uses (see Quick Start/step 4 below)
- EXE from releases (McpServer.exe)
- Check: dependencies.json
- EX5 of releases (Runner an Mt5Mcp).
cd "C:\Users\YOUR USER\AppData\Roaming\MetaQuotes\Terminal\YOUR ID\MQL5\Shared Projects"
tsndep install "https://forge.mql5.io/nique_372/FullMt5McpByLeo.git"
Download the latest .exe and .ex5 files from the repo releases. Place the .ex5 files in the MT5 terminal's Experts\ folder, and the .exe file in an easily accessible folder (for example, the MT5 terminal's Common\Files\ folder).
Download the tools.json file and place it in your terminal's Common\Files\ folder.
Open Common\Files And create a json file with this structure:
{
"general": {
"type_reg": "stdio_stdin",
"json_tools_fpath": "JSON_TOOL_PATH"
},
"mt5_conn": {
"host": "127.0.0.1",
"port": 9999
},
"http_lib": {
"name": "McpMt5Server",
"version": "1.0.0",
"host": "127.0.0.1",
"port": 8080,
"endpoint": "/"
},
"stdio_stdin": {
"name": "MT5 MCP Server",
"version": "1.0.0"
}
}
Full template in Templates/config.json
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mt5_mcp_by_leo": {
"command": "PATH_TO_EXE",
"args": ["PATH_TO_FILE", "YOUR_TBP_ID", "YOUR_MT5_ACCOUNT_LOGIN_ID"
]
}
}
}
Full template in Templates/claude_desktop_config.json
In MT5: Tools → Options → Allowed URLs for WebRequest
127.0.0.1 or host you configured.Open Claude Desktop. At that moment, a CMcpServer.exe is running in the background until it establishes a connection with the EA Mt5Mcp.ex5.
1. Run Runner.ex5 in any chart.. (dowland from releases)
2. Drag Mt5Mcp.ex5 onto your chart (any) and cofigure it, The parameters of the EA, such as port/host, must match the JSON of Claude Desktop
Open a 0.01 lot BUY on EURUSD with SL at 1.0800 and TP at 1.0900
Note:
You can also use HTTP Remote (McpServer.exe support HTTP with libs httplib + mcp-remote npm package) (see: https://forge.mql5.io/nique_372/McpServer/wiki/Running-HTTP)
By downloading or using this repository, you accept the license terms.
Copyright © 2026 Niquel Mendoza (nique_372).
TSN Trading Systems ecosystem.