MetaTrader 5 MCP Server

MetaTrader 5 MCP Server

metatrader-mcp•bychymian

An MCP server providing a unified interface for MetaTrader 5 trading operations, optimization runs, and result retrieval.

License: Not specified•Runtime: Awaiting documentation review•Category: finance crypto

WHAT IT DOES

  • •Exposes trading operations through MCP tools such as getting account info and creating orders.
  • •Provides optimization operations including running optimizations, checking status, retrieving results, and saving results.
  • •Interfaces with a Flask REST API that handles EA optimization runs and result storage.
  • •Saves optimization results as HTML and Markdown reports for each EA.

BEST FOR

  • •Triggering MetaTrader 5 EA optimizations and generating reports via an MCP interface.
  • •Managing trading operations like account info and order creation through MCP tools.

ABOUT METATRADER-MCP

MetaTrader 5 MCP Server is cataloged as an MCP server attributed to chymian. An MCP server providing a unified interface for MetaTrader 5 trading operations, optimization runs, and result retrieval. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MetaTrader 5 MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What trading and optimization tools does the MCP server expose?

It exposes trading operations such as get_account_info and create_order, plus optimization operations like run_optimization, get_optimization_status, get_optimization_results, and save_optimization_results.

Upstream README

View this exact version on GitHub

README.md · 07599b14313b · Fetched 2026-11-13 09:53:00 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

MetaTrader 5 MCP Server & Distrobox Automation

This project provides a fully automated workflow for running, optimizing, and documenting MetaTrader 5 (MT5) Expert Advisors (EAs) using a Distrobox container, a Flask REST API, and an MCP server.


Features

  • MetaTrader 5 in Wine/Distrobox: Automated setup and launch.
  • Flask REST API: Programmatic optimization of EAs, with endpoints for running, monitoring, and saving results.
  • MCP Server: Unified interface for trading, optimization, and result retrieval.
  • Automated Documentation: Optimization results are saved as clear HTML and Markdown reports for each EA.
  • Git Version Control: All code and configuration are versioned from the start.

Quickstart

1. Distrobox Container Setup

To assemble and enter the Distrobox container, run the following commands from the project root:

distrobox-assemble create --file src/mt5.ini -R
distrobox-enter mt5
  • See src/mt5.ini for a complete, automated Distrobox config.
  • On container creation, the following are installed and configured:
    • Wine, MT5, Python3, pip, Flask, MetaTrader5, pandas, jinja2, git, and all required tools.
    • The Flask API is started automatically.
    • A git repository is initialized and all files are committed.

2. Flask REST API

  • Located at src/mt5_flask_api.py.
  • The API is accessible from the host at http://localhost:5000 (port 5000 is published by default; see src/mt5.ini).
  • Example: test the API from your host system with:
    curl http://localhost:5000/optimization_status/some-id
    
  • Endpoints:
    • POST /optimize: Start an optimization run.
    • GET /optimization_status/<id>: Check optimization status.
    • GET /optimization_results/<id>: Get results.
    • POST /save_results: Save results as HTML/Markdown/CSV/JSON.
  • Results are saved to ~/mt5-dev/result/manual/tuning/<EA_NAME>_tuning.html and .md.

3. MCP Server

  • See src/mt5-server.ts for the MCP server implementation.
  • Tools include:
    • Trading operations (get_account_info, create_order, etc.)
    • Optimization operations (run_optimization, get_optimization_status, get_optimization_results, save_optimization_results)

4. Usage Example

  • Start the container (Distrobox will run all setup and start the Flask API).
  • Use the MCP server to trigger optimizations and generate reports.
  • Open the HTML/Markdown reports in ~/mt5-dev/result/manual/tuning/ for a clear overview.

Working Directory & Configuration

By default, all logs, data, results, and outputs are stored in ~/mt5-dev for portability and consistency.
To override any configuration value for your local development, copy src/mt5.ini to src/mt5-dev.ini and customize as needed.
The src/mt5-dev.ini file is ignored by git and will not be tracked or pushed.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MetaTrader 5 MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/metatrader-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related finance crypto MCP Servers

Alternative and complementary servers in the same category

View all in finance crypto →
USA Spending MCP Server
usaspending-mcp-server•thsmale

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

Repository stats unavailable
Finance & Analytics
Fortnox MCP server — More AI
more-ai-chatgpt-claude-mcp-fortnox•amor3

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

0
Finance & Analytics

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.

Repository stats unavailable
Finance & Analytics