
与Claude、ChatGPT或任何自然语言LLM交流,执行交易、核对余额和流媒体市场数据——所有这些都通过MT5路由。
概览
与Claude、ChatGPT或任何自然语言LLM交流,执行交易、核对余额和流媒体市场数据——所有这些都通过MT5路由。 交易涉及重大损失风险。该软件按现状提供,用于交易结果。您对通过该系统执行的所有交易负责。 - — 下载 - — 下载 - — 登录号、密码和服务器名称(例如MetaQuotes-Demo)- — MT5中:工具→期权 → 专家顾问 → 支持算法交易 选择最适合你使用场景的界面: 添加到你的Claude桌面配置中(Windows为%APPDATA%\Claude\claude_desktop_config.json,Mac为~/Library/Application Support/Claude/claude_desktop_config.json): 重启Claude Desktop,然后尝试:“我的账户余额是多少?” 在 args 数组中添加“--path”、“C:\Program Files\MetaTrader 5\terminal64.exe”。 在安装了MT5的Windows VPS上运行MCP服务器,然后远程连接。
概述(AI 翻译)
AI助手与MetaTrader 5之间的桥梁。 通过MT5与Claude、ChatGPT或任何LLM自然语言交流,执行交易、核对余额和流媒体市场数据。
⚠️ 免责声明
交易涉及重大损失风险。本软件按现状提供,不承担交易结果责任。您对通过该系统执行的所有交易负责。这不是财务建议。
先修条件
- Python 3.10+ — 下载
- MetaTrader 5终端 — 下载
- MT5账户凭证 — 登录号、密码和服务器名称(例如
MetaQuotes-Demo) - 算法交易启用 — 在MT5中:
Tools → Options → Expert Advisors → Allow algorithmic trading
安装
快速启动
选择最适合你使用场景的界面:
选项A — Claude Desktop (MCP over stdio)
添加到你的Claude桌面配置中(Windows版为%APPDATA%\Claude\claude_desktop_config.json,Mac版为~/Library/Application Support/Claude/claude_desktop_config.json):
重启Claude Desktop,然后尝试:“我的账户余额是多少?”*
自定义MT5路径? 添加“–path”,“C:\Program Files\MetaTrader 5\terminal64。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MetaTrader MCP Server
Bridge between AI assistants and MetaTrader 5. Talk to Claude, ChatGPT, or any LLM in natural language to execute trades, check balances, and stream market data — all routed through MT5.
You → AI Assistant → MCP Server → MetaTrader 5 → Your Trades
⚠️ Disclaimer
Trading involves significant risk of loss. This software is provided as-is with no liability for trading outcomes. You are responsible for all trades executed through this system. This is not financial advice.
Prerequisites
- Python 3.10+ — Download
- MetaTrader 5 terminal — Download
- MT5 account credentials — Login number, password, and server name (e.g.
MetaQuotes-Demo) - Algo trading enabled — In MT5:
Tools → Options → Expert Advisors → Allow algorithmic trading
Installation
pip install metatrader-mcp-server
Quick Start
Choose the interface that fits your use case:
Option A — Claude Desktop (MCP over stdio)
Add to your Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on Mac):
{
"mcpServers": {
"metatrader": {
"command": "metatrader-mcp-server",
"args": [
"--login", "YOUR_MT5_LOGIN",
"--password", "YOUR_MT5_PASSWORD",
"--server", "YOUR_MT5_SERVER",
"--transport", "stdio"
]
}
}
}
Restart Claude Desktop, then try: “What’s my account balance?”
Custom MT5 path? Add
"--path", "C:\\Program Files\\MetaTrader 5\\terminal64.exe"to the args array.
Option B — Remote MCP Server (SSE)
Run the MCP server on a Windows VPS where MT5 is installed, then connect to it remotely.
Server side:
metatrader-mcp-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER
# Defaults to SSE on 0.0.0.0:8080. Customize with --host and --port.
Client side (Claude Desktop config):
{
"mcpServers": {
"metatrader": {
"url": "http://VPS_IP:8080/sse"
}
}
}
Security note: MCP has no built-in auth. Use a firewall, reverse proxy with auth, or SSH tunnel when exposing over a network.
Option C — REST API (for Open WebUI / ChatGPT)
metatrader-http-server --login YOUR_LOGIN --password YOUR_PASSWORD --server YOUR_SERVER --host 0.0.0.0 --port 8000
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"metatrader": {
"command": "metatrader-mcp-server",
"args": [
"--login", "YOUR_MT5_LOGIN",
"--password", "YOUR_MT5_PASSWORD",
"--server", "YOUR_MT5_SERVER",
"--transport", "stdio"
]
}
}
}