A Model Context Protocol (MCP) server for MetaTrader 5, specifically adapted for ChatGPT Desktop integration. This fork enables ChatGPT to interact with the MetaTrader 5 platform for trading and market data analysis via HTTP transport and ngrok tunneling.
Based on: mcp-metatrader5-server by Abdul Qoyyuum Focus: ChatGPT Desktop integration with HTTP/ngrok support
- Connect to MetaTrader 5 terminal
- Access market data (symbols, rates, ticks)
- Place and manage trades
- Analyze trading history
- Integrate with AI assistants through the Model Context Protocol
uvx --from mcp-metatrader5-server mt5mcpgit clone https://github.com/jorgearturoyap-debug/metatrader-5-for-Chatgpt-Desktop.git
cd metatrader-5-for-Chatgpt-Desktop
uv sync
uv run mt5mcp- ChatGPT Plus subscription or higher (Free tier doesn't support MCP)
- ChatGPT Desktop application (latest version)
- ngrok for tunneling: https://ngrok.com/download
- uv package manager (recommended) or pip
- Python 3.11 or higher
- MetaTrader 5 terminal installed on Windows
- MetaTrader 5 account (demo or real)
See CHATGPT_SETUP.md for detailed step-by-step setup instructions.
TL;DR:
- Clone this repo and install dependencies:
uv sync - Configure your MT5 credentials in
.envfile - Run
start_chatgpt.batto start the server with ngrok - Copy the ngrok HTTPS URL
- Add the connector in ChatGPT Desktop settings
- Start trading with ChatGPT!
This fork includes:
- ✅ HTTP transport support for ChatGPT Desktop (via ngrok)
- ✅ Automated startup script (
start_chatgpt.bat) that handles server + ngrok - ✅ ChatGPT-specific documentation and setup guides
- ✅ Pre-configured for HTTP mode in
fastmcp.json - ✅ Spanish language support in setup guides
This project is based on the excellent work by Abdul Qoyyuum (Qoyyuum) in the original mcp-metatrader5-server repository. All core MT5 functionality and MCP implementation credit goes to the original author.
Special thanks to all contributors who have helped improve this project in the private development repository before its public release.
Important Note: This adaptation was created entirely using AI-assisted development tools. The maintainer (jorgearturoyap-debug) is not a professional programmer. All code, documentation, and improvements were developed with the assistance of:
- Claude Code CLI - AI-powered coding assistant by Anthropic
- GitHub Codex CLI - AI-powered code completion and generation
This project demonstrates how AI tools can empower non-programmers to adapt and customize complex software for specific use cases (ChatGPT Desktop integration in this case).
This project inherits the license from the original mcp-metatrader5-server repository. Please see the original repository for license details.