StackMap
Subscribe
Explore / metatrader-mcp-server
ariadng

metatrader-mcp-server

MCP server that puts MetaTrader 5 in an LLM's hands — natural-language trading, account and market data, order management over stdio/SSE, plus REST and WebSocket quotes. 32 tools, MIT.

643 216 Python MITupdated 3 months ago
Curator's take

The shortest path from 'Claude, close all profitable positions' to it actually happening: pip install, point Claude Desktop/Code at it — or run the SSE server on the Windows VPS where MT5 lives — and the bundled /trading skill teaches the agent all 32 tools plus MT5 domain conventions. Treat it like a loaded weapon: the MCP layer has NO authentication (firewall it, tunnel it, or keep it on localhost), MT5 is Windows-only, and an LLM with live order-execution powers is a risk decision, not a convenience — start on a demo account and read the repo's own disclaimer. NOT a strategy or an analysis engine; it's the broker bridge — the hands, not the brain.

Mapped by ShipWithAI editors · links verified
README.md

MetaTrader MCP Server


PyPI version Python 3.10+ License: MIT

Let AI assistants trade for you using natural language

MetaTrader MCP Server



📑 Table of Contents


🌟 What is This?

MetaTrader MCP Server is a bridge that connects AI assistants (like Claude, ChatGPT) to the MetaTrader 5 trading platform. Instead of clicking buttons, you can simply tell your AI assistant what to do:

"Show me my account balance" "Buy 0.01 lots of EUR/USD" "Close all profitable positions"

The AI understands your request and executes it on MetaTrader 5 automatically.

How It Works

You → AI Assistant → MCP Server → MetaTrader 5 → Your Trades

✨ Features

  • 🗣️ Natural Language Trading - Talk to AI in plain English to execute trades
  • 🤖 Multi-AI Support - Works with Claude Desktop, ChatGPT (via Open WebUI), and more
  • 📊 Full Market Access - Get real-time prices, historical data, and symbol information
  • 💼 Complete Account Control - Check balance, equity, margin, and trading statistics
  • ⚡ Order Management - Place, modify, and close orders with simple commands
  • 🔒 Secure - All credentials stay on your machine
  • 🌐 Flexible Interfaces - Use as MCP server, REST API, or WebSocket stream
  • 📖 Well Documented - Comprehensive guides and examples

🎯 Who Is This For?

  • Traders who want to automate their trading using AI
  • Developers building trading bots or analysis tools
  • Analysts who need quick access to market data
  • Anyone interested in combining AI with financial markets

⚠️ Important Disclaimer

Please read this carefully:

Trading financial instruments involves significant risk of loss. This software is provided as-is, and the developers accept no liability for any trading losses, gains, or consequences of using this software.

By using this software, you acknowledge that:

  • You understand the risks of financial trading
  • You are responsible for all trades executed through this system
  • You will not hold the developers liable for any outcomes
  • You are using this software at your own risk

This is not financial advice. Always trade responsibly.


📋 Prerequisites

Before you begin, make sure you have:

  1. Python 3.10 or higher - Download here
  2. MetaTrader 5 terminal - Download here
  3. MT5 Trading Account - Demo or live account credentials
    • Login number
    • Password
    • Server name (e.g., "MetaQuotes-Demo")

🚀 Quick Start

Step 1: Install the Package

Open your terminal or command prompt and run:

pip install metatrader-mcp-server

Step 2: Enable Algorithmic Trading

  1. Open MetaTrader 5
  2. Go to ToolsOptions
  3. Click the Expert Advisors tab
  4. Check the box for Allow algorithmic trading
  5. Cl

Continue your stack

What teams reach for next — and why each earns a place beside metatrader-mcp-server. Ranked by curator confidence.