MetaTrader MCP Server

MetaTrader MCP Server is an MCP server that connects AI assistants to the MetaTrader 5 trading platform. It enables software developers, algorithmic traders, and market analysts to manage trades, monitor portfolios, and inspect financial markets using natural language. The server bridges large language models, including Claude and ChatGPT, directly to an active MetaTrader 5 terminal via standard stdio or remote Server-Sent Events transports. Through this connection, assistants can read real-time pricing data, access historical candlestick data across multiple timeframes, check account balances, evaluate equity and margin levels, and execute market transactions. Users can place, modify, or close positions, set stop-loss and take-profit thresholds, and cancel pending orders. Additionally, the project includes an HTTP API and a dedicated WebSocket streaming server for live tick data updates, allowing external monitoring tools or dashboards to observe market shifts alongside conversational AI control.

Category: Developer Tools & Code Intelligence

Tags: automation, finance, forex, metatrader, trading

Visit MetaTrader MCP Server

How to install and configure MetaTrader MCP Server

  1. Ensure Python 3.10+ and the MetaTrader 5 terminal are installed, and enable algorithmic trading in MetaTrader 5 under Tools > Options > Expert Advisors. 2. Install the package via pip: bash pip install metatrader-mcp-server 3. Configure Claude Desktop by editing claude_desktop_config.json (found at %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS). 4. Add the server entry under mcpServers: json { "mcpServers": { "metatrader": { "command": "metatrader-mcp-server", "args": [ "--login", "YOUR_MT5_LOGIN", "--password", "YOUR_MT5_PASSWORD", "--server", "YOUR_MT5_SERVER", "--transport", "stdio" ] } } } 5. Replace the login credentials with your MT5 account details and restart Claude Desktop.

What you can do with MetaTrader MCP Server

  • Executing buy and sell orders for forex pairs or financial instruments directly through natural language prompts. - Inspecting real-time account balances, margin requirements, equity changes, and ongoing trading statistics in conversational chats. - Setting and adjusting risk management parameters like stop-loss and take-profit targets on open MT5 positions. - Querying real-time market prices, symbol specifications, and historical candlestick chart patterns for immediate technical evaluation. - Closing specific trades or batch-closing all profitable active positions through automated LLM tool execution.

Key facts

  • Open Source
  • https://github.com/ariadng/metatrader-mcp-server
  • Developer Tools & Code Intelligence, Finance, Crypto & Payments
  • automation, finance, forex, metatrader, trading

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server β€” MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON β€” MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete β€” MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go β€” MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Manager β€” MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…
  • MCP Lab β€” MCP Lab is an MCP server development environment designed for building, testing, and debugging custom Model Context Protocol servers integrated…

How do I install MetaTrader MCP Server?

You can install the server using pip with the command pip install metatrader-mcp-server. You must also have Python 3.10 or higher, an active MetaTrader 5 desktop terminal with algorithmic trading enabled, and valid MT5 trading account credentials including your login, password, and broker server name.

What can MetaTrader MCP Server do?

The server allows AI assistants to interact directly with MetaTrader 5. It provides tools for placing market orders, managing pending orders, modifying stop-loss and take-profit levels, closing open positions, fetching symbol information, and streaming live tick quotes via a companion WebSocket server.

Which MCP clients work with MetaTrader MCP Server?

It works natively with Claude Desktop via stdio transport and Claude Code via custom skill definitions. It also supports remote SSE connections for distributed setups and provides an HTTP server compatible with Open WebUI for tools integration with ChatGPT and other LLMs.

Is MetaTrader MCP Server open source?

Yes, MetaTrader MCP Server is open source software distributed under the MIT license. You can inspect the source code, contribute features, and review documentation on its GitHub repository.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories