MetaTrader 5 × Claude AI — Trade in plain English, no coding required
Connect Claude AI directly to your MT5 account · Natural language commands · 1-click setup · Zero terminal commands
6 roadblocks between you and AI Trading
It's not that AI is hard. It's the gap between traders and coders — too wide. Each roadblock alone is enough to make you quit:
🐍 #1 — Install Python
Which version? 32 or 64-bit? What does "Add to PATH" even mean?
📦 #2 — pip install
Terminal shows red text. No clue what the error says.
📝 #3 — Edit JSON
One missing comma → Claude refuses to start.
🔑 #4 — Enter credentials
Trader or Investor password? Is the server name spelled right?
🔌 #5 — Connection failed
Where's the error? Guessing blind, no diagnostic tool.
🧠 #6 — The /trading skill
Copy SKILL.md into which folder, exactly?
Code2trade wraps everything into one setup.bat file
We automated all 6 roadblocks above into a single file. You double-click setup.bat, it handles everything — you only enter 3 pieces of MT5 account info in one window, click Test → Install. Done.
Visit python.org, download Python 3.12Install, remember to tick "Add to PATH"Open CMD, run pip install metatrader-mcp-serverFind claude_desktop_config.jsonHand-write JSON config — exact commas & bracketsCopy the trading skill folder into %APPDATA%\Claude\skillsRestart Claude, hope it worksErrors → Google → retry → still errors
- Step 1: Double-click setup.bat
- Step 2: Wait 1-2 minutes (Python & package auto-installed)
- Step 3: Enter Login / Password / Server → Test → Install
- Step 4: Open Claude Code, type /trading
✓ Auto-installs MetaTrader MCP package
✓ Auto-registers MCP server with Claude Code
✓ Auto-copies the /trading skill to the right folder
✓ Built-in Test Connection button before install
5 steps from download to your first command
Follow in order. Total time: ~3 minutes.
Prepare MetaTrader 5
Open MT5 and log into your account (demo or real, your choice).
Go to Tools → Options → Expert Advisors, tick the box "Allow algorithmic trading" → OK. This is mandatory — without it, the AI can't place orders.
Extract the package & run setup.bat
Download MetaTraderMCP-Setup.rar from the button below, extract it to any folder.
Enter the extracted folder → Double-click setup.bat. If Windows shows a SmartScreen warning, click "More info" → "Run anyway". A black window appears and automatically does:
Note: If Python isn't installed, the script auto-installs it via winget (1-2 minutes). No Claude Code yet? Install from claude.com/code and re-run.
Enter your MT5 account in the Setup window
A small window pops up asking for 3 things — the same 3 you use to log into MT5:
- MT5 Login — account number (e.g. 12345678)
- MT5 Password — your Trader password (not the Investor one)
- MT5 Server — your broker's server name (e.g. Exness-MT5Trial7, MetaQuotes-Demo)
How to find it: In MT5, look at the bottom-right status bar. You'll see something like 12345678: Exness-Demo — the part before the colon is Login, the part after is Server.
👉 Click "Test Connection" first. If it shows "Connected. Balance: ..." you're good. Then click "Install" to register the MCP with Claude Code.
Open Claude Code & type /trading
When you see "Setup complete!", close the installer. Two ways to open Claude Code:
- Option 1 — Via Claude Desktop: Open the Claude Desktop app, click the Claude Code tab in the sidebar — no commands needed.
- Option 2 — Via Terminal: Open a new Command Prompt or PowerShell window, then run:
Once Claude Code is running, type /trading and hit Enter to activate the trading skill. Now Claude "knows" how to operate your MT5.
Trade in plain English — AI executes instantly
From now on, just talk to Claude like a personal trading assistant. A few commands to try right away:
What can the AI do after setup?
Over 25 MT5 operations unlocked — full coverage from analysis to execution:
💼 Account management
Check balance, equity, profit, margin, free margin, leverage, account type (Demo/Real).
📊 Market data
Realtime prices, symbol list, OHLCV candles across timeframes (M1 → MN1), historical data.
⚡ Instant execution
Market BUY/SELL orders, pending LIMIT/STOP orders. AI auto-detects LIMIT vs STOP from current price.
🛡️ Position management
Modify SL/TP, close by ID, close by symbol, close all winning / losing / open positions.
📋 Pending orders
View, modify, cancel pending orders — by ID, by symbol, or all at once.
📜 Trading history
Pull deals & orders by date range, by symbol — analyze performance instantly.
- Windows 10 / 11 (the setup script runs on Windows)
- Claude Code installed — download at claude.com/code
- MetaTrader 5 running and logged into your account
- Python 3.10+ — not required, the script auto-installs via winget
Download MetaTrader MCP Setup — Code2trade
Includes setup.bat, GUI installer, the /trading skill · Supports Windows 10/11
⬇ Download — MetaTraderMCP-Setup.rar.rar file · Free · Updated June 2026