MetaTrader 5 MCP Bridge
v1.4.2Let an AI agent read and trade a MetaTrader 5 account over MCP, behind a human-approval gate.
Starts only with mcp<2 (written for an older SDK); the install commands pin it.
Values you need
| Variable | What it is | |
|---|---|---|
MT5_LOGIN | optional | MetaTrader 5 account number. Optional: overrides the config file and an already-logged-in terminal. |
MT5_PASSWORD | optional secret | MetaTrader 5 account password. Env-only so it never lands in a config file. Optional when the terminal is already logged in. |
MT5_SERVER | optional | MetaTrader 5 broker/trade server name. Optional: overrides the config file and an already-logged-in terminal. |
PyPI (uvx) discovery passed
Requires uv (https://docs.astral.sh/uv/)
Run in a terminal
claude mcp add mt5-trading-mcp -- uvx --with 'mcp<2' --from mt5-trading-mcp==1.4.2 mt5-mcpAdd to
claude_desktop_config.json{
"mcpServers": {
"mt5-trading-mcp": {
"args": [
"--with",
"mcp<2",
"--from",
"mt5-trading-mcp==1.4.2",
"mt5-mcp"
],
"command": "uvx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"mt5-trading-mcp": {
"args": [
"--with",
"mcp<2",
"--from",
"mt5-trading-mcp==1.4.2",
"mt5-mcp"
],
"command": "uvx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"mt5-trading-mcp": {
"args": [
"--with",
"mcp<2",
"--from",
"mt5-trading-mcp==1.4.2",
"mt5-mcp"
],
"command": "uvx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.mt5-trading-mcp]
command = "uvx"
args = ["--with", "mcp<2", "--from", "mt5-trading-mcp==1.4.2", "mt5-mcp"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: ping, get_terminal_info, get_account_info, get_quote, get_symbols, get_market_hours, get_rates, calc_margin, ….
- If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.
Machine-readable: install.md · manifest.json