MB

mergeos-bounties/mt4-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

3 stars 7 forks 品質 81 トレンド 14MIT

mt4-mcp — MCP server for MetaTrader 4 account, quotes, and orders

概要

is an MCP server so AI agents can inspect and trade against a terminal — account, symbols, quotes, orders/positions, history — with a full for CI and demos. This installs the (mt4-mcp) and the (skill + MCP server from .mcp.json). After pip install "git+https://github.com/mergeos-bounties/mt4-mcp.git", point any MCP host at: — merge examples/claude_desktop_config.json into Claude MCP config. All packages speak (mt4-mcp serve). Default mode is (offline, no simulator/terminal/GIMP required). Mock mode needs MetaTrader install. For a copy-pasteable offline trading walkthrough, see docs/MOCK_TRADING_DEMO.md. In mock mode, pending orders are converted to market orders when quotes cross their trigger price. The mock supports deterministic tests for buy_limit, sell_limit, buy_stop, and sell_stop crossing behavior. Without a working bridge, mode returns structured errors; demos stay on .

README

以下は原文 README の抜粋です。原文を見る。

mt4-mcp

mt4-mcp is an MCP server so AI agents can inspect and trade against a MetaTrader 4 terminal — account, symbols, quotes, orders/positions, history — with a full offline mock for CI and demos.


Install (one command)

pip install "git+https://github.com/mergeos-bounties/mt4-mcp.git" && grok plugin install mergeos-bounties/mt4-mcp --trust

This installs the Python CLI (mt4-mcp) and the Grok plugin (skill + MCP server from .mcp.json).

Check:

mt4-mcp version
mt4-mcp doctor
mt4-mcp demo
grok plugin list
grok mcp list

Local clone:

git clone https://github.com/mergeos-bounties/mt4-mcp.git
cd mt4-mcp
pip install -e ".[dev]"
grok plugin install . --trust

Other agents (stdio MCP)

After pip install "git+https://github.com/mergeos-bounties/mt4-mcp.git", point any MCP host at:

Field Value
command mt4-mcp
args ["serve"]
env MT4_MCP_MODE=mock

Claude Desktop — merge examples/claude_desktop_config.json into Claude MCP config.

Cursor — merge examples/cursor_mcp.json.

Grok config.toml (manual, without plugin):

[mcp_servers.mt4_mcp]
command = "mt4-mcp"
args = ["serve"]
env = { MT4_MCP_MODE = "mock" }
enabled = true

One-liner via Grok CLI:

pip install "git+https://github.com/mergeos-bounties/mt4-mcp.git"
grok mcp add mt4-mcp -- mt4-mcp serve

Supported AI agents / hosts

Host Support Install
Grok (CLI / TUI / Build) Yes grok plugin install mergeos-bounties/mt4-mcp --trust then pip install "git+https://github.com/mergeos-bounties/mt4-mcp.git"
Claude Desktop Yes Copy examples/claude_desktop_config.json into Claude MCP settings
Cursor Yes Merge examples/cursor_mcp.json into Cursor MCP config
Claude Code Yes stdio MCP: same command/args as Claude Desktop / Grok
VS Code (MCP / Continue / Cline) Yes Generic stdio server config pointing at mt4-mcp serve
Windsurf / Cascade Yes stdio MCP entry with mt4-mcp + serve
Codex CLI Yes (stdio) Register MCP server command mt4-mcp serve in Codex MCP settings
ChatGPT Desktop Partial Only if host supports custom MCP stdio servers
Gemini CLI Partial Only if MCP stdio plugins are enabled
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "mt4-mcp": { "command": "python", "args": ["-m", "mt4_mcp"], "env": { "MT4_MCP_MODE": "mock" } } } }