What to check
- Check what you are running:
python -c "import sys, platform; print(sys.platform, platform.machine())". The package's wheels are for Windows on x86-64, which prints win32 and AMD64. - The route the forum thread gives: Windows Python, next to a MetaTrader 5 terminal. On a Mac or a Linux machine that means a Windows environment of some kind; a separate Windows machine or virtual machine is the plain case.
- A community route: psyb0t/mt5-httpapi runs the Windows only terminal in Docker or QEMU and puts REST and MCP in front of it. Community code under the WTFPL licence, and we have not checked how it handles credentials.
- If all you need is your trade history, you may not need Python at all: MetaTrader 4 and 5 trade history, no code.
Step 2 is what the thread reports. Steps 1, 3 and 4 are ours.
Next steps for this error
- Every MetaTrader 5 endpoint No single endpoint is named for this error on this site.
- MetaTrader 5 quickstart
Why it happens
The package is a bridge to the MetaTrader 5 terminal, which it reaches by interprocess communication on the same machine, and it is published for win32 and win_amd64 (Windows) only. So it is not only a question of whether Python installs: the terminal it talks to has to be running there too.
Tools built on top of MetaTrader 5 meet the same wall. The community metatrader-mcp-server tracker carries reports from Linux and macOS users running without a terminal (#29 and #32).
Questions
Can I pip install MetaTrader5 on macOS?
Not natively. PyPI publishes the package, 5.0.6231 of 27 Sep 2026 when we read it, as wheels for win32 and win_amd64 only, so pip on macOS has no build to install.
Does the MetaTrader5 Python package work on Linux?
Not as a Linux package. The MQL5 forum answer of 22 Jan 2025 is that Linux and Mac users need Windows Python, and the package also needs a running MetaTrader 5 terminal to connect to.
Why does an MT5 MCP server fail on my Mac?
The community metatrader-mcp-server has reports from Linux and macOS users running without a terminal (#29 and #32). Whichever server you use, it needs a MetaTrader 5 terminal it can reach.
Is there a Docker image for MetaTrader 5?
One community project we list, psyb0t/mt5-httpapi, runs the terminal in Docker or QEMU with REST and MCP in front. It is not MetaQuotes' own, and we have not checked how it handles credentials.
Sources
- MQL5 forum: issue regarding python integration with metaTrader5posted 22 Jan 2025, checked 21 Sep 2026
- PyPI: MetaTrader5checked 21 Sep 2026
- GitHub: metatrader-mcp-server issues #25 to #4910 May to 4 Sep 2026, checked 21 Sep 2026
- MQL5 docs: MetaTrader for Pythonchecked 20 Sep 2026