</>MCP Agents Market
MCP Server

metatrader-mcp-server

by ariadng807PythonUpdated 2026-03-28

Model Context Protocol (MCP) to enable AI LLMs to trade using MetaTrader platform

Claude DesktopClaude CodeChatGPT

The MetaTrader MCP Server connects AI assistants like Claude and ChatGPT to the MetaTrader 5 trading platform, enabling natural language trading commands. Developers can execute trades, retrieve market data, manage positions, and access account information by simply conversing with their AI assistant. The server supports multiple interfaces including stdio for Claude Desktop, HTTP/REST API for Open WebUI and custom integrations, and WebSocket for real-time tick streaming. It provides 32 trading operations covering account management, market data retrieval, order execution, position management, and historical analysis.

Key Features

Natural language trading through AI assistants—execute trades, check balances, and manage positions via conversation
Multiple transport modes: stdio for Claude Desktop, SSE for remote connections, HTTP REST API, and WebSocket quote streaming
Complete MT5 integration with 32 operations covering market data, order placement, position management, and account statistics
Real-time WebSocket quote server streams bid/ask/spread/volume updates with change detection and multi-client support
Pre-built Trading Terminal Assistant skill for Claude Code with direct execution, workflows, and terminal-style formatting
Secure local operation—credentials remain on your machine with optional environment variable configuration
Cross-platform Python library (3.10+) with connection retry logic, automatic MT5 path detection, and comprehensive error handling
Works with Claude Desktop, Claude Code, ChatGPT (via Open WebUI), and any MCP-compatible client

Use Cases

  • 01Automate trading strategies by instructing AI assistants to execute trades based on natural language rules
  • 02Build algorithmic trading bots that leverage LLM decision-making combined with MT5 execution
  • 03Create live trading dashboards using the WebSocket quote server for real-time price monitoring
  • 04Perform quick market analysis by asking AI for historical candles, symbol info, and current prices
  • 05Manage trading positions hands-free—close profitable trades, modify stop losses, or cancel pending orders via chat
  • 06Develop custom trading tools using the Python client library for programmatic MT5 access

Related MCP Servers

View more

metatrader-mcp-server — FAQ

What is the MetaTrader MCP Server?+

It's an MCP server that bridges AI assistants (Claude, ChatGPT) to the MetaTrader 5 trading platform, allowing you to execute trades, retrieve market data, and manage positions using natural language commands.

How do I install the MetaTrader MCP Server for Claude Desktop?+

Install via pip with 'pip install metatrader-mcp-server', then add a configuration block to your Claude Desktop config JSON (claude_desktop_config.json) specifying the command 'metatrader-mcp-server' with your MT5 login, password, server, and '--transport stdio' arguments. Restart Claude Desktop to activate.

Which AI clients work with this MCP server?+

It works with Claude Desktop (stdio), Claude Code (SSE remote), ChatGPT and other LLMs via Open WebUI (HTTP API), and any MCP-compatible client that supports stdio or SSE transports.

What are the prerequisites for using this server?+

You need Python 3.10 or higher, the MetaTrader 5 terminal installed and running, a demo or live MT5 account with login/password/server credentials, and algorithmic trading enabled in MT5's Expert Advisors settings.

Is the MetaTrader MCP Server free to use?+

Yes, it's open-source under the MIT license and available for free on PyPI and GitHub. However, you are responsible for any trading outcomes, and the software comes with no liability for losses or gains.

Does this server require API keys?+

No external API keys are needed. You only need your existing MetaTrader 5 account credentials (login number, password, and server name) to connect the server to your MT5 terminal.

How do I install metatrader-mcp-server?+

Open the source repository on GitHub and follow its README. metatrader-mcp-server is a mcp server — MCP Agents Market links you directly to the official repo.

Is metatrader-mcp-server free?+

metatrader-mcp-server is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches