Skip to main content
Glama
dchumari
by dchumari

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_MT5_LOGINNoAccount number for Strategy Tester runs. Resolved from the login argument, then this environment variable, then MetaTrader's saved current login.
MCP_MT5_INSTALL_DIRNoPin the MT5 install directory if more than one is found
MCP_MT5_COMPILE_TIMEOUT_MSNoCompile timeout in milliseconds (default 120000)120000
MCP_MT5_BACKTEST_TIMEOUT_MSNoBacktest timeout in milliseconds (default 600000)600000

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": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_environment_infoA

Resolves (or re-resolves) the MetaEditor/MetaTrader 5 installation and its MQL5 data folder. Call this first, and again if you get an 'ambiguous' or 'error' result, passing installDirHint.

list_filesA

Lists files/directories under the sandboxed MQL5 data folder (Experts, Include, Indicators, Scripts, Libraries, Files). Omit dir to see the top-level allowed folders.

read_fileA

Reads a text file (e.g. .mq5/.mqh) from under the sandboxed MQL5 data folder.

write_fileA

Creates or overwrites a .mq5/.mqh/.mqproj/.set file under the sandboxed MQL5 data folder (e.g. write an EA to "Experts/MyStrategy/MyEA.mq5"). Set overwrite:true to replace an existing file.

delete_fileB

Deletes a single file (not a directory) under the sandboxed MQL5 data folder.

compileA

Compiles a .mq5/.mqh/.mqproj file via MetaEditor's CLI and returns structured errors/warnings parsed from the compile log, plus the resulting .ex5 path on success. Success requires both zero parsed errors AND a freshly-written .ex5 (the process exit code is not trustworthy and is ignored).

run_backtestA

Runs a compiled EA through MetaTrader's Strategy Tester (a closed historical simulation - no live connection, no real orders) and returns parsed performance metrics. Requires the EA to already be compiled (call compile first). Requires an account login: the Strategy Tester refuses to start without one. Resolution order: the login argument, then MCP_MT5_LOGIN, then whichever account is currently saved/logged into this terminal (from common.ini) - so if you're already logged into a demo/live account with 'save password' checked, no login needs to be passed at all.

get_journalB

Reads the terminal's MQL5 journal log for a given date (defaults to the latest).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 8 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: file CRUD (list/read/write/delete), environment setup, compile, backtest, and journal reading. The file tools all target the same resource but with unambiguous distinct verbs, and the build/run/log tools occupy separate roles with no overlap.

Naming Consistency4/5

Most names follow a clean verb_noun pattern (list_files, read_file, write_file, delete_file, get_environment_info, get_journal, run_backtest). Two are bare verbs (compile, run_backtest partially) which is a minor deviation but still readable and predictable.

Tool Count5/5

Eight tools is well-scoped for an MQL5 file+compile+backtest workflow, with each tool earning its place covering a distinct stage of the author-test loop.

Completeness4/5

File read/write/delete, compile, backtest, and journal cover the core edit-build-test lifecycle completely. Minor gaps exist (no explicit directory creation, rename/move, or file search), but write_file's path handling likely covers directory needs for most workflows.

Maintenance

ActivityMaintained
ResponsivenessNo issues