btmcp
# btmcp — a point-in-time backtesting MCP server
Two tool surfaces over one backtesting core, built to measure how reliably language
models use each one. The backtester is deliberately modest.
## Get started
```bash
git clone <repo> && cd backtesting-mcp && uv sync && uv run btmcp-demo
```
No API key, no network. Runs a real backtest on the committed synthetic dataset and
prints the point-in-time check.
Two surfaces sit on the same core: A exposes nine granular tools, B consolidates them into four.
```bash
uv run btmcp-serve --surface a --tier simulate
```
Measure what each tool puts in a context window, with no API key and no cost:
```bash
uv run btmcp-audit --out results/x0/
```
Smoke-test the whole eval sweep at zero cost, then read the paired report:
```bash
uv run btmcp-eval --surface a --model null --split dev --seeds 1 --out results/smoke/a
```
## Protocol
Built against **MCP Python SDK 2.1.1**. Protocol version: **`2026-07-28`**
## Scope
**In:** daily bars, ≤20 symbol universe, long/flat positions, declarative strategy
specs, one cost model, deterministic runs.
**Out:** intraday, shorting, portfolio optimisation, corporate actions beyond
adjusted closes, survivorship-bias correction, live data, order routing, arbitrary
user code.
This is a research harness. It is not a trading system and it is not investment advice.
TDQS
Scored across 10 tools
Most tools have clearly distinct purposes: listing symbols, profiling series, fetching bars, running/validating backtests, and inspecting runs/trades. The only mild overlap is between describe_series and get_bars, since both return summary statistics about price data, but their different scopes (single-series profile vs. multi-symbol window aggregates) make the boundary clear enough.
All tool names follow a consistent snake_case verb_noun pattern: list_symbols, describe_series, get_bars, validate_strategy, run_backtest, explain_trades, publish_run_report. There is no mixing of camelCase, inconsistent verbs, or vague names like 'process' or 'helper'.
Ten tools is well-scoped for a backtesting/data-analysis server. Each tool covers a distinct stage of the workflow: data discovery, series inspection, bar data, news, strategy validation, backtest execution, run retrieval, comparison, trade explanation, and publishing.
The core backtesting workflow is well covered: explore data, validate a strategy, run it, inspect results, compare runs, explain trades, and publish a report. A minor gap is the lack of a list_runs or similar discovery tool, so an agent without prior run IDs cannot enumerate completed runs, though this is workable since run_backtest returns IDs and links.