metatrader-mcp-server: an MCP bridge that lets an LLM place MetaTrader 5 orders
Model Context Protocol (MCP) to enable AI LLMs to trade using MetaTrader platform
At a glance
- What is it?
- ariadng/metatrader-mcp-server exposes MetaTrader 5 account, market data and order operations as MCP tools, plus an HTTP and a WebSocket interface. The interesting part is not the plumbing but the trust boundary it creates: a model that can call order_send on a live account.
- Who is it for?
- Adopt it if you already run MetaTrader 5 on Windows, you are comfortable with the terminal holding your credentials, and you want an MCP-native way to query account state and send orders from an assistant. Do not adopt it if you need a headless Linux deployment, if you want a backtesting or strategy framework, or if you are not prepared to supervise a model that can call order_send.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 171 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The gap between an LLM and a funded MetaTrader 5 account
MetaTrader 5 has a Python integration, but it is a library, not an interface an assistant can call. The README frames the project as a bridge: the flow it draws is You, then AI Assistant, then MCP Server, then MetaTrader 5, then Your Trades. The intended user is someone who already has MT5 installed and a demo or live account, and who would rather type "Buy 0.01 lots of EUR/USD" than click through the terminal. The README also lists developers building trading bots and analysts who need quick market data access. Those are different audiences with different risk profiles, and the project does not separate them: the same server process that answers "What is my account balance?" also exposes order placement. That is the central design fact to internalise before installing anything.
What actually crosses the MCP boundary
The server is a Python package that speaks the Model Context Protocol, so the assistant sees MetaTrader operations as tools rather than as a bespoke API. Three surfaces are documented. The MCP server itself runs over stdio for desktop clients or over SSE when started without an explicit transport, which the README says binds 0.0.0.0:8080. A second entry point, metatrader-http-server, exposes the same operations as a REST API with interactive docs at /docs, which is how the Open WebUI path works. A third, metatrader-quote-server, streams tick data (bid, ask, spread, volume) over WebSocket and the README shows websocat ws://localhost:8765 as the client, with a connected message followed by continuous JSON updates. All three authenticate to MT5 with the same --login, --password and --server triple, and all three run on the machine where the terminal lives. Credentials are passed as command line arguments, which means they land in your client config file and in the process list.
Installing and wiring it to a client
Installation is pip install metatrader-mcp-server, on Python 3.10 or higher, with the MT5 terminal present. The README's Step 2 is a prerequisite people skip: open MetaTrader 5, go to Tools, Options, Expert Advisors, and check Allow algorithmic trading. Without that, the Python integration cannot place orders regardless of what the MCP layer does. For Claude Desktop the config goes in claude_desktop_config.json under mcpServers, with command metatrader-mcp-server and args --login, --password, --server, --transport stdio. If the terminal is installed somewhere unusual, add --path with the full path to terminal64.exe. For Open WebUI the equivalent is metatrader-http-server with --host 0.0.0.0 --port 8000, then adding http://localhost:8000 as a tool server in Settings, Tools. The README also documents a remote pattern: run metatrader-mcp-server on a Windows VPS and connect to the SSE endpoint from a desktop client.
The Windows dependency is not a footnote
Every path in the README assumes a MetaTrader 5 terminal on the same machine as the server. That is a hard constraint inherited from the MT5 Python API, and it shapes deployment more than any other detail. You cannot run this in a Linux container on your usual infrastructure and point it at a broker. The documented workaround is the SSE option plus a Windows VPS, which means your trading credentials and an internet-facing port end up on the same host. The README does not describe authentication on that SSE endpoint. Read that sentence again: the documented remote setup starts an SSE server on 0.0.0.0:8080 with no described access control. If you take that route, the network boundary is yours to build, and the project gives you nothing for it. A second limitation is quieter. The README's Available Operations section is the list of tools the model can call, and the README excerpt here does not enumerate it, so the exact tool surface is something you have to read from the repository or from your client after connecting. Do not assume the tool list is read-only.
Where it sits next to MetaTrader's own Python package
The obvious alternative is to skip MCP entirely and use the MetaTrader5 Python package directly, or a wrapper such as the mt5linux bridge if you need to reach a terminal from another machine. The difference is where the decision logic lives. With the raw package, you write the code that decides to buy: conditions, sizing, stop placement, retries. With this server, that decision is delegated to a language model reading a prompt, and the server's job is to translate the model's tool call into an MT5 request. For an analyst who wants to ask questions about open positions, the second arrangement is faster to set up. For anyone running a strategy with defined entry and exit rules, the first is the correct tool and this project adds a non-deterministic layer between intent and execution. The README's roadmap section is not reproduced here, so treat any claim about future strategy support as unverified.
Licence, maintenance and what upgrading costs you
The project is MIT licensed, which permits commercial use and modification provided the copyright notice and permission notice are retained. That is a permissive licence, and it also means the authors carry no obligation to support your deployment. The disclaimer in the README is explicit that the software is provided as-is with no liability for trading losses, which is consistent with MIT but worth stating plainly: the licence and the trading risk disclaimer are two separate things, and neither one protects you from a bad order. On maintenance, the repository shows a v0.2.3 release in April 2025 labelled Trade using other LLMs, following v0.2.1 the day before, and a last push in March 2026. That pattern suggests an actively touched project rather than an abandoned one, but the release notes supplied here do not describe breaking changes, deprecations or migration steps between 0.2.1 and 0.2.3. If you pin the package, pin it exactly and read the diff before moving, because an MCP tool surface is a contract with your assistant and a silent change to it changes what your model can do. Nothing in the material indicates a support channel beyond the repository's own Getting Help section.
Before you point it at a live account
Start on a demo server. The README's own example server name is MetaQuotes-Demo, and the prerequisite list explicitly allows a demo account, so there is no reason to begin anywhere else. Then verify the boundary rather than the feature list. Confirm the terminal path resolves, confirm algorithmic trading is enabled, and confirm which tools your client actually registered after connecting, because that list is what the model can invoke without asking you again. The natural-language examples in the README, "Buy 0.01 lots of EUR/USD" and "Close all profitable positions", are both order-mutating, and the second one requires the model to evaluate profitability across the account before acting. That is a fine demonstration and a poor default. If you keep this running against a funded account, the question to answer is not whether the bridge works. It is what stops an ambiguous sentence from becoming a filled position, and the project does not answer that for you.
Editorial conclusion
Adopt it if you already run MetaTrader 5 on Windows, you are comfortable with the terminal holding your credentials, and you want an MCP-native way to query account state and send orders from an assistant. Do not adopt it if you need a headless Linux deployment, if you want a backtesting or strategy framework, or if you are not prepared to supervise a model that can call order_send. Before connecting a live account, verify three things: that the --path argument points at your actual terminal64.exe, that algorithmic trading is enabled under Tools then Options then Expert Advisors, and that the tool list your client exposes is the one you expect, because the README's Available Operations section is the contract you are granting to the model.
Community notes