Backtest360 MCP server
✓ VerifiedEnables AI agents to discover indicators, build and validate trading strategies, and run historical backtests using the Backtest360 engine.
Also known as Backtest360/backtest360-mcp, backtest360-mcp
- Stars
- 0
- Tools
- 15
- Downloads, 30 days
- 278
- Latest version
- 0.5.0
- Last commit
- Jul 29, 2026
- License
- MIT
What is Backtest360 MCP?
Backtest360 enables AI agents to discover indicators, build and validate trading strategies, and run historical backtests using the Backtest360 engine. It exposes 15 tools, such as engine_info, get_me, get_catalog.
Summary generated from the project's README
About Backtest360 MCP server
Backtest360 provides an MCP server that acts as a bridge between AI agents and the Backtest360 engine. It allows developers to use conversational interfaces to discover technical indicators, build trading strategies, and execute historical backtests. The server functions as a thin adapter that communicates with the engine via an HTTP API, meaning it does not perform its own calculations or host its own AI logic.
Users can connect through a hosted HTTP endpoint or by running the server locally via stdio. Access requires a Backtest360 API key, which determines permissions and data access limits. While the free tier allows backtesting on user-uploaded data, fetching historical price data directly from the engine requires a paid plan. The server includes specific tools for validating strategy schemas, comparing multiple backtests, and searching for tickers or macroeconomic series.
To manage large datasets, the server offers response shaping options to prevent exceeding agent context limits. Users can request summaries, detailed statistics, or specific data blocks like equity curves and monthly returns. The system is designed for agentic workflows, providing structured error messages that help the AI understand if a failure can be fixed by adjusting the request parameters.
What you can do with it
- 1Convert ideas into strategiesAn AI agent can take a plain-language trading idea and turn it into a validated strategy document.
- 2Perform robustness reviewsA developer can ask an agent to evaluate a strategy by running it and comparing it against a buy-and-hold benchmark.
Written from the project's README. Every use case is checked against a quote from it.
How to install Backtest360 MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Backtest360 MCP in Claude Code
$ claude mcp add --env 'BACKTEST360_API_KEY=<YOUR_BACKTEST360_API_KEY>' backtest360-mcp -- uvx backtest360-mcpInstall Backtest360 MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"backtest360-mcp": {
"command": "uvx",
"args": [
"backtest360-mcp"
],
"env": {
"BACKTEST360_API_KEY": "<YOUR_BACKTEST360_API_KEY>"
}
}
}
}Install Backtest360 MCP in VS Code
.vscode/mcp.json
{
"servers": {
"backtest360-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"backtest360-mcp"
],
"env": {
"BACKTEST360_API_KEY": "<YOUR_BACKTEST360_API_KEY>"
}
}
}
}Install Backtest360 MCP in VS Code CLI
$ code --add-mcp '{"name":"backtest360-mcp","type":"stdio","command":"uvx","args":["backtest360-mcp"],"env":{"BACKTEST360_API_KEY":"<YOUR_BACKTEST360_API_KEY>"}}'Install Backtest360 MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"backtest360-mcp": {
"command": "uvx",
"args": [
"backtest360-mcp"
],
"env": {
"BACKTEST360_API_KEY": "<YOUR_BACKTEST360_API_KEY>"
}
}
}
}Install Backtest360 MCP in Codex
$ codex mcp add backtest360-mcp --env 'BACKTEST360_API_KEY=<YOUR_BACKTEST360_API_KEY>' -- uvx backtest360-mcpInstall Backtest360 MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.backtest360-mcp] command = "uvx" args = ["backtest360-mcp"] [mcp_servers.backtest360-mcp.env] BACKTEST360_API_KEY = "<YOUR_BACKTEST360_API_KEY>"
Install Backtest360 MCP in Gemini CLI
$ gemini mcp add -s user -e 'BACKTEST360_API_KEY=<YOUR_BACKTEST360_API_KEY>' backtest360-mcp uvx -- backtest360-mcpInstall Backtest360 MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"backtest360-mcp": {
"command": "uvx",
"args": [
"backtest360-mcp"
],
"env": {
"BACKTEST360_API_KEY": "<YOUR_BACKTEST360_API_KEY>"
}
}
}
}Backtest360 MCP tools 15
Detected from the READMEengine_infoget_meget_cataloglist_indicatorslist_templatesget_strategy_schemavalidate_strategyrun_backtestget_latest_signalcompare_backtestscompute_statsget_data_range
| engine_info | — | |
| get_me | — | |
| get_catalog | — | |
| list_indicators | — | |
| list_templates | — | |
| get_strategy_schema | — | |
| validate_strategy | — | |
| run_backtest | — | |
| get_latest_signal | — | |
| compare_backtests | — | |
| compute_stats | — | |
| get_data_range | — |
Show all 15 toolsShow fewer tools
get_ticker_infoget_quoteget_price_history
| get_ticker_info | — | |
| get_quote | — | |
| get_price_history | — |
Configuration
BACKTEST360_API_KEYRequiredSecretBacktest360 engine API key, sent to the engine as X-API-Key. Get a free key at https://backtest360.com/api-access.
| Name | Description | |
|---|---|---|
| BACKTEST360_API_KEY | Backtest360 engine API key, sent to the engine as X-API-Key. Get a free key at https://backtest360.com/api-access. | RequiredSecret |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachablebacktest360/backtest360-mcp is public and reachablegithub.com/backtest360/backtest360-mcp ↗Pass
- Package names this repository as its sourcebacktest360-mcp names backtest360/backtest360-mcp as sourcepypi.org/project/backtest360-mcp/ ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-07-29github.com/backtest360/backtest360-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from backtest360-mcpPass
- No critical advisory in the package or its dependencies32 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model15 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeEndpoint did not answer initialize: HTTP 502Finding
README
View on GitHubbacktest360-mcp
MCP server exposing the Backtest360 engine API as tools for AI agents.
Connect any MCP-capable AI client and drive real backtests conversationally: discover indicators, build and validate strategies, run backtests, and read the results — all against the deterministic Backtest360 engine. The server contains no AI and computes no numbers of its own; it is a thin, faithful adapter over the engine HTTP API. Your engine API key and its plan govern everything (permissions, rate limits, data access).
Two transports: a hosted HTTP endpoint at
https://mcp.backtest360.com/mcp (send your key as an X-API-Key header) and local
stdio (self-host — see below).
Install
pip install backtest360-mcp # or, from a clone: pip install -e .
Requires Python 3.10+ and a Backtest360 API key. Get one free, instantly at
backtest360.com/api-access — submit your email and a key
(format b360_…) is issued on the spot and emailed to you; no approval needed. Authentication
is API-key only. The free tier runs backtests on data you upload; fetching historical price
data from the engine server-side is a paid capability.
Configuration
Everything is environment-driven:
| Variable | Required | Default | Purpose |
|---|---|---|---|
BACKTEST360_API_KEY |
yes | — | Engine API key, sent as X-API-Key |
BACKTEST360_ENGINE_URL |
no | https://api.backtest360.com |
Engine base URL |
BACKTEST360_MCP_TIMEOUT |
no | 300 |
Per-request timeout (seconds) |
BACKTEST360_MCP_MAX_OUTPUT_BYTES |
no | 100000 |
Hard cap on a single tool result |
Connect an MCP client
Hosted (recommended)
Point your MCP client at the hosted endpoint over HTTP and send your key as an
X-API-Key header:
{
"mcpServers": {
"backtest360": {
"type": "streamable-http",
"url": "https://mcp.backtest360.com/mcp",
"headers": {
"X-API-Key": "b360_..."
}
}
}
}
Local (stdio)
Run the server yourself and let your client launch it over stdio (the common
mcpServers shape):
{
"mcpServers": {
"backtest360": {
"command": "backtest360-mcp",
"env": {
"BACKTEST360_API_KEY": "b360_..."
}
}
}
}
Prefer not to put the key in a config file? Point command at a small wrapper script
that exports the key from your secrets manager and then runs backtest360-mcp. A
minimal example config is in examples/mcp.json.
Tools
| Tool | What it does |
|---|---|
engine_info |
Engine version, API contract, health |
get_me |
What the configured key can do: permission scopes, limits, current usage, capability flags |
get_catalog |
Reference catalogs: operators, execution modes, stop types, sizing methods, bar frequencies, metric sections |
list_indicators |
Indicator discovery; per-indicator parameter schemas |
list_templates |
Predesigned strategy templates — discover compactly, fetch one in full, ready to validate and run |
get_strategy_schema |
JSON Schema for strategy documents |
validate_strategy |
Validate a strategy without running it — returns structured, locatable errors |
run_backtest |
Run a historical backtest |
get_latest_signal |
Evaluate the most recent bar only (no P&L) |
compare_backtests |
Run several strategies on the same data, side by side |
compute_stats |
Compute the metric set from an externally produced returns series |
search_tickers / list_tickers |
Asset discovery for server-side data fetch |
get_data_range |
Available history and bar-count estimate for a symbol |
get_ticker_info |
Symbol identity and data coverage in a single call |
get_quote |
Latest available price for a symbol (paid plan) |
get_price_history |
OHLCV price history over a date range (paid plan; long histories downsampled to fit) |
list_macro_series / get_macro_series |
Macroeconomic data: list the series catalog, then fetch one series' observations |
The cheap static catalogs are also published as MCP resources
(backtest360://catalog/{name}, backtest360://schema/strategy) for clients that
support resource attachment.
Prompts
Two workflow prompts scaffold the common multi-tool flows for a connected AI: each names which tools to call, in what order, and what to look at in the results. They carry no interpretation and compute nothing — the connected AI does the reasoning.
| Prompt | Arguments | What it scaffolds |
|---|---|---|
robustness_review |
symbol, strategy (optional) |
Review a backtested strategy for robustness: validate → run → compare against buy-and-hold → weigh the evidence base (sample size, significance/robustness statistics, warnings) → caveated summary |
build_and_validate |
idea |
Turn a plain-language idea into a validated strategy: survey the catalogs → fetch the schema → construct → validate-and-fix loop → dry-run |
Response shaping
A full backtest result is megabytes; an agent's context is not. run_backtest and
compare_backtests take response_detail:
summary(default) — headline metrics, warnings, counts, equity endpointsstats— every metric the plan allowsfull— plus series (downsampled, endpoints preserved) and trades (paginated)
run_backtest also takes max_series_points (default 500, must be >= 2) to
override the series downsampling cap — set it higher for full-resolution
series on a long run, or leave it unset for today's default.
include=["trades", "equity_curve", "monthly_returns", "yearly_returns", "signal_diagnostics"] adds specific blocks at any detail level.
signal_diagnostics reports which per-bar entry/exit conditions fired, as a
capped list of fire dates per condition (not the raw per-bar boolean arrays,
which downsampling would corrupt) — or {"available": false, ...} when the
run has no condition tree to evaluate (e.g. precomputed signals). Results
exceeding the output cap are reduced further and explicitly marked
truncated_by_mcp — never silently cut. Shaping only ever selects and thins
what the engine returned; no value is computed or altered.
Error semantics
Designed for agents:
- Fixable by changing the request → returned as a normal result: failed validations
arrive as
{"valid": false, "errors": [...]}with machine codes and document locations; engine rejections arrive as{"accepted": false, "error": ...}with a hint. - Not fixable that way → a tool error with explicit guidance: rate limits carry the
Retry-Aftervalue; engine-busy says retry with backoff; a compute timeout says do not retry and reduce scope instead; permission problems name the missing capability. Engine request ids are included for support.
Running the tests (self-host)
pip install -e ".[dev]"
pytest # unit suite vs a mock engine — no network
Questions / feedback
Questions or feedback? hello@backtest360.com — we read everything. backtest360-mcp is in active development, so help shape it.
Bug reports and feature requests: open an issue on GitHub.
License
MIT — see LICENSE.
Backtest360 MCP questions
How do I add Backtest360 MCP to Claude Code?
Run claude mcp add --env 'BACKTEST360_API_KEY=<YOUR_BACKTEST360_API_KEY>' backtest360-mcp -- uvx backtest360-mcp in your terminal. Add --scope user to make it available in every project.
How do I add Backtest360 MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Backtest360 MCP provide?
It exposes 15 tools, including engine_info, get_me, get_catalog, list_indicators, list_templates.
Can I fetch historical price data on the free tier?
No, fetching historical price data from the engine server-side is a paid capability; the free tier only runs backtests on data you upload.
Does the MCP server perform any calculations itself?
No, the server is a thin adapter that communicates with the engine API and does not compute numbers or contain AI.