Skip to main content
Glama
Erfangit23

MT5 MCP Server

by Erfangit23

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MT5_PATHNoPath to terminal64.exe if the terminal is not running or not in the default location.
MT5_LOGINNoAccount number. Without it, the server uses the terminal's logged-in account.
MT5_MAGICNoMagic number attached to orders placed by the AI.0
MT5_SERVERNoBroker server name, e.g. MetaQuotes-Demo.
MT5_DRY_RUNNoOrder tools only preview, never send. Set to false for real trading.true
MT5_PASSWORDNoAccount password (only with MT5_LOGIN).
MT5_DEVIATIONNoMax slippage in points for market orders.20
MT5_MAX_VOLUMENoHard cap on order volume in lots (safety net).10

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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_account_infoB

Account balance, equity, margin, free margin, margin level and leverage.

get_terminal_infoA

Terminal state: connected to broker, algo trading allowed, MT5 build.

search_symbolsC

Search broker symbols by part of the name, e.g. 'EUR', 'XAU' or 'USD'.

get_symbol_infoC

Symbol details: digits, spread, min/max/step lot, stops level, current bid/ask.

get_tickC

Latest bid and ask price for a symbol.

get_candlesC

Recent OHLCV candles (oldest first). Use for chart analysis.

get_indicatorC

Compute SMA, EMA, RSI or ATR on recent candles and return the latest value.

get_positionsB

Open positions with live profit and swap. Optionally filter by symbol.

get_pending_ordersB

Pending orders waiting to be filled. Optionally filter by symbol.

get_historyB

Closed-trade summary for the last N days: net profit, wins/losses per symbol.

place_market_orderB

Open a position at market price. DRY-RUN by default: validates and previews without sending.

place_pending_orderC

Place a pending limit/stop order that fills later when price reaches price.

close_positionB

Close an open position by ticket (fully, or partially with volume).

modify_positionA

Change stop loss / take profit of an open position. Pass 0 to remove one.

modify_pending_orderC

Change price, SL or TP of a pending order.

cancel_pending_orderB

Delete a pending order before it fills.

calculate_lot_sizeB

Position size in lots so hitting the stop loses risk_percent of the balance.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.3/5.0

Scored across 17 tools

Disambiguation4/5

Most tools have clearly distinct roles (market data, order management, account info), but get_tick duplicates the bid/ask already present in get_symbol_info, creating a minor overlap. Other pairs like get_positions/get_pending_orders and modify_position/modify_pending_order are well separated by their descriptions.

Naming Consistency5/5

All tools use consistent snake_case with a clear verb_noun pattern (get_, search_, place_, close_, modify_, cancel_, calculate_). No mixing of conventions or vague verbs.

Tool Count4/5

With 17 tools, the set is slightly above the ideal 3–15 range, but each tool covers a distinct MT5 operation (terminal/account info, symbol data, candles, indicators, positions, pending orders, trade execution, risk sizing). The count is borderline but justified for a trading server.

Completeness4/5

The surface covers account/terminal info, symbol lookup, market data, indicators, full position/order lifecycle (place, modify, close, cancel), history, and lot sizing. Minor gaps like trailing stops or margin requirement checks exist, but the core trading workflow is complete.

Maintenance

ActivitySlowing
ResponsivenessNo issues