mt5-remote-reader-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mt5-remote-reader-mcp Show open positions on VPS 1.2.3.4 with password mypass"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mt5-remote-reader-mcp
Read-only MCP server to monitor MetaTrader 5 accounts on remote Windows VPS via SSH.
Never executes trading operations — pure monitoring only.
What it does
mt5-remote-reader-mcp lets any MCP-compatible AI agent (Claude, Cursor, Windsurf, etc.) connect to a Windows VPS running MetaTrader 5 and answer questions about your trading accounts — all via SSH, with no permanent connection and no risk of accidental trades.
Example prompt:
"Use mt5-remote-reader-mcp, connect to VPS 107.x.x.x with password XXXX and tell me what positions are currently open"
The AI will:
Connect to your VPS via SSH
Query MetaTrader 5
Return the data in natural language
Related MCP server: metatrader5-mcp
Installation
pip install mt5-remote-reader-mcpQuick Start
1. Set up your VPS (one time only)
On your Mac/Linux, run:
python setup_vps.py YOUR_VPS_IP YOUR_VPS_PASSWORDThis installs Python, required libraries, and mt5_tool.py on the VPS automatically.
2. Configure your MCP client
Add to your MCP client config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"mt5-remote-reader": {
"command": "mt5-remote-reader-mcp"
}
}
}3. Talk to your AI
"Connect to my VPS at 1.2.3.4 with password XXXX and show me open positions"
"What trades did mt5_5 close in the last 7 days?"
"Is the expert advisor on axi_mt5_5_terminal logging any errors?"Available Tools
Tool | Description | Parameters |
| List all active MT5 terminals on the VPS |
|
| Get currently open positions |
|
| Get closed trades history |
|
| Get Expert Advisor log entries |
|
| List all available trading symbols |
|
| Get detailed info for a specific symbol |
|
Recommended flow
Always start with list_terminals to discover what terminals are available, then use the short terminal name (e.g. mt5_5) for all subsequent calls.
Environment Variables (optional)
Variable | Default | Description |
|
| Path to mt5_tool.py on the VPS |
|
| SSH username for the VPS |
Example with custom path:
MT5_TOOL_PATH="C:\trade_monitor\mt5_tool.py" mt5-remote-reader-mcpVPS Requirements
Windows Server 2012 R2 or later
MetaTrader 5 installed and logged in
Python 3.8+ installed and in PATH
OpenSSH Server active with password authentication
mt5_tool.pydeployed on the VPS (handled bysetup_vps.py)
Architecture
AI Agent
↓
mt5-remote-reader-mcp (MCP stdio, runs on your local machine)
↓
SSH + password (paramiko, no pre-configured keys needed)
↓
Windows VPS
↓
mt5_tool.py + MetaTrader5 Python library
↓
JSON → natural language responseWhy stdio?
No background process needed. The MCP server launches on demand, completes the request, and exits. SSH is fast and stateless — there's nothing to keep alive between calls.
Why paramiko?
Pure Python SSH library — works on any Mac, Linux, or Windows without system-level SSH dependencies.
Security
Read-only by design — no trading operations are ever executed
Credentials are passed per-call and never stored to disk
SSH connection opens and closes for each request
Works over standard SSH port 22 — no custom firewall rules needed
Troubleshooting
"Authentication failed"
→ Check the IP and password. Make sure OpenSSH is running on the VPS (net start sshd).
"No output from VPS"
→ Make sure mt5_tool.py is at the expected path. Run setup_vps.py again to redeploy it.
"MT5 terminal not found"
→ Make sure MetaTrader 5 is open and logged in on the VPS before querying.
"Module MetaTrader5 not found"
→ Run setup_vps.py again — it will reinstall the required Python libraries.
License
MIT — see LICENSE
Related Projects
mt5_tool.py — the core VPS-side script
setup_vps.py — automated VPS setup from your local machine
Available Tools
16 toolscheck_vps_statusA
Verifica se una o tutte le VPS sono raggiungibili via SSH (health check leggero). Non interroga MT5 — è solo un ping SSH con timeout breve (5 secondi).
Utile per:
Diagnostica rapida prima di operazioni più complesse
Capire subito se un problema è di rete o di MT5
Monitoraggio dello stato delle VPS
Inputs: vps. Returns: object
connect_vpsA
Configura una VPS Windows per l'uso con mt5-remote-reader. Va chiamato la prima volta che si usa una VPS nuova.
Fa tutto automaticamente:
Verifica se Python è installato, altrimenti lo installa
Installa le librerie necessarie (MetaTrader5, psutil)
Copia mt5_tool.py sulla VPS
Testa la connessione con MT5 e ritorna i terminali trovati
Se SSH non è raggiungibile (VPS vergine), scarica automaticamente setup_mt5_vps.exe in ~/Downloads e fornisce le istruzioni per eseguirlo.
MetaTrader 5 deve essere già installato e loggato sulla VPS.
Inputs: vps (required). Returns: object
delete_vpsA
Rimuove una VPS dalla rubrica.
Inputs: name (required). Returns: object
get_account_infoB
Ritorna le informazioni del conto MT5: balance, equity, margin, free margin, margin level, profit flottante, valuta, leva, login, broker.
Inputs: vps (required), terminal (required). Returns: object
get_all_account_infoA
Legge le informazioni di conto su TUTTE le VPS in rubrica in parallelo. Non serve specificare nulla: recupera automaticamente tutte le VPS salvate e tutti i terminali MT5 attivi su ciascuna.
Per ogni terminale restituisce: login, name, balance, equity, profit, margin, free_margin, margin_level, currency, leverage, server, broker.
Usare questo tool invece di get_account_info quando si vuole una panoramica completa di tutti i conti monitorati.
Ritorna: {nome_vps: {nome_terminale: {info_conto}}} per ogni VPS raggiungibile. Le VPS non raggiungibili compaiono con status "error" invece delle info conto.
Inputs: no named parameters. Returns: object
get_all_open_positionsA
Legge le posizioni aperte su TUTTE le VPS in rubrica in parallelo. Non serve specificare nulla: recupera automaticamente tutte le VPS salvate e tutti i terminali MT5 attivi su ciascuna.
Usare questo tool invece di get_open_positions quando si vuole una panoramica completa di tutti i conti monitorati.
Ritorna: {nome_vps: {nome_terminale: [posizioni]}} per ogni VPS raggiungibile. Le VPS non raggiungibili compaiono con status "error" invece delle posizioni.
Inputs: no named parameters. Returns: object
get_expert_logA
Ritorna le ultime N righe del log dell'Expert Advisor del terminale. Utile per diagnosticare problemi o verificare l'attività dell'EA.
Inputs: vps (required), terminal (required), lines. Returns: object
get_open_positionsA
Ritorna le posizioni aperte sul terminale specificato. Ogni posizione include: ticket, symbol, type (buy/sell), volume, open_price, current_price, sl, tp, profit, swap, open_time, comment, magic.
Inputs: vps (required), terminal (required). Returns: result
get_symbol_infoA
Ritorna i dettagli completi di uno strumento specifico. Include: contract_size, volume_min/max/step, swap_long/short, bid, ask, spread.
Inputs: vps (required), terminal (required), symbol (required). Returns: object
get_symbolsC
Ritorna tutti gli strumenti di trading disponibili sul terminale.
Inputs: vps (required), terminal (required). Returns: result
get_trade_historyA
Ritorna lo storico dei trade chiusi negli ultimi N giorni. Ogni trade include: symbol, type, volume, open_price, close_price, open_time, close_time, profit, swap, commission, net_profit.
Inputs: vps (required), terminal (required), days. Returns: result
get_versionA
Restituisce la versione installata di mt5-remote-reader-mcp. Utile per verificare che il package sia aggiornato.
Inputs: no named parameters. Returns: object
get_vps_installerA
Scarica setup_mt5_vps_{version}.exe in ~/Downloads e restituisce il percorso.
Usare quando connect_vps fallisce perché SSH non è ancora attivo sulla VPS. L'exe va copiato sulla VPS Windows ed eseguito come amministratore: tasto destro → "Esegui come amministratore".
L'exe installa automaticamente sulla VPS:
OpenSSH Server (abilita la connessione SSH)
Python 3.8
Librerie MetaTrader5 e psutil
mt5_tool.py sul Desktop della VPS
Dopo aver eseguito l'exe, tornare qui e richiamare connect_vps.
Inputs: no named parameters. Returns: object
list_terminalsA
Elenca tutti i terminali MetaTrader 5 attivi sulla VPS. Ritorna nome, login, broker, server e stato connessione per ogni terminale. Usare sempre questo tool prima degli altri per scoprire i nomi dei terminali disponibili.
Inputs: vps (required). Returns: object
list_vpsA
Elenca tutte le VPS salvate in rubrica. Mostra nome, IP e username — mai le password. Chiamare sempre questo tool per primo per vedere le VPS disponibili.
Inputs: no named parameters. Returns: object
save_vpsA
Aggiunge o aggiorna una VPS nella rubrica locale sicura. Le credenziali sono salvate cifrate in ~/.mt5-reader/vps.json. Dopo questa chiamata non sarà mai più necessario inserire ip, username e password.
Inputs: name (required), ip (required), username (required), password (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool has a clearly distinct purpose, covering different aspects of VPS management and MT5 data retrieval. Overlap between single and aggregate tools (e.g., get_account_info vs get_all_account_info) is intentional and well-documented.
All tool names follow a consistent verb_noun pattern in snake_case, such as check_vps_status, get_account_info, list_terminals. The naming is predictable and makes the function of each tool immediately clear.
16 tools is well-scoped for the server's purpose of remote MT5 reading and VPS management. Each tool serves a specific need without redundancy or oversaturation.
The tool set covers all essential operations: VPS lifecycle management (save, list, delete, connect), account info retrieval (single and aggregate), positions, symbols, trade history, logs, and diagnostics. No obvious gaps for the stated read-only domain.
Maintenance
Related MCP Connectors
Read-only access to your MetaTrader 4 and 5 accounts for AI agents: balances, open positions, trade history with win rate, live quotes, symbol specs and candles. It cannot place, modify or close orders.
Read-only MetaTrader 5 for AI agents: balances, positions, history and prices. Sign in with OAuth.
Read-only Linux server and Docker monitoring for AI assistants: CPU, memory, disk, network.
Hosted MT5 MCP server: live MetaTrader 5 balance, positions, history, charts and optional trading.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides read-only server monitoring and diagnostic tools for AI assistants to manage Linux and Unraid systems via SSH. It enables natural language interactions for container management, storage health checks, and system log analysis while keeping credentials secure.17ISC
- AlicenseAqualityBmaintenanceConnects Claude to a MetaTrader 5 terminal for read-only market data, account info, performance analysis, and order planning (no live trading).18MIT
- AlicenseAqualityDmaintenanceEnables secure, read-only inspection of a VPS over SSH through approved operations such as system health, disk usage, container logs, and service status, without giving the AI unrestricted shell access.81MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read NinjaTrader 8 accounts, positions, trade history and performance, market data, charts, and NinjaScript code through 37 read-only tools. Placing, changing, or cancelling orders is impossible by design.1MIT