Releases: vincentwongso/mt5-trading-mcp
Releases · vincentwongso/mt5-trading-mcp
Release list
v1.6.1
Fixed
get_chart_screenshotend_time- the scroll now frames the window to actually end at the requested time. In 1.6.0 the capture re-pinned to the latest bar (the screenshot ignored the scroll) and could clamp on deeper history; the EA now anchors the capture to the scrolled window, compensates for the screenshot being wider than the chart, and preloads history before navigating. Requires the rebuilt EA.
v1.6.0
Added
get_chart_screenshotframing - four optional params to frame the capture:scale(0-5 zoom passthrough),bars(approximate visible candle count, EA self-calibrates to the nearest zoom step; mutually exclusive withscale),end_time(UTC timestamp to scroll the window back to; clamps forward,NO_BARS_AT_TIMEwhen older than history), andprice_min/price_max(pin the vertical price band). All default to the live chart framing; requires the rebuilt EA.
v1.5.2
Changed
get_chart_screenshotannotation guidance - documents that atextannotation anchored near current price at the same level as anhlineoverlaps the hline's right-margin description, and that the temporary capture chart inherits your default template. Docs only; no behavior change.
v1.5.1
Added
- Chart annotations -
get_chart_screenshotnow takes an optional
annotationslist to mark up the chart before capture: horizontal lines,
vertical lines, trendlines, free-placed text and corner labels. Roles
(resistance,support,note,neutral) pick sensible colors, or set
colordirectly. Up to 16 per screenshot. - Markup is drawn on the temporary chart the capture already uses, so it is
discarded with that chart and never touches your open charts.
Note
- Requires the updated
AgentScreenshot.ex5. Older builds keep working for
unannotated screenshots but ignore annotations.
v1.5.0
Added
get_chart_screenshot(symbol, timeframe)- native MT5 chart screenshots (Windows).
Returns a PNG of the actual MetaTrader 5 chart, including your template, indicators, and drawings, so an LLM can read price action and support/resistance visually instead of parsing OHLC numbers.
v1.4.2
Added
- Prepared for publishing on the official MCP Registry. Updated
server.jsonmetadata
(io.github.vincentwongso/mt5-trading-mcp) and added themcp-nameownership
marker to the README so the package can be published to
registry.modelcontextprotocol.io. No code changes.
v1.4.1
Fixed
- HTTP transport no longer crashes when
[transport.http] auth_tokenis set.
Startup calledmcp.add_middleware(...), but the mcp-packageFastMCPhas no
such method (it only exists on the separate standalonefastmcppackage), so
any configured token raisedAttributeError: 'FastMCP' object has no attribute 'add_middleware'and the server never started. The bearer-auth path now wraps
FastMCP's own streamable-HTTP ASGI app in aBearerAuthMiddlewareand serves
it through uvicorn the same way FastMCP does internally, so a static
shared-secret token works without the OAuth machinery FastMCP's built-in auth
would otherwise require. The empty-token (unauthenticated) path is unchanged.
v1.4.0
Changed
- Stateless HTTP is now the default (
[transport.http] stateless = true).
The streamable-HTTP transport previously kept one server transport per MCP
session, which the MCP SDK only frees on a clean session close. A client that
opened a new session per poll and never closed it leaked a transport each time,
growing the process unbounded - the memory leak seen on long-running VPS / HTTP
deployments. Stateless mode builds a fresh transport per request and tears it
down immediately, so nothing accumulates. Trade-off: server-pushed resource
subscriptions (quotes://,account://,positions://) need a persistent
session and are inert in stateless mode (tools still work - clients poll). Set
stateless = falseorserve --no-statelessto restore the old behaviour. - Default log level is now
WARNING([logging] level). An unattended HTTP
server no longer floods the console with uvicorn's per-request access log or the
SDK's "Processing request" / "Created new transport" chatter; consent-posture
and auth warnings still surface. SetINFO/DEBUGfor more, via
[logging] level, theMT5_MCP_LOG_LEVELenv var, orserve --log-level
(CLI > env > file).
Added
serve --stateless / --no-statelessandserve --log-levelflags.MT5_MCP_LOG_LEVELenvironment override for the log level.examples/vps/install-mt5-mcp-task.ps1installs a daily-restart companion
task (-DailyRestartAt, default03:30;-NoDailyRestartto skip) that
stops and restarts the server once a day to reclaim memory on Windows VPS
deployments.
v1.3.2
Changed
- Eager-connect is now the default. The server connects to MT5 at startup on
the main thread, before entering the transport loop, instead of lazily on the
first tool call - so stdio clients (Claude Desktop / Claude Code) and HTTP
agents no longer hit a multi-minute first call while theMetaTrader5
C-extension initialises on FastMCP's asyncio event-loop thread. The startup
connect is non-fatal: if the terminal isn't up yet the server still starts and
falls back to the lazy path. Disable withserve --no-eager-connector
[mt5] eager_connect = false; theserve --eager-connectflag still works. .mcp.jsonis no longer committed. It is per-user Claude Code install
config; register the server yourself withclaude mcp add --transport stdio --scope project mt5-mcp -- python -m mt5_mcp serve(see docs/clients.md).
Cloning the repo still auto-loads the.claude/skills/.
Packaging
- License metadata now uses the SPDX expression
license = "MIT"(PEP 639)
instead of the deprecated table form plus license classifier. - The published source distribution is leaner: demo media, CI workflows, and
editor/agent config are excluded from the sdist (the wheel was already clean).
Added
- CI runs
ruff checkas a lint gate.
Documentation
- Clarified the Linux host-side bridge as a best-effort / unsupported alternative
to the recommended all-in-one Docker image; fixed broken setup-doc anchors and
stale version references; switched repo text to ASCII.
v1.3.1
Changed
- Behavior change: the consent gate is opt-in and off by default again.
policy.auto_approve_notionalreverts to its pre-1.3.0 semantics - the default
0now disables the gate, soplace_order/close_position/
modify_orderauto-execute (full-open) with no approval step. Set
auto_approve_notional> 0 to arm the gate: orders/closes at or above that
notional then require human approval, and widening or removing a stop does too.
This reverses the 1.3.0 fail-closed default, which broke unattended agents that
expected orders to execute. The pre-flight limits (max_*) and symbol
allow/deny lists remain opt-in (0/ empty = off), as before.
Added
- A startup
WARNING(both transports) when the consent gate is off
(auto_approve_notional<= 0), so the fail-open posture is visible in the logs.
Mirrors the existing empty-auth_tokenwarning.
Fixed
place_order(priced / pending orders) andmodify_order(widening or removing
a stop) no longer turn a quote outage into anINTERNAL_ERRORwhen the consent
gate is armed. If approval is required but no live tick is available to render
the preview, they now refuse gracefully withSYMBOL_NOT_ENABLED(mirroring
close_position);modify_orderalso falls back to the position's last-known
price for widening detection during the outage.- Corrected the
doctor --smoke-tradehint when the gate is armed: to run the
smoke order you raiseauto_approve_notionalabove it (or set0), not lower it.
Upgrade note
If you relied on 1.3.0's fail-closed default to force approval on every trade,
you must now set auto_approve_notional > 0 explicitly to keep that behavior;
otherwise mutating calls execute without an approval step.