metatrader-mcp-server
Model Context Protocol (MCP) to enable AI LLMs to trade using MetaTrader platform
The MetaTrader MCP Server connects AI assistants like Claude and ChatGPT to the MetaTrader 5 trading platform, enabling natural language trading commands. Developers can execute trades, retrieve market data, manage positions, and access account information by simply conversing with their AI assistant. The server supports multiple interfaces including stdio for Claude Desktop, HTTP/REST API for Open WebUI and custom integrations, and WebSocket for real-time tick streaming. It provides 32 trading operations covering account management, market data retrieval, order execution, position management, and historical analysis.
Key Features
Use Cases
- 01Automate trading strategies by instructing AI assistants to execute trades based on natural language rules
- 02Build algorithmic trading bots that leverage LLM decision-making combined with MT5 execution
- 03Create live trading dashboards using the WebSocket quote server for real-time price monitoring
- 04Perform quick market analysis by asking AI for historical candles, symbol info, and current prices
- 05Manage trading positions hands-free—close profitable trades, modify stop losses, or cancel pending orders via chat
- 06Develop custom trading tools using the Python client library for programmatic MT5 access
Related MCP Servers
View moremarkitdown
Python tool for converting files and office documents to Markdown.
firecrawl
The context API to search, scrape, and interact with the web at scale. 🔥
prompts.chat
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
langflow
Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
metatrader-mcp-server — FAQ
What is the MetaTrader MCP Server?+
It's an MCP server that bridges AI assistants (Claude, ChatGPT) to the MetaTrader 5 trading platform, allowing you to execute trades, retrieve market data, and manage positions using natural language commands.
How do I install the MetaTrader MCP Server for Claude Desktop?+
Install via pip with 'pip install metatrader-mcp-server', then add a configuration block to your Claude Desktop config JSON (claude_desktop_config.json) specifying the command 'metatrader-mcp-server' with your MT5 login, password, server, and '--transport stdio' arguments. Restart Claude Desktop to activate.
Which AI clients work with this MCP server?+
It works with Claude Desktop (stdio), Claude Code (SSE remote), ChatGPT and other LLMs via Open WebUI (HTTP API), and any MCP-compatible client that supports stdio or SSE transports.
What are the prerequisites for using this server?+
You need Python 3.10 or higher, the MetaTrader 5 terminal installed and running, a demo or live MT5 account with login/password/server credentials, and algorithmic trading enabled in MT5's Expert Advisors settings.
Is the MetaTrader MCP Server free to use?+
Yes, it's open-source under the MIT license and available for free on PyPI and GitHub. However, you are responsible for any trading outcomes, and the software comes with no liability for losses or gains.
Does this server require API keys?+
No external API keys are needed. You only need your existing MetaTrader 5 account credentials (login number, password, and server name) to connect the server to your MT5 terminal.
How do I install metatrader-mcp-server?+
Open the source repository on GitHub and follow its README. metatrader-mcp-server is a mcp server — MCP Agents Market links you directly to the official repo.
Is metatrader-mcp-server free?+
metatrader-mcp-server is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.