Skip to main content
Glama
8nite

MCP MetaTrader 4 Server

by 8nite

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MT4_HOSTNoIP address of Windows machine running MT4192.168.50.161
MT4_PORTNoPort number for HTTP bridge8080
MT4_REPORTS_PATHNoDirectory path for EA report files/tmp/mt4_reports

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
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_account_infoB

Get MetaTrader 4 account information

get_market_dataC

Get current market data for a symbol

place_orderC

Place a trading order in MetaTrader 4

get_positionsB

Get all open positions

close_positionC

Close an open position

get_historyD

Get trading history

run_backtestC

Run a backtest on an Expert Advisor

get_backtest_resultsC

Get results from the last backtest

list_expertsB

List available Expert Advisors for backtesting

get_backtest_statusB

Get the current status of a running backtest

sync_eaC

Upload EA file to MetaTrader 4 for compilation

compile_eaC

Compile an EA on MetaTrader 4 and get compilation results

list_local_easC

List EAs in the local development folders

sync_ea_from_fileC

Sync an existing EA file to MetaTrader 4

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.1/5.0

Scored across 14 tools

Disambiguation4/5

Most tools have distinct purposes, but there is some overlap between 'sync_ea' and 'sync_ea_from_file' which could cause confusion about when to use each. Other tools like 'close_position', 'get_positions', and 'place_order' are clearly differentiated for trading operations.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with snake_case, such as 'get_account_info', 'run_backtest', and 'list_experts'. This predictability makes it easy for agents to understand and navigate the toolset.

Tool Count5/5

With 14 tools, the server covers a comprehensive range of MetaTrader 4 operations including account management, trading, backtesting, and EA development. This count is well-scoped for the domain without being overwhelming.

Completeness4/5

The toolset provides strong coverage for trading, backtesting, and EA management, but lacks tools for modifying or canceling orders, which could be a minor gap in trading workflows. Overall, it supports core CRUD-like operations effectively.

Maintenance

ActivityInactive
ResponsivenessUnresponsive