# Connect Your AI Agent — Backtesting Arena MCP

> Agent-readable page. Index of all agent-readable pages: https://tradingstrategies.work/llms.txt

Backtesting Arena is a live **Model Context Protocol server**: battle-tested crypto market
intelligence for your agent — look-ahead-free cycle scores, DSR-corrected backtests, on-chain
series and base rates. Evidence, never buy/sell advice. No execution, no custody.

- **MCP endpoint (Streamable HTTP):** `https://tradingstrategies.work/api/mcp`
- **Auth:** one-click OAuth (claude.ai / ChatGPT connectors) or `Authorization: Bearer sk-arena-…`
  — free key at https://tradingstrategies.work/dashboard/account/api-keys (no credit card)
- **Discovery:** `tools/list` works without auth and returns every tool with its schema.
- **Connecting without a catalog (any MCP client that only knows the URL):** the first `tools/call` without a token
  answers `401` with `WWW-Authenticate: Bearer resource_metadata="…/.well-known/oauth-protected-resource/api/mcp"`.
  Protected-resource metadata (RFC 9728) is served at `/.well-known/oauth-protected-resource` and
  `/.well-known/oauth-protected-resource/api/mcp` (same document). The authorization server named there publishes
  RFC 8414 metadata with dynamic client registration (RFC 7591) and PKCE S256 — public clients need no pre-issued
  client_id. `initialize`/`tools/list` stay open, so discovery starts at the first tool call, not at connect time.
  CORS `*` on `/api/mcp` and the metadata paths, `WWW-Authenticate` exposed.
- **REST alternative:** https://tradingstrategies.work/api-reference.md · OpenAPI: https://tradingstrategies.work/openapi.json
- **Pay-per-call without any account (x402, USDC on Base):** price catalog at https://tradingstrategies.work/.well-known/x402.json —
  the discovery tier is FREE: `/api/v1/agent/catalog/{strategies,universes,onchain-series,knowledge}` cost nothing, so an agent can find the right endpoint before paying a data price.

## Install per client

### Claude (claude.ai & Desktop) — Custom Connector

*Settings → Connectors → Add custom connector*

```text
https://tradingstrategies.work/api/mcp
```

> One-click OAuth, no API key needed. Add the URL as a custom connector — done.

### Claude Code (CLI)

*Terminal*

```bash
claude mcp add --transport http backtesting-arena https://tradingstrategies.work/api/mcp \
  --header "Authorization: Bearer sk-arena-YOUR_KEY"
```

### Cursor

*~/.cursor/mcp.json (global) oder .cursor/mcp.json (Projekt)*

```json
{
  "mcpServers": {
    "backtesting-arena": {
      "url": "https://tradingstrategies.work/api/mcp",
      "headers": { "Authorization": "Bearer sk-arena-YOUR_KEY" }
    }
  }
}
```

### VS Code (Copilot Agent Mode)

*.vscode/mcp.json*

```json
{
  "servers": {
    "backtesting-arena": {
      "type": "http",
      "url": "https://tradingstrategies.work/api/mcp",
      "headers": { "Authorization": "Bearer sk-arena-YOUR_KEY" }
    }
  }
}
```

### Gemini CLI

*~/.gemini/settings.json*

```json
{
  "mcpServers": {
    "backtesting-arena": {
      "httpUrl": "https://tradingstrategies.work/api/mcp",
      "headers": { "Authorization": "Bearer sk-arena-YOUR_KEY" }
    }
  }
}
```

### Codex CLI

*~/.codex/config.toml*

```toml
[mcp_servers.backtesting_arena]
url = "https://tradingstrategies.work/api/mcp"
http_headers = { "Authorization" = "Bearer sk-arena-YOUR_KEY" }
```

> Requires a Codex release with streamable-HTTP MCP support (newer versions).

### ChatGPT (Developer Mode Connector)

*Settings → Connectors → Create*

```text
https://tradingstrategies.work/api/mcp
```

> OAuth flow runs automatically. After server updates, re-INSTALL the connector rather than just reconnecting — ChatGPT otherwise keeps the stale state.

## Tool families

The authoritative list is `tools/list` on the endpoint above (works unauthenticated). Families:

- **Market & cycle snapshots + history** — e.g. `arena_get_pulse`, `arena_get_cycle`, `arena_get_macro_regime`, `arena_get_funding_rate_history`, `arena_get_kimchi_premium`
- **On-chain series** — e.g. `arena_list_onchain_series`, `arena_get_onchain_history`, `arena_get_sth_cost_basis`, `arena_get_max_pain`
- **Strategy insights & edge evidence** — e.g. `arena_get_strategy_insights`, `arena_get_edge_reports`, `arena_get_strategy_performance_by_regime`
- **Backtest execution & validation** — e.g. `arena_run_backtest`, `arena_compare_strategies`, `arena_run_universe_backtest`, `validate_strategy`
- **Altcoin screening** — e.g. `arena_get_gem_scores`, `arena_get_gem_validation`
- **Volatility** — e.g. `arena_get_volatility_history`, `arena_get_volatility_recommendations`
- **Knowledge objects & ontology** — e.g. `arena_list_knowledge`, `arena_get_knowledge`, `arena_get_ontology_term`
- **Decision math & analogs** — e.g. `arena_dip_decision`, `arena_get_historical_analog`, `arena_dip_scenario`, `arena_get_robustness_field`
- **Live subscriptions** — e.g. `arena_subscribe_signal_alerts`, `arena_check_subscription_updates`

## Notes

- Free tier available; window depth and some tools are tier-gated — responses declare their
  window (`range`, `clamped`) instead of silently truncating.
- Every authenticated backtest run is persisted into the public evidence library (Strategy
  Insights, Edge Library) — an agent produces evidence, not only reads it.
- Human overview: https://tradingstrategies.work/agents · Interactive docs: https://tradingstrategies.work/api-docs
