mcp
v23.7.0Model Context Protocol server for backtest-kit: lets an LLM agent observe the live trading portfolio and open or close positions through guarded tools
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_status
Read the trading portfolio. The only read path: every other tool writes. PAPER TRADING ONLY: virtual capital, real market prices. No exchange account, no real order, no real money at risk. Fees and slippage are real, so results are meaningful — the balance is not. DO NOT CALL MORE OFTEN THAN ONCE PER 90 SECONDS. The engine applies queued commands once a minute; calling sooner returns the same snapshot, because the tick that would change it has not run. After issuing a command wait 90s before checking — one tick plus margin. Tight polling wastes context and invites the false conclusion that…
open_position
Open a PAPER trading position at market price. One position per symbol. PAPER TRADING ONLY: virtual capital, real market prices. No exchange account, no real order, nothing here loses real money. Trade it as seriously as the real thing anyway — the deliverable is an honest record, and a sloppy paper trade produces a worthless one. YOU CONTROL: symbol, direction (long or short), and the description explaining why. Nothing else. The engine computes the entry cost and sets a distant emergency stop that only caps a catastrophic loss. You cannot size the position, pick an entry price or set your…
| Parameter | Type | Description |
|---|---|---|
description * | string | Reason for opening the position. Detailed multi-line markdown is strongly preferred: headings, lists, emphasis, code blocks and quotes all render |
position * | string | Trade direction: "long" (buy) or "short" (sell) |
symbol * | string | Trading pair symbol (e.g., BTCUSDT) |
close_position
Close the active PAPER position of a symbol at market price. PAPER TRADING ONLY: virtual capital, real market prices. No exchange account, no real order; the realized result is recorded, not paid out. THIS IS THE ONLY REAL EXIT. Nothing else takes profit or cuts a loss on purpose — the position has no working take-profit, and the only automatic ends are the distant emergency stop and the hold timeout, both meaning the trade got away from you. Deciding when to call this IS the job. YOU CONTROL: the symbol and the description. The engine resolves which position closes and executes at market pr…
| Parameter | Type | Description |
|---|---|---|
description * | string | Reason for closing the position. Detailed multi-line markdown is strongly preferred: headings, lists, emphasis, code blocks and quotes all render |
symbol * | string | Trading pair symbol (e.g., BTCUSDT) |
average_position
Add a DCA (dollar-cost averaging) entry to the active PAPER position of a symbol at market price. PAPER TRADING ONLY: virtual capital, real market prices. No exchange account, no real order. WHAT IT DOES: invests the configured entry cost again into the same position, same direction. The effective entry becomes the cost-weighted average of all entries, so the position needs a smaller move to recover — while the money at risk grows by the same amount. get_status then lists every entry separately alongside the new average and raised balance. YOU CONTROL: only the symbol. The engine picks the p…
| Parameter | Type | Description |
|---|---|---|
symbol * | string | Trading pair symbol (e.g., BTCUSDT) |
notify_user
Attach a note to the active PAPER position of a symbol. Changes nothing about the trade — it only records reasoning. WHY IT EXISTS: open_position records why a trade started, close_position why it ended. Everything in between — price behaved unexpectedly, the thesis shifted, a level was reached, an averaging needs justifying — has no other place to live. Without notes a later call sees an open position, a number, and no idea what it was meant to be doing. WRITE FOR A READER WITH NO MEMORY. Later calls recall nothing of this moment; they read exactly what is stored. State what is observed…
| Parameter | Type | Description |
|---|---|---|
description * | string | Description to attach to the active position. Detailed multi-line markdown is strongly preferred: headings, lists, emphasis, code blocks and quotes all render |
symbol * | string | Trading pair symbol (e.g., BTCUSDT) |