If you’ve opened MetaTrader 5 and seen a bind error on 127.0.0.1:22346, it’s almost always caused by MT5’s built-in MCP (Model Context Protocol) server — a feature added as part of MT5’s AI integration that lets AI agents connect to your terminal. When multiple MT5 terminals try to run this server at the same time, they compete for the same local port and throw a bind error.
This guide shows you exactly how to disable the internal MCP server in MT5, step by step, and explains what it does (and doesn’t) affect.
What Causes the 127.0.0.1:22346 Bind Error?
MT5’s internal MCP server listens locally at:
https://127.0.0.1:22346/mcp
If you run more than one MT5 terminal on the same machine — a common setup for traders using a Local Trade Copier or managing multiple accounts — each terminal tries to bind to this same port. Only one can succeed, and the others log a bind error referencing 127.0.0.1:22346.
The fix is to disable the MCP server in every terminal that doesn’t specifically need AI agent access.
How to Disable the Internal MCP Server in MT5
STEP 1:
Follow these steps in each MT5 terminal where AI access isn’t required:
Open Tools → Options

STEP 2:
Select the MCP tab.
Untick “Enable internal server.” This is the exact option name shown on MT5’s official settings screen.
Click OK to save the change.

STEP 3:
Restart the MT5 terminal for the change to take effect.
Once restarted, that terminal will no longer attempt to open a listener on port 22346, which resolves the bind conflict.
Additional information:
Managing Multiple MT5 Terminals
If you run several MT5 terminals on one machine, the recommended setup is:
- Leave Enable internal server turned on only in the terminal(s) that actually need AI agent access.
- Disable it in every other terminal.
This prevents the terminals from competing for port 22346 and eliminates the bind error going forward.


