Connect an OpenClaw/MCP agent to a self-hosted mt5-httpapi MetaTrader 5 bridge over MCP. Provides HTTP interface to every configured MetaTrader 5 terminal, exposed over MCP as dedicated typed tools.
Strong foundation with 25 tools, all with descriptions and input schemas. Naming follows verb_noun convention (list_, get_, create_, modify_, close_, cancel_). Descriptions are detailed and include HTTP method hints. However, output schemas are not documented, LLMs cannot predict response structure. Parameter descriptions are present but inconsistent in depth. Several tools lack enum constraints for constrained inputs (e.g., 'action' in terminal_control, 'type' in create_order, 'flags' in get_ticks). Error handling guidance is minimal. Security-sensitive tools (close_position, create_order, modify_position) lack explicit confirmation/dry-run patterns despite being destructive.
Cancel a pending order (``DELETE /orders/{ticket}``). This is an irreversible action on a live trading account — only call it when the user explicitly asked for that specific action.
Close an open position (``DELETE /positions/{ticket}``). This is an irreversible action on a live trading account — only call it when the user explicitly asked for that specific action.
Create a new order (``POST /orders``). This is an irreversible action on a live trading account — only call it when the user explicitly asked for that specific action.
List all available REST endpoints and their HTTP methods. Returns the route catalog for reference.
Get one terminal's balance, equity, margin and trading permissions (``GET /account``).
Output schemas not documented. LLMs cannot predict response structure for any tool. Responses from get_account, list_positions, get_rates, etc. lack field definitions, forcing agents to guess at downstream field names and types.
Destructive tools lack confirmation/dry-run patterns. create_order, modify_position, close_position, cancel_order, modify_order are irreversible on live accounts but have no confirmation step or dry-run mode. Agents can execute trades without explicit user approval.
Constrained parameters lack enum definitions. 'action' in terminal_control (init/shutdown/restart), 'type' in create_order, 'flags' in get_ticks (ALL/INFO/TRADE), 'timeframe' in get_rates are free-form strings without enum constraints. LLMs will hallucinate invalid values.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 69 | 2026-07-28+ | v2 |
Get backtest status and results (``GET /backtest/{job_id}``). Polling interface; new runs are multipart, submit via REST.
Get historical deals (``GET /history/deals``).
Get historical orders (``GET /history/orders``).
Get one pending order by ticket (``GET /orders/{ticket}``).
Get one open position by ticket (``GET /positions/{ticket}``).
Get OHLCV bars for one symbol/timeframe (``GET /symbols/{symbol}/rates``). ``timeframe``: one of M1/M2/M3/M4/M5/M6/M10/M12/M15/M20/M30/H1/H2/H3/H4/H6/H8/H12/D1/W1/MN1. ``count``: positive = forward from ``from_``, negative = backward ending at ``from_``, omitted with no ``from_``/``to`` = last 100 bars. ``from_``/``to``: unix seconds or ``YYYY_MM_DD[_HH_MM_SS]``; ``to`` requires ``from_`` and is mutually exclusive with ``count``.
Get OHLCV bars for one symbol/timeframe plus a technical-analysis overlay computed by the wickworks sidecar (``POST /symbols/{symbol}/rates/ta``). ``timeframe``: same values as ``get_rates``. ``indicators``: a non-empty wickworks indicator spec object. ``count``/``from_``/``to``: same semantics as ``get_rates``.
Get full specification for one symbol: digits, point, contract size, margin/volume limits (``GET /symbols/{symbol}``).
Get MT5 terminal info: build, broker/connection state, trade permissions (``GET /terminal``).
Get the latest bid/ask/last tick for one symbol (``GET /symbols/{symbol}/tick``).
Get raw ticks for one symbol (``GET /symbols/{symbol}/ticks``). ``count``: positive = forward from ``from_``, negative = backward ending at ``from_``, omitted with no ``from_``/``to`` = last 100 ticks. ``from_``/``to``: unix seconds or ``YYYY_MM_DD[_HH_MM_SS]``; ``to`` requires ``from_`` and is mutually exclusive with ``count``. ``flags``: ALL / INFO / TRADE (default ALL).
List all pending orders (``GET /orders``).
List all open positions (``GET /positions``).
List tradable symbol names for one terminal, optionally filtered by a glob-style ``group`` pattern, e.g. ``"*USD*"`` (``GET /symbols``). Symbol names and suffixes differ per broker.
List every configured terminal: broker, account, instance and process mode (live or backtest). Call this before any other tool to learn which broker/account values are valid — the other tools reject anything not listed here rather than guessing.
Modify a pending order (``PUT /orders/{ticket}``). This is an irreversible action on a live trading account — only call it when the user explicitly asked for that specific action.
Modify stop-loss/take-profit on an open position (``PUT /positions/{ticket}``). Omitted ``sl``/``tp`` keep the position's current value. This is an irreversible action on a live trading account — only call it when the user explicitly asked for that specific action.
Lock-free liveness check for one terminal (``GET /ping``). Use this to tell a configured-but-down terminal from a reachable one.
Generic JSON request escape hatch for routes without a dedicated tool (``GET/POST/PUT/DELETE {path}``). Allows arbitrary HTTP method and path combinations.
Control one terminal's MT5 connection: ``action`` is "init", "shutdown" or "restart" (``POST /terminal/{action}``). ``shutdown`` disconnects that API process from the MT5 SDK while leaving terminal64.exe running. ``restart`` kills and relaunches that selected terminal process. Only call either on explicit user request, and confirm which terminal first.
Error handling lacks recovery guidance. No tool description explains what to do on failure (retry, ask user, abort). Agents receive raw HTTP errors with no actionable next steps.
Generic 'request' tool bypasses safety. The request tool accepts arbitrary HTTP methods and paths, allowing agents to call undocumented endpoints and bypass tool-level validation. This is a security and reliability risk.