Metadata-Version: 2.4
Name: qdf-mcp
Version: 0.2.0
Summary: QuantDataForge MCP servers — StrategyCreator + Open Cockpit, run locally via uvx with one API token.
Project-URL: Homepage, https://quantdataforge.com
Project-URL: Source, https://github.com/cameronsice/QuantDataForge
Author: QuantDataForge
License-Expression: MIT
Keywords: backtest,claude,mcp,quantdataforge,trading
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.2.0
Description-Content-Type: text/markdown

# qdf-mcp

Two MCP servers that let a [QuantDataForge](https://quantdataforge.com) subscriber
drive the platform from their own Claude Code / Claude Desktop:

- **`qdf-mcp-strategy`** — *StrategyCreator*: author trading strategies in Python,
  backtest them against QDF's 5-year 1-minute futures history (ES, NQ), and read
  the metrics + equity curve back — all in your Claude session.
- **`qdf-mcp-cockpit`** — *Open Cockpit*: a live, read-only window into the open —
  which levels are armed, how each is defended tick-by-tick, plus market-state,
  options and catalyst reads.

Both are thin HTTPS clients. All the heavy lifting (data, backtest engine, sandbox)
runs on the QDF server. Each server scopes everything to **your personal API token**.

## Setup

### 1. Install `uv` (one time)

`uvx` runs the servers in an isolated environment and pulls all dependencies
automatically — **you do not need to install any Python packages by hand.**

- **Windows:** `powershell -ExecutionPolicy Bypass -c "irm https://astral.sh/uv/install.ps1 | iex"`
- **macOS / Linux:** `curl -LsSf https://astral.sh/uv/install.sh | sh`

(Or `pip install uv` if you already have Python.)

### 2. Get your token

On the website, open **Strategy Lab → API Tokens**, click **Generate**, and copy
the `qdf_sk_…` token (shown once). **The same token works for both servers.**

### 3. Add the servers to your Claude config

Paste this into your MCP client config — Claude Desktop's
`claude_desktop_config.json`, or a project `.mcp.json` for Claude Code — with your
token in both places:

```json
{
  "mcpServers": {
    "strategy-creator": {
      "command": "uvx",
      "args": ["--from", "qdf-mcp", "qdf-mcp-strategy"],
      "env": {
        "QDF_API_TOKEN": "qdf_sk_…your token…",
        "QDF_API_URL": "https://quantdataforge.com"
      }
    },
    "qdf-cockpit": {
      "command": "uvx",
      "args": ["--from", "qdf-mcp", "qdf-mcp-cockpit"],
      "env": {
        "QDF_API_BASE": "https://quantdataforge.com",
        "COCKPIT_READ_TOKEN": "qdf_sk_…your token…"
      }
    }
  }
}
```

Don't need both? Keep just the block you want — they're independent and the same
token authorizes either.

### 4. Restart your client and ask Claude

- *"Scaffold a breakout strategy and backtest it on ES 1m."*
- *"Watch the cockpit and tell me when a level breaks."*

The cockpit's live tools only return data during the watch window (~08:00–10:30 ET)
with the feed up; outside that they report the feed is offline rather than erroring.

## Requirements

Python ≥ 3.10 (uv manages this for you). The only dependencies are `mcp` and
`httpx`, installed automatically by `uvx`.
