
phuicmt/mcp-mt5
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MetaTrader 4/5ビルドパイプライン用のMCPサーバー(コンパイル、デプロイ、バックテスト、解析レポート)
概要
コンパイル MQL ソース, コンパイルされた EA を展開, ストラテジーテスターを実行します。, 解析レポート, tail logs — MetaTrader UI に触れることなく LLM エージェントによって駆動されるすべての. LLM エージェントは .mq5 ソース → コンパイラ → デプロイ → ストラクション テスター → 読み込み → レポート → は → 繰り返しを調節します。 ブローカーのログインなし, ループの人間なし, 実際のお金の実行の危険なし. ランタイム取引では、ライブトレーディングのMCPと組み合わせ、異なるレイヤーをターゲットにし、うまくコンポーズします。 27 個のツール(16 個の非推奨エイリアスを 0.6.0 まで)と 2 個のリソーステンプレート。 すべてのツールは、MCP アノテーション(既読/破壊的なヒント)、タイプされた出力スキーマおよび/パラメータの説明を運びます。 失敗は、ツールのエラーとして報告され、エラーキーを持つ通常の結果ではありません。 pre-0.5.0 ツール名は、記述が DEPRECATED で始まる薄いラッパーとして 0.5.x で動作します。 MCP MT5 LEGACY TOOLS=0 を設定し、上記の27ツールにツールカタログを縮小します。 Windows + インストールされたMetaTrader 4または5ターミナルが必要です.
概要(AI 翻訳)
MetaTrader 4/5ビルドパイプライン用のモデルコンテキストプロトコルサーバ。 Compile MQL ソース、コンパイルされた EA をデプロイし、ストラテジーテスターを実行し、レポートを解析し、 tail logs を解析します。LM エージェントが MetaTrader UI に触れることなく、すべての機能が搭載されています。
お問い合わせ
これは何ですか — そして、それはそうではありません
| ✅ このサーバ | ✕ このサーバではない |
|----------------|
| MetaTrader 開発ハーネス — コンパイル、デプロイ、バックテスト、パース | ライブ取引(注文、ポジション、見積り) |
| ラップ [MetaEditor64.exe] / [terminal64.exe]] 直接CL | [[T2] をラップ Pythonパッケージ |
| インストール端末から完全にオフラインで実行 | ブローカーサーバーに接続 |
| 戦略を継承する ※前方* ライブに行く | 生産戦略の実行 |
ユースケース: LLMエージェントは[
.mq5]ソース→コンパイル→展開→実行戦略テスター→レポートを読み込み→リピートを調整します。 ブローカーのログインなし, ループの人間なし, 実際のお金の実行の危険なし.
ランタイム取引では、ライブトレーディングのMCPと組み合わせ、異なるレイヤーをターゲットにし、うまくコンポーズします。
お問い合わせ
ツール
27 個のツール(16 個の非推奨エイリアスを 0.6.0 まで)と 2 個のリソーステンプレート.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
mcp-mt5
Model Context Protocol server for the MetaTrader 4/5 build pipeline. Compile MQL sources, deploy compiled EAs, run Strategy Tester, parse reports, tail logs — all driven by an LLM agent without touching the MetaTrader UI.
What this is — and what it isn’t
| ✅ This server | ❌ Not this server |
|---|---|
| MetaTrader dev harness — compile, deploy, backtest, parse | Live trading (orders, positions, quotes) |
Wraps MetaEditor64.exe / terminal64.exe CLI directly |
Wraps the MetaTrader5 Python package |
| Runs entirely offline against installed terminal | Connects to a broker server |
| Iterates strategies before they go live | Executes strategies in production |
Use case: an LLM agent edits
.mq5source → compiles → deploys → runs Strategy Tester → reads report → adjusts → repeats. No broker login, no human in the loop, no risk of real-money execution.
For runtime trading, pair this with a live-trading MCP — they target different layers and compose well.
Tools
27 tools (plus 16 deprecated aliases until 0.6.0) and 2 resource templates. Every tool carries MCP annotations (read-only / destructive hints), a typed output schema and per-parameter descriptions; failures are reported as tool errors, never as a normal result with an error key.
🔍 Discovery & terminal selection
| Tool | Description |
|---|---|
env_info |
Resolved paths, terminal hash, edition, and missing-component issues |
list_terminals |
Every MT4/5 terminal data folder under %APPDATA%\MetaQuotes\Terminal with its origin.txt install path |
select_terminal |
Switch the active terminal data folder mid-session by origin path, hash, or install dir |
🔨 Build & deploy
| Tool | Description |
|---|---|
compile |
MetaEditor CLI on a .mq4/.mq5/.mqh. ok requires a Result: line with 0 errors and a freshly written binary (MetaEditor’s exit code is 1 even on success and is ignored). syntax_only=true uses /s for a fast check without a binary |
compile_and_deploy |
Compile, then copy the fresh .ex4/.ex5 into Experts/ |
deploy |
Copy a compiled binary into Experts/ or a .mqh into Include/, chosen by extension |
smoke_test |
Compile + deploy + 1-day headless backtest + journal scan for runtime errors |
list_experts |
Enumerate Experts/ (defaults to *.ex5 on MT5, *.ex4 on MT4) |
🔎 Source analysis & lint
| Tool | Description |
|---|
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"mt5": {
"command": "mcp-mt5",
"env": {
"MT5_INSTALL": "C:\\Program Files\\MetaTrader 5"
}
}
}
}