Metatrader MCP Server logo

Metatrader MCP Server

by ariadng

Connects AI assistants to MetaTrader 5 for account queries, market data, order management, and trade execution.

Install Metatrader MCP Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "ariadng-metatrader-mcp-server": {
      "command": "uvx",
      "args": [
        "metatrader-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio ariadng-metatrader-mcp-server -- uvx metatrader-mcp-server

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

uvx metatrader-mcp-server

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

ariadng/metatrader-mcp-server MCP server connects AI assistants to a MetaTrader 5 terminal through MCP. It supports account information, market data, and order operations, including placing, modifying, and closing trades. Run it locally over stdio, expose it through SSE or HTTP, or use its WebSocket quote service for live tick data. Reach for it when an AI assistant needs controlled access to a demo or live MT5 trading account.

Use cases

  • Check MetaTrader 5 account balances and margin with an AI assistant
  • Retrieve live prices and historical market data
  • Place, modify, or close MT5 orders using natural language
  • Stream tick data to a dashboard or monitoring bot

Key features

  • MetaTrader 5 account access
  • Market prices and historical data
  • Order placement and management
  • Local stdio and remote SSE modes
  • HTTP interface for Open WebUI
  • WebSocket live quote streaming

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

36/36 checks healthy over the last 117d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · metatrader-mcp-server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars865Stargazers on the source repository.
Last commit8mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Metatrader MCP Server works

What ariadng/metatrader-mcp-server MCP server does

ariadng/metatrader-mcp-server MCP server provides an interface between AI assistants and MetaTrader 5. It lets an assistant retrieve account details, inspect market information, and send trading operations to an MT5 terminal. Supported use cases include checking balance and equity, reading prices and historical data, placing orders, changing existing orders, and closing positions.

The package is intended for traders, developers building trading bots or analysis tools, and analysts who need programmatic access to MT5 data. It can work with a demo or live trading account, but all trades remain the responsibility of the operator. The project explicitly warns that financial trading carries a significant risk of loss and that the software is not financial advice.

How it works

The basic flow is an AI assistant communicating with the MCP server, which then communicates with the MetaTrader 5 terminal and account. The repository includes a trading assistant skill for Claude Code and Claude Desktop. That skill supplies structured knowledge about the 32 trading tools, output formatting, and MetaTrader 5 concepts.

Three connection styles are documented. Local Claude Desktop usage runs the MCP process through stdio. A remote deployment can run an SSE server on a Windows VPS where MT5 is installed, allowing a client to connect through an HTTP URL. The package also provides an HTTP server for Open WebUI and a separate WebSocket service that streams quote updates containing bid, ask, spread, and volume.

Setup and configuration

Python 3.10 or newer, the MetaTrader 5 terminal, and an MT5 account are required. Account configuration uses a login number, password, and server name. Before trading, algorithmic trading must be enabled in MetaTrader 5 under Tools, Options, and Expert Advisors.

Install the package with pip install metatrader-mcp-server. The MCP command accepts the account credentials, transport selection, host, and port as command-line options. A custom --path option is available when the MT5 terminal is installed outside its usual location.

For local Claude Desktop use, add the command and its arguments to the client configuration, then restart Claude Desktop. The HTTP mode can be started with metatrader-http-server and inspected through its /docs endpoint. The quote service uses metatrader-quote-server and listens for WebSocket connections on port 8765 by default. The remote MCP mode uses port 8080 by default and exposes an /sse endpoint.

The SSE protocol does not provide authentication. Network deployments should therefore restrict access with a firewall, use an authenticated reverse proxy, or connect through an SSH tunnel.

Tools and capabilities

The documented tool set covers:

  • Reading account balance, equity, margin, and trading statistics.
  • Retrieving real-time prices, historical data, and symbol information.
  • Placing new trades and managing existing orders.
  • Modifying orders and closing positions, including requests such as closing profitable positions.
  • Streaming live tick data through WebSocket for dashboards, bots, or monitoring systems.

The included Claude skill can be installed by symlink or by copying its files into the relevant Claude skills directory. Its documented behavior includes direct trade execution without an additional confirmation step, so deployment and assistant instructions should be reviewed carefully before connecting a live account.

Limitations and notes

The integration depends on a running MetaTrader 5 terminal and valid account credentials.

Credentials are passed through command-line configuration in the documented examples, and the project states that credentials remain on the local machine. Remote exposure requires additional network controls because MCP itself does not authenticate clients. Finally, automated trading can produce financial losses; users are responsible for every trade and outcome made through the system.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Metatrader MCP Server

ariadng/metatrader-mcp-server is an MCP server that connects AI assistants to the MetaTrader 5 platform. Its main tools provide account information, market prices and historical data, symbol details, and order operations such as placing, modifying, and closing trades. It also includes HTTP, SSE, and WebSocket interfaces.

Install it with `pip install metatrader-mcp-server`, then provide your MT5 login, password, and server name when starting the relevant command. You also need Python 3.10 or newer, an installed MetaTrader 5 terminal, and algorithmic trading enabled in MT5.

Yes, it works with Claude Desktop through a local stdio configuration or a remote SSE URL. Add the MCP command and MT5 credentials to Claude Desktop's configuration, or point the client at the remote server's `/sse` endpoint, then restart the application.

Yes, use the HTTP interface with Open WebUI. Start `metatrader-http-server`, open its `/docs` page to inspect the API, and add the server URL under Open WebUI Settings and Tools. The documented setup uses a local address and port 8000.

Start `metatrader-quote-server` with the MT5 credentials, then connect a WebSocket client to the server, which listens on port 8765 by default. The stream sends JSON tick updates containing bid, ask, spread, and volume after a connected message.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMetatrader MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/ariadng-metatrader-mcp-server?style=directory)](https://allmcps.com/mcp/ariadng-metatrader-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/ariadng-metatrader-mcp-server"><img src="https://allmcps.com/api/badge/ariadng-metatrader-mcp-server?style=directory" alt="Metatrader MCP Server on AllMCPs" /></a>