CrysiscodeX/claude-mt5-mcp-windows
If you are the rightful owner of claude-mt5-mcp-windows and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A local MCP server for Claude Desktop to interact with the MetaTrader 5 terminal running natively on Windows.
Claude MT5 MCP Server (Native Windows 11)
A local MCP server for Claude Desktop to interact with the MetaTrader 5 terminal running natively on Windows.
This project bridges the gap between the native Claude Desktop application and the MetaTrader 5 terminal. It allows Claude to access account information, pull market data, and analyze indicators directly from your trading platform.
⚠️ Architecture & Requirements
This is a native Windows solution. It is far more stable than Wine-based workarounds.
- Native Python: It uses your system's installed Python (3.9+ recommended).
- Native MT5: It connects directly to the official MetaTrader 5 Windows application.
- GUI-Dependent: This server requires the MetaTrader 5 desktop application to be open, running, and logged in. It is not a headless, 24/7 server.
🚀 Installation and Setup Guide
Step 1: Install Core Dependencies
- Install Python: If you haven't, install Python 3.9 or newer from python.org. Ensure you check "Add python.exe to PATH" during installation.
- Install MetaTrader 5: Install the official MT5 terminal for Windows from your broker or the MetaQuotes website.
- Install Git: If you haven't, install Git from git-scm.com.
Step 2: Get the Project Code
Open a Command Prompt or PowerShell and clone this repository.
# Navigate to a folder of your choice, e.g., your Desktop
cd C:\Users\YourUser\Desktop
# Clone the project
git clone https://github.com/YourUsername/claude-mt5-mcp-windows.git
# Enter the new project directory
cd claude-mt5-mcp-windows
Step 3: Create Environment & Install Packages
We have a simple script to do this for you.
- In File Explorer, navigate to the
claude-mt5-mcp-windowsfolder. - Double-click the
create_env.batfile. - A command prompt will open, create a
venvfolder, and install all required Python libraries. - Press any key to close the window when it's done.
🛠️ Configuration
Part 1: Configure MetaTrader 5
- Open the MetaTrader 5 application.
- In the top menu, go to Tools -> Options.
- Click the Expert Advisors tab.
- CHECK the box for "Allow Algo Trading".
- Click OK.
Part 2: Configure Claude Desktop
This is the final step. We need to tell Claude how to run our new server.
1. Get Your Project's Absolute Path
In the File Explorer, click in the address bar of your claude-mt5-mcp-windows folder. Copy the path. It will look like:
C:\Users\YourUser\Desktop\claude-mt5-mcp-windows
2. Edit the Claude Config File
-
Open the Claude config file with a text editor. The file is located at:
C:\Users\YourUser\AppData\Roaming\Claude\claude_desktop_config.json(You can paste%APPDATA%\Claudeinto your File Explorer address bar to get there) -
Add your new server to the
mcpServersobject. Do not remove existing servers. -
Paste your absolute path and add
\run.batto the end.
Example claude_desktop_config.json:
{
"mcpServers": {
"some-other-server": {
"command": "npx",
"args": [ ... ]
},
"mt5-local-server": {
"command": "C:\\Users\\YourUser\\Desktop\\claude-mt5-mcp-windows\\run.bat",
"args": []
}
}
}
Save the file.
⚡ Running the Server
You are ready!
- Fully RESTART your Claude Desktop application (quit and re-open it).
- Make sure your MetaTrader 5 application is open, running, and logged in to your trading account.
- In Claude, open Settings -> Developer -> Extensions.
- You should see
mt5-local-serverlisted with a "running" status. - Open a new chat and test it!
Example Prompts:
- "Using my MT5 tools, what is my account balance?"
- "What is the current bid/ask spread for EURUSD?"
- "Get the last 10 hourly bars for GBPUSD."
- "What is the 14-period SMA for EURUSD on the H1 timeframe?"