About Mt5 Httpapi
Mt5 Httpapi is an MCP server published by psyb0t in the Finance category: metaTrader 5 in a real Windows VM (Docker + QEMU/KVM), driven over REST + MCP: programmatic trading plus server-side TA. OHLC bars enriched with RSI/MACD/Bollinger/ADX/VWAP/Ichimoku/Order Blocks/FVGs (primitives, not signals). Typed MCP tools mirror the whole surface. Multi-broker, multi-account. No Wine bullshit. Conduid read 50 tools from its source: apply_webrequest, cancel_order, close_chart, close_position, create_deployment, create_order and 44 more. No package is published for it, so it installs from a source checkout.
The repository has 31 stars and 15 forks, is licensed WTFPL, and its last commit was on 1 Dec 2026. The latest release is v4.31.1. It follows v4.31.0, and the 5 most recent releases go back to v4.29.0. It passes all 5 static checks Conduid ran on the repository. Its topics include algotrading, container, metaquotes, metatrader, mql and qemu.
Install
git clone https://github.com/psyb0t/mt5-httpapiTools (50)
apply_webrequestRe-apply one terminal's stored ``WebRequest()`` allowlist| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| runas | boolean |
cancel_orderCancel a pending order (``DELETE /orders/{ticket}``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| ticket * | integer |
close_chartClose one chart of one terminal by id, including charts no| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| chart_id * | integer | |
| instance | string |
close_positionClose an open position, fully or partially (``DELETE| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| deviation | integer | |
| instance | string | |
| ticket * | integer | |
| volume | number |
create_deploymentDeclare a deployment: run a staged expert on a chart of one| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| enabled | boolean | |
| expert * | string | |
| instance | string | |
| set_file | string | |
| symbol * | string | |
| timeframe * | string |
create_orderPlace a market or pending order on one terminal (``POST /orders``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| client_order_id | string | |
| comment | string | |
| deviation | integer | |
| expiration | integer | |
| instance | string | |
| magic | integer | |
| price | number | |
| sl | number | |
| stoplimit | number | |
| symbol * | string | |
| tp | number | |
| type * | string | |
| volume * | number |
delete_deploymentDelete a deployment; the loader EA closes its chart| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| deployment_id * | string | |
| instance | string |
delete_expertRemove a staged expert ``.ex5`` from one terminal| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| name * | string |
delete_fileDelete a file, or a directory, on one terminal| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| path * | string | |
| recursive | boolean | |
| tree | string |
delete_setRemove a staged ``.set`` file from one terminal| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| name * | string |
endpointsList every REST endpoint (method, path) one terminal exposes — theget_accountGet one terminal's balance, equity, margin and trading permissions| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
get_backtestPoll a Strategy Tester backtest job's status or fetch its artifacts.| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| job_id * | string | |
| part | string |
get_deploymentGet one deployment and its observed status| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| deployment_id * | string | |
| instance | string |
get_fileRead one file of one terminal (``GET /files/{path}``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| path * | string | |
| tree | string |
get_history_dealsGet executed deals in a date range (``GET /history/deals``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| from_ | string | |
| instance | string | |
| to | string |
get_history_ordersGet closed/cancelled orders in a date range (``GET /history/orders``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| from_ | string | |
| instance | string | |
| to | string |
get_loaderGet one terminal's loader EA status: alive, version, and which| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
get_orderGet one pending order by ticket (``GET /orders/{ticket}``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| ticket * | integer |
get_positionGet one open position by ticket (``GET /positions/{ticket}``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| ticket * | integer |
get_ratesGet OHLCV bars for one symbol/timeframe (``GET| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| count | integer | |
| from_ | string | |
| instance | string | |
| symbol * | string | |
| timeframe * | string | |
| to | string |
get_rates_taGet OHLCV bars plus a technical-analysis overlay computed by the| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| count | integer | |
| from_ | string | |
| indicators * | object | |
| instance | string | |
| symbol * | string | |
| timeframe * | string | |
| to | string |
get_setGet one staged ``.set`` file parsed into its inputs| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| name * | string |
get_symbolGet full specification for one symbol: digits, point, contract size,| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| symbol * | string |
get_terminalGet MT5 terminal info: build, broker/connection state, trade| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
get_tickGet the latest bid/ask/last tick for one symbol| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| symbol * | string |
get_ticksGet raw ticks for one symbol (``GET /symbols/{symbol}/ticks``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| count | integer | |
| flags | string | |
| from_ | string | |
| instance | string | |
| symbol * | string | |
| to | string |
get_webrequestGet the URLs one terminal's experts may call with| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
list_chartsList the charts open in one terminal with their symbol, timeframe,| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
list_deploymentsList one terminal's deployments merged with what the loader EA| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
list_expertsList one terminal's staged expert ``.ex5`` files with size and| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
list_filesList one directory of one terminal's files (``GET /files/{path}``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| path | string | |
| tree | string |
list_ordersList pending orders on one terminal (``GET /orders``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
list_positionsList open positions on one terminal (``GET /positions``). Tickets are| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
list_setsList one terminal's staged ``.set`` parameter files, uploaded and| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
list_symbolsList tradable symbol names for one terminal, optionally filtered by a| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| group | string | |
| instance | string |
list_terminalsList every configured terminal: broker, account, instance, processmodify_orderModify a pending order's price/stop-loss/take-profit/stop-limit| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| expiration | integer | |
| instance | string | |
| price | number | |
| sl | number | |
| stoplimit | number | |
| ticket * | integer | |
| tp | number |
modify_positionModify stop-loss/take-profit on an open position (``PUT| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string | |
| sl | number | |
| ticket * | integer | |
| tp | number |
pingLock-free liveness check for one terminal (``GET /ping``). Use this to| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
put_fileCreate or replace one file on one terminal, creating its| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| content | string | |
| content_base64 | string | |
| extract | boolean | |
| instance | string | |
| path * | string | |
| tree | string |
reconcile_deploymentsBump one terminal's desired-state revision| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
requestEscape hatch: call a JSON-compatible mt5-httpapi REST endpoint on| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| body | object | |
| broker * | string | |
| instance | string | |
| method * | string | |
| path * | string | |
| query | object |
screenshot_chartCapture one chart of one terminal as a PNG image| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| chart_id * | integer | |
| height | integer | |
| instance | string | |
| width | integer |
set_webrequestChange one terminal's ``WebRequest()`` URL allowlist and apply it| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| add | array | |
| broker * | string | |
| instance | string | |
| remove | array | |
| runas | boolean | |
| urls | array |
terminal_controlControl one terminal's MT5 connection: ``action`` is "init",| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| action * | string | |
| broker * | string | |
| instance | string |
update_deploymentPause, resume or re-point a deployment| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| deployment_id * | string | |
| enabled | boolean | |
| instance | string | |
| set_file | string |
upload_expertStage a compiled expert on one terminal (``POST /experts``).| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| content_base64 * | string | |
| filename * | string | |
| instance | string | |
| overwrite | boolean |
upload_setStage a ``.set`` parameter file on one terminal (``POST /sets``)| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| content | string | |
| content_base64 | string | |
| filename * | string | |
| instance | string |
verify_webrequestRead the ``WebRequest()`` allowlist one terminal really holds,| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| broker * | string | |
| instance | string |
Security checks
- ✓README presentThe repository's README runs to about 1.5K words.
- ✓License declaredThe repository declares the WTFPL license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionScanned 68 source files and found no eval, dynamic Function or shell execution.
1 check has not been run yet.
Releases
README
The repository's README runs to about 1.5K words, fetched a month ago. The original in the repository is authoritative.
Read full README