# Backtest360

Connect an AI agent to Backtest360 to inspect strategy templates, validate strategies, run backtests, and review results. Useful when you want to work with the engine through an MCP client.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: Backtest360
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Backtest360/backtest360-mcp
- Updated: 2026-07-29
- HTML: https://affpapa.org/en/nevibecode/mcp/backtest360

## What it does

Backtest360 exposes the engine API to MCP clients. An agent can browse indicators and templates, retrieve the strategy schema, validate a strategy before running it, launch a historical backtest, or compare strategies on the same data. The server does not perform the financial analysis itself; it forwards requests to the engine and shapes the returned results.

Connect through the hosted HTTP endpoint or run the server locally over stdio. Local use requires Python 3.10+ and a Backtest360 API key, supplied as `BACKTEST360_API_KEY`. Your key and plan govern permissions and data access. Server-side retrieval of historical price data is a paid capability, so the plan matters if a workflow needs it. Backtest results can be requested at different levels of detail; oversized responses are reduced and marked.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Remote server: `https://mcp.backtest360.com/mcp`
- Environment variables: `BACKTEST360_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI**
```bash
claude mcp add backtest360 -e BACKTEST360_API_KEY=<BACKTEST360_API_KEY> -- uvx backtest360-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from backtest360-mcp <command>

2. **Platform CLI: remote server**
```bash
claude mcp add --transport http backtest360 https://mcp.backtest360.com/mcp
```

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add backtest360 --url https://mcp.backtest360.com/mcp
```

2. **Platform CLI**
```bash
codex mcp add backtest360 --env BACKTEST360_API_KEY=<BACKTEST360_API_KEY> -- uvx backtest360-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from backtest360-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "backtest360": {
            "url": "https://mcp.backtest360.com/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "backtest360": {
            "command": "uvx",
            "args": [
                "backtest360-mcp"
            ],
            "env": {
                "BACKTEST360_API_KEY": "<BACKTEST360_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from backtest360-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "backtest360": {
            "type": "http",
            "url": "https://mcp.backtest360.com/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "backtest360": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "backtest360-mcp"
            ],
            "env": {
                "BACKTEST360_API_KEY": "<BACKTEST360_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from backtest360-mcp <command>

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http backtest360 https://mcp.backtest360.com/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e BACKTEST360_API_KEY=<BACKTEST360_API_KEY> backtest360 uvx backtest360-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from backtest360-mcp <command>

## When to use it
- turn a plain-language idea into a strategy
- validate a strategy before running it
- compare strategies on matching data
- retrieve ticker history and performance metrics

## Example prompts
- Build a strategy from my idea and validate it with Backtest360.
- Run a historical backtest for this strategy and explain its metrics.
- Compare this strategy with buy-and-hold using the same data.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 397855
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 34011
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89674
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81191
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74577
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 90077

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
