MT-MCP Docs
Tool Reference

Coaching

5 tools — auto-generated from the MCP server's tool schemas.

Generated

This page is generated from packages/server/mcp/src/tools/*.ts by pnpm docs:generate-tools. Do not edit it by hand — edit the tool's description/schema in source and regenerate.

backtest_strategy

Runs a micro-backtest of a simple rule-based strategy over historical bars fetched from the EA. Maximum 5000 bars. Returns equity curve and basic statistics. Times out after 30 seconds and returns BACKTEST_TIMEOUT. Supported entry/exit conditions: rsi_above, rsi_below, price_above_ema, price_below_ema, macd_cross_above_zero, macd_cross_below_zero. Requires the analytics capability (Enterprise+ tier).

Parameters

NameTypeRequiredDefaultDescription
symbolstringYes
timeframestringYes(one of: M1, M5, M15, M30, H1, H4, D1, W1, MN1)
barsintegerYes
strategyobjectYes
initial_balancenumberNo10000
risk_per_trade_pctnumberNo1
terminal_idstringNo

explain_trade

Explains a trade: what conditions existed at entry, the risk/reward ratio, SL/ATR ratio, and whether it aligns with common strategies. Works for both open positions and closed trade history. Returns POSITION_NOT_FOUND if ticket not found. Requires the analytics capability (Team+ tier).

Parameters

NameTypeRequiredDefaultDescription
ticketintegerYes
timeframestringNo"H1"(one of: M1, M5, M15, M30, H1, H4, D1, W1, MN1)
terminal_idstringNo

get_fibonacci_levels

Computes Fibonacci retracement and extension levels from swing high and low price points. Pure server-side computation — no EA dispatch required. Available at Free+ tier.

Parameters

NameTypeRequiredDefaultDescription
swing_highnumberYes
swing_lownumberYes
directionstringNo"UP"(one of: UP, DOWN)

get_news

Returns recent forex/financial news articles from NewsAPI.org. Requires NEWS_API_KEY environment variable — returns NEWS_NOT_CONFIGURED if not set. Returns NEWS_UNAVAILABLE if the feed is unreachable. Results cached 5 minutes. Requires the analytics capability (Team+ tier).

Parameters

NameTypeRequiredDefaultDescription
querystringNo
limitintegerNo10

get_sentiment

Returns retail trader positioning sentiment for a symbol from Myfxbook Community Outlook (free, no key required). Includes long/short percentages and a contrarian signal (when retail is >70% long, signal is SHORT). Returns SENTIMENT_UNAVAILABLE if the feed is unreachable. Results cached 15 minutes. Requires the analytics capability (Team+ tier).

Parameters

NameTypeRequiredDefaultDescription
symbolstringYes

On this page