Metatrader 4 MCP Server

MCP server for MetaTrader 4 integration

Local serverstdioTypeScript

What is the Metatrader 4 MCP Server?

MCP server for MetaTrader 4 integration

The short version

A Model Context Protocol (MCP) server that provides cross-platform integration with MetaTrader 4 trading platform over network.

  • Account Information — Get real-time account details (balance, equity, margin, etc.)
  • Market Data — Retrieve current market prices for trading symbols
  • Order Management — Place market and pending orders
  • Position Management — View and close open positions
  • Trading History — Access historical trading data
  • Backtesting — Run backtests on Expert Advisors with detailed configuration

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Metatrader 4 MCP Server

{
  "mcpServers": {
    "mt4-server": {
      "command": "node",
      "args": [
        "dist/index.js"
      ],
      "env": {
        "MT4_HOST": "192.168.50.161",
        "MT4_PORT": "8080"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
MT4_HOSTDeclared in the maintainer’s client configuration.Check documentation
MT4_PORTDeclared in the maintainer’s client configuration.Check documentation

Frequently asked questions

MCP server for MetaTrader 4 integration Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.