Native Windows MCP server for MetaTrader 5 backtesting, Market Watch, calendar data, and analytics.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Native Windows MCP server for MetaTrader 5 strategy development. Compile, backtest, analyze, optimize, debug, manage Market Watch, and build static economic-calendar datasets through 96 MCP toolsβwithout Wine, WSL, or runtime GUI automation.
The repository, Rust crate, executable, MCP registration examples, and Agent Skill identifiers all use the mt5-mcp-quant / mt5_mcp_quant project identity.
Focus: Backtest organization, reporting, and analytics β capabilities MT5 itself doesn't provide.
| MT5-MCP-Quant | Others | |
|---|---|---|
| Platform | Native Windows | Windows integrations |
| Backtest pipeline | β Full (compile β run β analyze) | β Via MT5 Python package |
| Deal-level analytics | β 19 dimensions, DB-backed | β |
| Report organization | β SQLite (reports + deals) + search + history | β |
| MQL5 compilation | β MetaEditor CLI | β οΈ Via GUI or terminal |
| Optimization | β Background + results parsing + .set generation | β οΈ Terminal only, no parsing |
| Crash debugging | β Native process, log, and resource diagnostics | β |
Unlike integrations centered on the MetaTrader5 Python trading API, MT5-MCP-Quant focuses on Strategy Tester automation, report organization, deal-level insight, and optimization workflows.
.exe?No, not during normal use. MT5-MCP-Quant is a native Windows MCP server, so the MCP client must start a Windows process in the background. That process is technically an .exe, but it is a one-time installation detail:
cargo run does not remove the executable; Rust still builds one internally and makes every MCP startup slower. A registered release build is the recommended runtime.In short: the runtime needs an executable, but the user should not have to manage it.
Each Windows release publishes two equivalent, checksummed artifacts:
mt5-mcp-quant-windows-x64.mcpb is the installable Windows MCP Bundle referenced by the MCP Registry.mcp-mt5-mcp-quant-windows-x64.tar.gz is the portable archive for agents and manual installation.Both contain the binary, configuration example, documentation, PowerShell installers, all ten MT5 skills, auditable MQL sources, README, changelog, and license. crates.io publishing is intentionally out of scope.
Give this prompt to Codex, Claude Code, OpenCode, or Hermes from the repository directory:
Install and configure MT5-MCP-Quant on this Windows computer. Prefer the official pre-built Windows x64 release; build from source only when needed. Detect MT5 with
scripts/setup.ps1, register the server asmt5_mcp_quantover stdio, install the Agent Skills for this client, and verify thathealthcheckworks and exactly 96 tools are available. Do not ask me to launch the binary manually.
The agent should complete the whole one-time setup:
powershell -ExecutionPolicy Bypass -File scripts\setup.ps1 to detect the MT5 program and data directories.--stdio in the client's MCP configuration.scripts\install-agent-skills.ps1.MT5McpQuantBridge Service and ask the user to start it once from MT5 Navigator β Services β MT5-MCP-Quant.The stored binary path is an internal runtime setting after step 3. Normal users should not need to remember, open, or pass that path in prompts.
Install the router and nine workflow skills for Codex, Claude Code, OpenCode, and Hermes:
Users can then write a vague prompt such as βMT5 MCP'yi kullan ve EA'me bak.β The router performs safe discovery and selects the appropriate workflow without requiring a tool name. See Agent Skills.
The router starts with read-only orientation checks: MCP health, active account, available EAs, and the latest report. It then chooses setup, MQL development, set-file management, backtesting, optimization, calendar data, reporting, analytics, or recovery. When two materially different goals remain possible, it asks one outcome-level question instead of asking the user to choose an MCP tool.
The AI runs the full pipeline: compile β clean cache β backtest β extract β analyze.
| Tool | Description |
|---|---|
run_backtest | Full pipeline: compile β clean β backtest β extract β analyze |
run_backtest_quick | Async quick backtest using pre-compiled EA; poll status |
run_backtest_only | Async raw backtest without compile/analysis; poll status |
launch_backtest | Fire-and-forget: launch MT5 backtest, poll for completion |
get_backtest_status | Poll running backtest status (MT5 running, report found, elapsed time) |
run_optimization | Genetic optimization (background, returns immediately) |
get_optimization_results | Parse optimization results after MT5 finishes |
list_jobs | List all optimization jobs with status |
analyze_report | Read analysis.json from any report directory |
compare_baseline | Compare report vs baseline, return winner/loser verdict |
compile_ea | Compile MQL5 EA via MetaEditor |
list_experts | List all EAs in MQL5/Experts directory |
list_indicators | List all indicators in MQL5/Indicators directory |
list_scripts | List all scripts in MQL5/Scripts directory |
healthcheck | Quick server health check |
list_symbols | List symbols with local Strategy Tester history |
| Tool | Description |
|---|---|
ensure_market_watch_symbol | Resolve broker suffix/prefix aliases without guessing, select the exact symbol, and verify Market Watch visibility |
prepare_calendar_export | Create an idempotent asynchronous export job against the active broker's live MT5 calendar |
inspect_calendar_export | Poll job state, progress, row count, coverage, validation, and machine-readable errors |
prepare_calendar_backtest_dataset | Publish a validated CSV v1 dataset and checksum manifest for Strategy Tester EAs |
The embedded MT5McpQuantBridge MQL5 Service is optional for the original 92 tools and required only for broker-catalog/Market Watch and live-calendar operations. Start it once from MT5 Navigator; unlike the earlier proposal, calendar export does not require running a new Script for every export.
| Tool | Description |
|---|---|
analyze_monthly_pnl | Monthly P/L breakdown only |
analyze_drawdown_events | Drawdown events and causes only |
analyze_top_losses | Worst losing deals only |
analyze_loss_sequences | Consecutive loss patterns only |
analyze_position_pairs | Position hold time and P/L pairs |
analyze_direction_bias | Buy vs Sell performance |
analyze_streaks | Win/loss streak analysis |
analyze_concurrent_peak | Peak simultaneous positions |
Use these for targeted analysis, or analyze_report to run all at once.
| Tool | Description |
|---|---|
list_deals | List individual deals with filters (type, profit range, volume, dates) |
search_deals_by_comment | Full-text search in deal comments (e.g., "Layer #3") |
search_deals_by_magic | Filter deals by EA magic number |
analyze_profit_distribution | Profit histogram: small/medium/large wins and losses |
analyze_time_performance | Performance by hour of day and day of week |
analyze_hold_time_distribution | Hold time buckets + correlation with profit |
analyze_layer_performance | Grid/martingale layer analysis from comments |
analyze_volume_vs_profit | Volume correlation + performance by lot size |
analyze_costs | Commission and swap impact on profitability |
analyze_efficiency | Profit per hour/day, annualized return, trade frequency |
| Tool | Description |
|---|---|
verify_setup | Check native MT5 program/data paths and EA/set file inventory |
get_optimization_status | Check live state of a background optimization job |
list_jobs | All optimization jobs with compact status in one call |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mt5-mcp-quant)<a href="https://allmcps.com/mcp/mt5-mcp-quant"><img src="https://allmcps.com/api/badge/mt5-mcp-quant?style=directory" alt="MT5 MCP Quant on AllMCPs" /></a>