MT5 build 6296 — Built-in MCP server returns HTTP 401 with Bearer authentication
Did you try (for the MCP) ?
Forum on trading, automated trading systems and testing trading strategies
MetaTrader 5 build 6140 - MCP internal server returns 401 Unauthorized with generated API key
Alain Verleyen, 2026.10.19 14:16
- Delete the key (let it empty).
- Save (Ok button).
- Restart the terminal.
- Wait for the MQL5 account to be authorized
- The new API key will be downloaded automatically.
Hello MetaQuotes team and MQL5 community,
I am experiencing persistent HTTP 401 Unauthorized responses from the built-in MetaTrader 5 MCP server.
Environment
Verified observations
These independent HTTP results indicate that the authentication failure is reproducible outside Codex. Similar symptoms were reported for earlier builds in this MQL5 forum discussion.
Could you confirm whether build 6296 has a known authentication issue involving generated MCP keys? Does the local server require anything beyond the documented Bearer header? Please advise on a verified remedy that preserves the existing terminal configuration.
No trading operations or security-lock changes were performed during diagnosis. Sanitized results can be provided; API keys and account credentials will not be shared.
Kind regards
Mehmet Cakar