MetaTrader MCP Server

MetaTrader MCP Server

By ariadng GitHub

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

Overview

what is MetaTrader MCP Server?

MetaTrader MCP Server is a Model Context Protocol (MCP) server built with Python that enables AI LLMs to trade using the MetaTrader platform.

how to use MetaTrader MCP Server?

To use the MetaTrader MCP Server, install the package using pip, connect to the MetaTrader 5 terminal, and utilize the provided MCP tools to manage trading operations.

key features of MetaTrader MCP Server?

  • Access to account information such as balance and equity.
  • Retrieve market symbol information and current prices.
  • Execute, modify, and close trade orders.
  • Access historical price data and statistics of executed orders.

use cases of MetaTrader MCP Server?

  1. Automating trading strategies using AI LLMs.
  2. Analyzing market trends and making informed trading decisions.
  3. Managing multiple trading accounts efficiently.

FAQ from MetaTrader MCP Server?

  • Can I use this server with any trading strategy?

Yes! The server is designed to work with various trading strategies implemented through AI LLMs.

  • Is there a cost to use the MetaTrader MCP Server?

The server is open-source and free to use under the MIT license.

  • What programming language is used for the server?

The server is built using Python.

Content

MetaTrader MCP Server

This is a Model Context Protocol (MCP) server built with Python to enable AI LLMs to trade using MetaTrader platform.

Updates

  • April 16, 2025: We have our first minor version release (0.1.0) 🎉🎉🎉

Project Roadmap

For full version checklist, see version-checklist.md.

TaskStatusDoneTested
Connect to MetaTrader 5 terminalFinished
Develop MetaTrader client moduleFinished
Develop MCP Server moduleOn progress...--
Implement MCP tools---
Windsurf integration---
Claude Desktop integration---
Publish to PyPi---

Documentation

For developers, see Developer's Documentation.

Development Instructions

Creating Virtual Environment

uv venv

Then, you need to enable the environment in the Terminal.

Linux or macOS:

source .venv/bin/activate

Windows (PowerShell):

.venv\Scripts\Activate.ps1

Installing Package

uv pip install -e .

Building Package

python -m build

The build result will be in dist/ folder.

Testing

To run the test suite and generate a comprehensive Markdown report:

pytest -s tests

Test reports will be saved in tests/reports/ with a timestamped filename.

Publishing to Test PyPI

twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Enter credentials when required.

No tools information available.
No content found.