# MT5-Quant

Run MT5 backtests and inspect MQL5 Expert Advisor results through an MCP server. It can help trace drawdowns and examine individual deals on macOS or Linux.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 46
- Author: masdevid
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/masdevid/mt5-quant
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/mt5-quant

## What it does

MT5-Quant connects an agent to workflows for compiling Expert Advisors, running tests and analyzing reports. It can inspect drawdown events, losing streaks and deal-level performance. For optimization, it starts a genetic run and parses the results afterward.

The server can filter deals by attributes such as type, volume and date, and search comments or EA magic numbers. Reports and deals are organized in SQLite, and a report can be compared with a baseline. The setup relies on Wine and MT5 paths, so those need to be available for the server to detect.

Cargo installation requires a Rust toolchain. After installing, register the server with Claude Code and run `scripts/setup.sh`. Prebuilt binaries are also listed for macOS Apple Silicon and Linux x64.

## Requirements
- Environment variables: `MT5_MCP_HOME` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- compile an MQL5 Expert Advisor
- run a backtest and inspect its report
- trace drawdown events and losing streaks
- compare a test report against a baseline
- parse genetic optimization results

## Example prompts
- Backtest `MyEA` from January through March and investigate the February drawdown.
- Compare the latest report with the baseline and identify the better result.
- Break down `MyEA` deals by holding time and volume.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
