Build, backtest, and deploy quantitative trading strategies from your AI agent.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Model Context Protocol server for AI agent access to CPZAI
A production-grade Model Context Protocol (MCP) server that exposes CPZAI capabilities β strategy management, backtesting, multi-broker order routing (Alpaca / Interactive Brokers / FIX), portfolios, risk analytics, market data β as tools for any MCP-compatible AI agent (Claude, Cursor, GPT, etc.).
The hosted endpoint at https://mcp.cpz-lab.com/mcp is the only supported way to connect. This repo exists for transparency: anyone wiring their broker API keys through an AI agent should be able to read the exact code that handles those keys.
You'll need a CPZ API key + secret. Create one at ai.cpz-lab.com/settings/api-keys.
Add to .cursor/mcp.json:
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
The server speaks OAuth 2.1 + PKCE at https://mcp.cpz-lab.com/.well-known/oauth-authorization-server. Use Claude's "Connect a server" flow and point it at https://mcp.cpz-lab.com/mcp.
Design decisions:
POST /mcp creates a fresh server instance β no session tracking, scales horizontally without coordination.src/ is what runs in production.X-CPZ-Key / X-CPZ-Secret) β the same keys used by the REST API and the cpz Python SDK.18 tools exposed today, organized by domain.
| Tool | Description | Read-only |
|---|---|---|
| Strategies | ||
list_strategies | List trading strategies with filtering | β |
get_strategy | Get a specific strategy by ID | β |
create_strategy | Create a new trading strategy | |
update_strategy | Update an existing strategy | |
| Backtests | ||
get_backtest_results | List backtest run results | β |
| Orders & trading | ||
list_orders | List trading orders with filtering | β |
place_order | Place a new trading order | |
list_positions | List current portfolio positions | β |
sync_portfolio | Trigger portfolio sync across brokers | |
list_accounts | List connected trading accounts | β |
| Market data | ||
get_market_data | Real-time quotes (price, bid/ask, volume) | β |
| Risk | ||
compute_risk | Compute fresh risk snapshot (VaR, Sharpe, drawdown) | |
list_risk_snapshots | List historical risk snapshots | β |
| Execution | ||
execute_strategy | Execute a strategy on the Python backend | |
| Webhooks | ||
list_webhooks | List webhook subscriptions | β |
create_webhook | Subscribe to platform events | |
delete_webhook | Remove a webhook subscription | |
| User | ||
get_profile | Get authenticated user profile | β |
api_keys table.user_id derived from the validated key.See the privacy policy for the full data-handling story.
We don't currently support self-hosting. Use the hosted endpoint at https://mcp.cpz-lab.com/mcp with your CPZ API key. The hosted server is the same code in this repo plus AWS infrastructure (ALB, ECS Fargate, WAF, secrets) that's not part of this repo.
If you have a strong reason to self-host (e.g. air-gapped trading desk), open an issue and we'll talk.
Issues and PRs welcome. Before submitting:
npx tsc --noEmit must passnpm test must passMIT Β© CPZ Capital Ltd.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/cpzai)<a href="https://allmcps.com/mcp/cpzai"><img src="https://allmcps.com/api/badge/cpzai?style=directory" alt="CPZAI on AllMCPs" /></a>