cpzai-mcp-server
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cpzai-mcp-serverWhat's my portfolio worth right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Quick Start
You'll need a CPZ API key + secret. Create one at ai.cpz-lab.com/settings/api-keys.
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"cpzai": {
"url": "https://mcp.cpz-lab.com/mcp",
"headers": {
"X-CPZ-Key": "your_cpz_key",
"X-CPZ-Secret": "your_cpz_secret"
}
}
}
}Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"cpzai": {
"url": "https://mcp.cpz-lab.com/mcp",
"headers": {
"X-CPZ-Key": "your_cpz_key",
"X-CPZ-Secret": "your_cpz_secret"
}
}
}
}Claude (web / mobile) via OAuth
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.
Related MCP server: BotSpot
Architecture
Agent (Cursor / Claude / GPT / custom)
│
│ Streamable HTTP + X-CPZ-Key / X-CPZ-Secret
▼
mcp.cpz-lab.com
│
▼
Node.js MCP server (stateless) ← this repo
│
│ per-request API key validation
▼
CPZ Platform REST APIDesign decisions:
Stateless transport. Each
POST /mcpcreates a fresh server instance — no session tracking, scales horizontally without coordination.Thin protocol adapter. Validates the API key, then proxies tool calls to the CPZ REST API. Zero business logic in the MCP layer; what you see in
src/is what runs in production.Key auth. Agents authenticate with CPZ platform API keys (
X-CPZ-Key/X-CPZ-Secret) — the same keys used by the REST API and thecpzPython SDK.Paper-only by default. Live trading on a strategy requires explicit per-strategy promotion in the platform.
Available tools
18 tools exposed today, organized by domain.
Tool | Description | Read-only |
Strategies | ||
| List trading strategies with filtering | ✓ |
| Get a specific strategy by ID | ✓ |
| Create a new trading strategy | |
| Update an existing strategy | |
Backtests | ||
| List backtest run results | ✓ |
Orders & trading | ||
| List trading orders with filtering | ✓ |
| Place a new trading order | |
| List current portfolio positions | ✓ |
| Trigger portfolio sync across brokers | |
| List connected trading accounts | ✓ |
Market data | ||
| Real-time quotes (price, bid/ask, volume) | ✓ |
Risk | ||
| Compute fresh risk snapshot (VaR, Sharpe, drawdown) | |
| List historical risk snapshots | ✓ |
Execution | ||
| Execute a strategy on the Python backend | |
Webhooks | ||
| List webhook subscriptions | ✓ |
| Subscribe to platform events | |
| Remove a webhook subscription | |
User | ||
| Get authenticated user profile | ✓ |
Local development
npm install
export CPZ_API_BASE_URL=https://api.cpz-lab.com
export CPZ_SERVICE_KEY=your_service_key
npm run dev
# server starts on http://localhost:3001Tests + type check
npm test # single run
npm run test:watch # watch mode
npx tsc --noEmit # type checkBuild
npm run build # compiles TS → dist/
npm start # runs the compiled serverDocker
docker build -t cpzai-mcp-server .
docker run --rm -p 3001:3001 \
-e CPZ_API_BASE_URL=https://api.cpz-lab.com \
-e CPZ_SERVICE_KEY=your_service_key \
cpzai-mcp-serverSecurity model
All connections HTTPS with TLS 1.3 at the edge.
API credentials are forwarded in HTTP headers and never logged.
Per-request API key validation against the platform's
api_keystable.All data access is user-scoped via the
user_idderived from the validated key.OAuth tokens (when used) are held in server memory only — never persisted.
See the privacy policy for the full data-handling story.
Self-hosting
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.
Contributing
Issues and PRs welcome. Before submitting:
npx tsc --noEmitmust passnpm testmust passKeep changes minimal and aligned with existing patterns
License
MIT © CPZ Capital Ltd.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- MIT
- Flicense-qualityDmaintenanceFull-lifecycle algorithmic trading MCP server. AI strategy generation from plain English, backtesting, live bot deployment to 10+ brokers, portfolio monitoring, and prediction markets. Stocks, options, crypto, futures. 32 tools. Free tier.Last updated
- Alicense-qualityCmaintenanceMCP server that provides AI agents with financial tools including real-time quotes, backtesting, technical analysis, and multi-exchange data via a simple CLI interface.Last updated1MIT

Sablier MCP Serverofficial
Alicense-qualityBmaintenanceAn MCP server that lets AI assistants analyze portfolios, stress-test scenarios, generate synthetic market paths, and scan SEC filings — in under 2 minutes.Last updated3MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CPZ-Lab/cpzai-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server