by ariadng
Model Context Protocol (MCP) to enable AI LLMs to trade using MetaTrader platform
# Add to your Claude Code skills
git clone https://github.com/ariadng/metatrader-mcp-serverGuides for using mcp servers skills like metatrader-mcp-server.
metatrader-mcp-server is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ariadng. Model Context Protocol (MCP) to enable AI LLMs to trade using MetaTrader platform. It has 862 GitHub stars.
metatrader-mcp-server's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/ariadng/metatrader-mcp-server" and add it to your Claude Code skills directory (see the Installation section above).
metatrader-mcp-server is primarily written in Python. It is open-source under ariadng on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh metatrader-mcp-server against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Let AI assistants trade for you using natural language

MetaTrader MCP Server is a bridge that connects AI assistants (like Claude, ChatGPT) to the MetaTrader 5 trading platform. Instead of clicking buttons, you can simply tell your AI assistant what to do:
"Show me my account balance" "Buy 0.01 lots of EUR/USD" "Close all profitable positions"
The AI understands your request and executes it on MetaTrader 5 automatically.
You → AI Assistant → MCP Server → MetaTrader 5 → Your Trades
Please read this carefully:
Trading financial instruments involves significant risk of loss. This software is provided as-is, and the developers accept no liability for any trading losses, gains, or consequences of using this software.
By using this software, you acknowledge that:
This is not financial advice. Always trade responsibly.
Before you begin, make sure you have:
Open your terminal or command prompt and run:
pip install metatrader-mcp-server
Tools → OptionsExpert Advisors tabAllow algorithmic tradingOKPick one based on how you want to use it:
Find your Claude Desktop config file:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.jsonOpen the file and add this configuration:
{
"mcpServers": {
"metatrader": {
"command": "metatrader-mcp-server",
"args": [
"--login", "YOUR_MT5_LOGIN",
"--password", "YOUR_MT5_PASSWORD",
"--server", "YOUR_MT5_SERVER",
"--transport", "stdio"
]
}
}
}
Optional: Specify Custom MT5 Terminal Path
If your MT5 terminal is installed in a non-standard location, add the --path argument:
{
"mcpServers": {
"metatrader": {
"command": "metatrader-mcp-server",
"args": [
"--login", "YOUR_MT5_LOGIN",
"--password", "YOUR_MT5_PASSWORD",
"--server", "YOUR_MT5_SERVER",
"--transport", "stdio",
"--path", "C:\\Program Files\\MetaTrader 5\\terminal64.exe"
]
}
}
}
Replace YOUR_MT5_LOGIN, YOUR_MT5_PASSWORD, and YOUR_MT5_SERVER with your actual credentials
Restart Claude Desktop
Start chatting! Try: "What's my account balance?"
metatrader-http-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER --host 0.0.0.0 --port 8000
Optional: Specify Custom MT5 Terminal Path
If your MT5 terminal is installed in a non-standard location, add the --path argument:
metatrader-http-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER --path "C:\Program Files\MetaTrader 5\terminal64.exe" --host 0.0.0.0 --port 8000
Open your browser to http://localhost:8000/docs to see the API documentation
In Open WebUI:
http://localhost:8000Now you can use trading tools in your Open WebUI chats!
Stream live tick data (bid, ask, spread, volume) over WebSocket for dashboards, bots, or monitoring:
metatrader-quote-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER
Connect with any WebSocket client:
websocat ws://localhost:8765
You'll receive a connected message followed by continuous tick updates as JSON. See WebSocket Quote Server for full details.
Run the MCP server on a Windows VPS (where MT5 is installed) and connect to it remotely from Claude Desktop or Claude Code.
Server-side (on the Windows VPS):
metatrader-mcp-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER
This starts the SSE server on 0.0.0.0:8080 by default. Customize with --host and --port:
metatrader-mcp-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER --host 127.0.0.1 --port 9000
Client-side (Claude Desktop config on your local machine):
{
"mcpServers": {
"metatrader": {
"url": "http://VPS_IP:8080/sse"
}
}
}
Replace VPS_IP with your server's IP address.
Security Warning: The MCP protocol does not include authentication. When exposing the SSE server over a network, use a firewall to restrict access by IP, or place it behind a reverse proxy with authentication, or use an SSH tunnel.
A pre-built Trading Terminal Assistant skill is included in the claude-skill/ directory. It provides Claude with structured knowledge about all 32 trading tools, output formatting, and MetaTrader 5 domain expertise.
Option 1: Symlink (recommended)
Create a symlink from the standard Claude Code skills directory to claude-skill/:
cd metatrader-mcp-server
mkdir -p .claude
ln -s ../claude-skill .claude/skills
The skill will be auto-discovered and available as /trading.
Option 2: Copy
Copy the skill files into the Claude Code skills directory:
cd metatrader-mcp-server
mkdir -p .claude/skills
cp -r claude-skill/trading .claude/skills/trading
For Claude Desktop, copy the skill to the global Claude skills directory:
# macOS
mkdir -p ~/Library/Application\ Support/Claude/skills
cp -r claude-skill/trading ~/Library/Application\ Support/Claude/skills/trading
# Windows
mkdir "%APPDATA%\Claude\skills"
xcopy /E claude-skill\trading "%APPDATA%\Claude\skills\trading\"
Once installed, invoke with /trading or just ask trading-related questions naturally:
/trading
> Show me my account dashboard
> Buy 0.1 lots of EURUSD with SL at 1.0800
> Close all profitable positions
> Show me GBPUSD H4 candles
The WebSocket Quote Server streams real-time tick data from MetaTrader 5 to any WebSocket client. It's ideal for live dashboards, algorithmic trading frontends, and real-time monitoring.
metatrader-quote-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER
The server starts on ws://0.0.0.0:8765 by default.
metatrader-quote-server \
--login YOUR_LOGIN \
--password YOUR_PASSWORD \
--serve