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

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_account_info

Get MetaTrader 4 account information

get_market_data

Get current market data for a symbol

place_order

Place a trading order in MetaTrader 4

get_positions

Get all open positions

close_position

Close an open position

get_history

Get trading history

run_backtest

Run a backtest on an Expert Advisor

get_backtest_results

Get results from the last backtest

list_experts

List available Expert Advisors for backtesting

get_backtest_status

Get the current status of a running backtest

sync_ea

Upload EA file to MetaTrader 4 for compilation

compile_ea

Compile an EA on MetaTrader 4 and get compilation results

list_local_eas

List EAs in the local development folders

sync_ea_from_file

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

Latest Blog Posts

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/8nite/metatrader-4-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server