metatrader5-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MT5_PATH | No | Optional explicit path to the MetaTrader 5 terminal executable. | |
| MT5_LOGIN | No | Optional account login number. | |
| MT5_SERVER | No | Optional server name for the MT5 account. | |
| MT5_PASSWORD | No | Optional account password. | |
| MT5_MCP_LOG_DIR | No | Directory for log files. | logs |
| MT5_MCP_REPORTS_DIR | No | Directory for strategy reports. | reports/ |
| MT5_MCP_APPROVAL_MODE | No | Approval mode: 'console' for interactive prompt, 'file' for file-based approval. | console |
| MT5_MCP_ENABLE_DEMO_TRADING | No | Set to 'true' to enable order-planning tools on demo accounts. | false |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_account_infoA | Get the connected MT5 account's balance, equity, margin, leverage, and trade mode. |
| get_terminal_infoA | Get MT5 terminal status: connection state, data path, build, trade-allowed flags. |
| get_symbol_infoA | Get full symbol specification (point, digits, contract size, spread, limits) for |
| get_tickB | Get the latest bid/ask/last tick for |
| get_ratesB | Get OHLCV bars for |
| get_positionsC | List open positions, optionally filtered by symbol or ticket. |
| get_ordersB | List active pending orders, optionally filtered by symbol or ticket. |
| get_history_dealsB | List historical deals between date_from/date_to (ISO dates), or by ticket/position. |
| read_logA | Read the tail of an MT5 log file for |
| read_strategy_reportA | Parse an MT5 Strategy Tester HTML report into a summary dict and raw table rows. |
| summarize_positionsB | Summarize open positions by total, symbol, and side. Fetches live positions if |
| analyze_drawdownA | Compute basic peak-to-trough drawdown from history deals (fetched live if |
| analyze_trade_historyB | Compute win rate / profit factor / averages from history deals (fetched live if |
| calculate_profit_risk_basicA | Pure price-math risk/reward ratio calculation. No MT5 connection or symbol lookup needed. |
| calculate_marginA | Calculate required margin for a hypothetical order. Requires approval; demo accounts only; never sent. |
| calculate_profitB | Calculate hypothetical profit/loss between two prices. Requires approval; demo accounts only; never sent. |
| check_orderB | Run MT5's server-side order_check validation for a hypothetical order. Requires approval; demo only; never sent. |
| prepare_order_planB | Build a full order plan (request + margin + estimated P/L + order_check). Requires approval; demo only; NEVER sent. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/alikhande70/metatrader5-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server