Справка по MetaTrader 5 → MCP and AI → Capabilities

Tools and Operations Supported by MCP Servers

There are three MCP servers that provide tools:

  • terminal MCP server — provides MetaTrader 5 Terminal's tools for placing and managing orders, getting account data, controlling UI elements, and more.
  • marketdata MCP server — provides MetaTrader.com's market data, news, economic calendars, events, and related information.
  • metaeditor MCP server — provides MetaEditor's tools for algorithm development and complex file operations.

The capabilities exposed by MetaTrader 5 MCP servers are constantly increasing. Therefore, the most effective way to find out the available tools is by asking the agent.

Getting the List of MCP Tools #

  • If you are using the built-in AI Assistant, send this prompt:

Provide a table of all the tools you can access.

  • If you are using a third-party agent or app (e.g. Claude Code or Codex), ensure the MetaTrader app is running, then send this prompt:

Using MetaTrader MCP servers, provide a table of all the tools you can access.

The list of tools may include MetaEditor functionality if the MetaEditor app is running. The contents may also vary depending on your configuration for trading, web access, and shell operations.

List of MCP Tools #

The following tools are available:

Category

Tool

Purpose

Market data (terminal server)

marketdata_symbol_search

Search instruments by ticker, company name, or description

marketdata_symbol_get

Get symbol profile: quotes, market metadata, company info

marketdata_symbol_history

Get OHLCV bars (1h, 4h, 1d, 1w, 1mo) over a time range

marketdata_symbol_income_statement

Get a symbol's annual or quarterly income statement (revenue, EPS, net income…)

marketdata_symbol_news

Get the latest news headlines for a symbol, filtered by provider/window

marketdata_symbol_holdings

Get the holdings saved in project data for a symbol

Trading (terminal server)

trade_send_market_order

Place a buy/sell market order (optional stop loss and take profit)

trade_send_pending_order

Place a pending order (buy/sell limit/stop/stop-limit, expiry)

trade_modify_sl_tp

Modify stop loss or take profit on a position or pending order

trade_close_single_position

Close one position by ticket

trade_close_by_position

Close two opposite positions (close-by)

trade_delete_order

Delete a pending order

Symbols and Market Watch (terminal server)

get_marketwatch_symbols

List symbols in Market Watch with trading conditions

add_marketwatch_symbol

Add a symbol to Market Watch

remove_marketwatch_symbol

Remove a symbol from Market Watch

Quotes and price history (terminal server)

get_chart_history

Get historical candles (OHLCV) for a symbol/period/date range

get_chart_ticks_history

Get historical tick data (bid/ask/volume)

Chart management (terminal server)

list_open_charts

List open charts with attached indicators/EAs

chart_open

Open a chart by symbol and period (M1…MN1)

chart_close

Close a chart by ID

chart_apply_template

Apply a template (.tpl) to a chart

chart_add_indicator

Add an indicator to a chart

chart_remove_indicator

Remove an indicator from a chart

chart_get_indicator_state

Returns the configuration and current runtime state of an indicator attached to a chart, including its inputs and visible buffer values ordered from oldest to newest (last element is the newest value and represents the last visible chart bar). For shifted plots, the last element may correspond to a future display position rather than the last market bar. Identify the indicator by the exact case-sensitive short_name and zero-based subwindow number from list_open_charts.

list_available_indicators

List built-in and custom indicators

get_indicator_parameters

Get all the settings of an indicator, including current input parameters

Account/portfolio management (terminal server)

get_trading_account_info

Get account balance, equity, margin, leverage, type

get_trading_open_positions

Get current open positions and pending orders

get_trading_history_orders

Get historical orders and deals (prices, volumes, profit, commissions)

get_trading_history_positions

Get historical positions reconstructed from deals

Expert Advisors and Scripts (terminal server)

list_available_expert_advisors

List built-in and custom EAs (all/expert/script/service)

get_expert_advisor_parameters

Get all the settings of an Expert Advisor, including current input parameters

get_script_parameters

Get all the settings of a script, including current input parameters

chart_add_expert

Add an Expert Advisor to a chart

chart_remove_expert

Remove an Expert Advisor from a chart

chart_add_script

Add a script to a chart

Strategy testing (terminal server)

tester_run_backtest

Start a backtest with a tester .ini configuration file (and optional .set inputs)

tester_run_optimization

Start an optimization using a prepared configuration and, optionally, a .set file containing optimization ranges.

tester_get_status

Get progress/status of a running tester job

tester_prepare_config

Create or update the Strategy Tester .ini configuration file. It defines:

  • Expert Advisor/program path
  • Symbol and timeframe
  • Start and end dates
  • Tick model: every tick, real ticks, M1 OHLC, open prices, or mathematical calculations
  • Deposit, currency, leverage, and execution delay
  • Backtest or optimization mode
  • Genetic optimization
  • Optimization criterion
  • Forward-testing mode and date
  • Profit-in-pips mode
tester_prepare_inputs

Create or update the EA’s .set input-parameter file. Parameters use native MT5 SET syntax:

  • Fixed value: Lots=0.1
  • Optimization range: Lots=0.1||0.01||0.01||1.0||Y
  • Disabled optimization: Lots=0.1||0.01||0.01||1.0||N
tester_get_configuration

Return the Strategy Tester configuration associated with a specific test or optimization run

tester_wait

Wait for a tester job to finish

tester_stop

Stop an active backtest or optimization

tester_get_report

Retrieve or saves the report for a completed run

Journals (terminal server)

get_terminal_journal

Get information from the platform journal

get_expert_journal

Get information from the experts journal

get_tester_journal

Get information from the strategy tester journal

General tools

shell

Execute a shell command in the current directory

tree

List a directory tree with line counts

write

Create or overwrite a file (creates parent directories)

edit

Edit a file by find-and-replace

read_image

Read or load an image from a local path or URL for inspection

Environment and workspace (terminal server, metaeditor server)

get_workspace_info

Get workspace metadata, paths, compiler information, and permissions

get_time_information

Get UTC/local/server time, DST status, time offset

MQL5 development (metaeditor server)

create_new_file

Create a new workspace file with content & overwrite control

create_new_folder

Create a new workspace folder

delete_file

Delete a workspace file

write_file

Replace full file content

write_binary_file

Write binary data (hex input)

replace_text_in_file

Replace literal text while preserving the rest

build_project

Run full project build pipeline (status, diagnostics, outputs)

compile_file

Compile a single MQL5 source file (with defines/includes/targets)

syntax_check

Syntax-only validation without producing artifacts

format_source_code

Auto-format MQL5 source according to MetaQuotes style rules

find_files_by_glob

Find files and directories matching a glob pattern

find_files_by_name_keyword

Find files by filename fragment

list_directory

List files and directories with traversal depth

search_text

Run literal text search across workspace files

search_regex

Run a PCRE2 regular-expression search across workspace files

send_web_request

Send outbound HTTP/HTTPS requests (GET/POST/etc.), bodies, and file output

read_file

Read text or bytes from a file with automatic encoding detection

read_file_by_lines

Read selected line ranges from a file

read_binary_file

Read raw binary bytes with offsets

open_file_in_editor

Open a file in MetaEditor with a caret position

list_open_documents

List open editor documents with modification and Git status