# CPZAI

Wires your agent into CPZAI for strategies, saved backtests, broker accounts, orders, positions, market data and risk snapshots. Needs an API key and secret.

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

## What it does

The endpoint is `https://mcp.cpz-lab.com/mcp`, served over stateless Streamable HTTP. Version 1.4.0 registers 34 tools, three guide resources and two workflow prompts. What is actually deployed can differ from the source, so check `tools/list`, `resources/list` and `prompts/list` in your client.

Authentication uses the `X-CPZ-Key` and `X-CPZ-Secret` headers, created under Settings → API Keys. Clients that support OAuth can point at the same URL and sign in with PKCE S256. Access tokens are opaque and must not be handed to the REST API directly. The older `Bearer cpz_key_…SECRET` credentials are off by default, so without headers or OAuth nothing connects.

Tools cover strategies, overlays, backtests, orders, portfolio, accounts, provider connections, data files, market data, risk, execution, middle office, webhooks and profile. Every list call takes `limit` (1–100) and `offset`; the default limit is 50, and 100 for `list_accounts`. `place_order` wants a positive quantity, limit orders need `price`, stop orders need `stop_price`, and `time_in_force` only accepts `day`. `execute_strategy` places real trades rather than previewing a signal.

## Requirements
- Remote server: `https://mcp.cpz-lab.com/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http cpzai https://mcp.cpz-lab.com/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add cpzai --url https://mcp.cpz-lab.com/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "cpzai": {
            "url": "https://mcp.cpz-lab.com/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "cpzai": {
            "type": "http",
            "url": "https://mcp.cpz-lab.com/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http cpzai https://mcp.cpz-lab.com/mcp
```

## When to use it
- list strategies with their status and type
- read a saved backtest run
- pull historical OHLCV bars for a symbol
- compute a fresh risk snapshot for an account
- sync positions across connected broker portfolios

## Example prompts
- List my strategies with status and type
- Fetch daily bars for `AAPL` over the last month
- Compute and store a risk snapshot for my account

## Similar
- [alva](https://affpapa.org/en/nevibecode/skills/alva.md) — skill · 800 installs
- [quant-analyst](https://affpapa.org/en/nevibecode/agents/quant-analyst.md) — subagent · 1366 installs
- [Wudao A-Share Stock Data MCP](https://affpapa.org/en/nevibecode/mcp/wudao-a-share-stock-data-mcp.md) — MCP server · ★ 11
- [NexusTrade Financial MCP](https://affpapa.org/en/nevibecode/mcp/nexustrade-financial-mcp.md) — MCP server · ★ 10
- [market-data](https://affpapa.org/en/nevibecode/skills/market-data.md) — skill · 742 installs
- [llmquant-options](https://affpapa.org/en/nevibecode/skills/llmquant-options.md) — skill · 488 installs

---
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
