# MT5-Quant MCP server

> Enables AI clients to compile, backtest, optimize, and perform deep deal-level analytics on MQL5 Expert Advisors on macOS and Linux.

- Repository: https://github.com/masdevid/mt5-quant
- Page: https://hostedmcp.org/servers/masdevid/mt5-quant
- Transport: stdio
- Stars: 52
- License: MIT
- Latest version: 1.34.3

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `MT5_MCP_HOME` | no | no | Path to MT5-Quant config directory (default: ~/.config/mt5-quant) |

## Tools (89)

- `run_backtest`
- `run_backtest_quick`
- `run_backtest_only`
- `launch_backtest`
- `get_backtest_status`
- `run_optimization`
- `get_optimization_results`
- `list_jobs`
- `analyze_report`
- `compare_baseline`
- `compile_ea`
- `list_experts`
- `list_indicators`
- `list_scripts`
- `healthcheck`
- `list_symbols`
- `analyze_monthly_pnl`
- `analyze_drawdown_events`
- `analyze_top_losses`
- `analyze_loss_sequences`
- `analyze_position_pairs`
- `analyze_direction_bias`
- `analyze_streaks`
- `analyze_concurrent_peak`
- `list_deals`
- `search_deals_by_comment`
- `search_deals_by_magic`
- `analyze_profit_distribution`
- `analyze_time_performance`
- `analyze_hold_time_distribution`
- `analyze_layer_performance`
- `analyze_volume_vs_profit`
- `analyze_costs`
- `analyze_efficiency`
- `verify_setup`
- `get_optimization_status`
- `list_reports`
- `get_latest_report`
- `search_reports`
- `get_report_by_id`
- `get_reports_summary`
- `get_best_reports`
- `search_reports_by_tags`
- `search_reports_by_date_range`
- `search_reports_by_notes`
- `get_reports_by_set_file`
- `get_comparable_reports`
- `tail_log`
- `prune_reports`
- `promote_to_baseline`
- `archive_report`
- `archive_all_reports`
- `get_history`
- `annotate_history`
- `cache_status`
- `clean_cache`
- `get_active_account`
- `check_symbol_data_status`
- `check_mt5_status`
- `validate_ea_syntax`
- `diagnose_wine`
- `get_mt5_logs`
- `search_mt5_errors`
- `check_mt5_process`
- `kill_mt5_process`
- `check_system_resources`
- `validate_mt5_config`
- `get_wine_prefix_info`
- `get_backtest_crash_info`
- `check_update`
- `update`
- `init_project`
- `create_set_template`
- `export_report`
- `get_backtest_history`
- `compare_backtests`
- `list_set_files`
- `read_set_file`
- `write_set_file`
- `patch_set_file`
- `clone_set_file`
- `describe_sweep`
- `diff_set_files`
- `set_from_optimization`
- `search_experts`
- `search_indicators`
- `search_scripts`
- `copy_indicator_to_project`
- `copy_script_to_project`

## FAQ

### Can I use MT5-Quant on macOS or Linux?

Yes, MT5-Quant is designed for macOS and Linux native environments, allowing you to manage MQL5 Expert Advisors without needing Windows.

### What makes MT5-Quant different from the standard MetaTrader 5 Python package?

MT5-Quant provides advanced capabilities that the standard Python package and MT5 itself lack, such as organized backtest reporting, deal-level analytics, and headless MQL5 compilation.

### Does it support optimization?

Yes, it supports genetic optimization in the background and includes tools to parse results and generate .set files.
