◆ QuantConnect MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Production-ready Model Context Protocol server for QuantConnect's algorithmic trading platform**
*Integrate QuantConnect's research environment, statistical analysis, and portfolio optimization into your AI workflows. Locally hosted, secure & capable of dramatically improving productivity*
◉ Quick Start •
◉ Documentation •
◉ Architecture •
◉ Contributing
Demo – Claude
---
◈ Is this crazy?
Maybe? Either way, the world is changing and this is where we're at.
Out of the box, QuantConnect MCP provides you with:
- **Full Project Lifecycle**: Create, read, update, compile, and manage QuantConnect projects and files programmatically.
- **End-to-End Backtesting**: Compile projects, create backtests, read detailed results, and analyze charts, orders, and insights.
- **Live Trading Management**: Deploy, monitor, liquidate, and control live algorithms with comprehensive runtime statistics and logging.
- **Historical Data Access**: Comprehensive data retrieval capabilities for historical and alternative data analysis.
- **Advanced Analytics**: Perform Principal Component Analysis (PCA), Engle-Granger cointegration tests, mean-reversion analysis, and correlation studies.
- **Portfolio Optimization**: Utilize sophisticated sparse optimization with Huber Downward Risk minimization, calculate performance, and benchmark strategies.
- **Universe Selection**: Dynamically screen assets by multiple criteria, analyze ETF constituents, and select assets based on correlation.
- **Enterprise-Grade Security**: Secure, SHA-256 authenticated API integration with QuantConnect.
- **High-Performance Core**: Built with an async-first design for concurrent data processing and responsiveness.
- **AI-Native Interface**: Designed for seamless interaction via natural language in advanced AI clients.
◉ Table of Contents
- ◈ Quick Start
- ◈ Authentication
- ◈ Natural Language Examples
- ◈ Comprehensive API Reference
- ◈ Architecture
- ◈ Advanced Configuration
- ◈ Testing
- ◈ Contributing
- ◈ License
◈ Quick Start
Get up and running in under 2 minutes:
> **Prerequisites:** You must have QuantConnect credentials (User ID and API Token) before running the server. The server will not function without proper authentication. See Authentication section for details on obtaining these credentials.
**Install with uvx (Recommended)**
One-Click Claude Desktop Install (Recommended)
1. **Download:** Grab the latest quantconnect-mcp.dxt from the “Releases” page
2. **Install:** Double-click the file – Claude Desktop opens and prompts you to **Install**
3. **Configure:** In Claude Desktop → **Settings → Extensions → QuantConnect MCP**, paste your user ID and API token
4. **Use it:** Start a new Claude chat and call any QuantConnect tool
**Why DXT?**
> Desktop Extensions (.dxt) bundle the server, dependencies, and manifest so users go from download → working MCP in **one click** – no terminal, no JSON editing, no version conflicts.
2. **Set Up QuantConnect Credentials (Required)**
**The server requires these environment variables to function properly:**
3. **Launch the Server**
4. **Interact with Natural Language**
Instead of calling tools programmatically, you use natural language with a connected AI client (like Claude, a GPT, or any other MCP-compatible interface).
> "Add GOOGL, AMZN, and MSFT, then run a PCA analysis on them for 2023."
◈ Authentication
Getting Your Credentials
| Credential | Where to Find | Required |
|------------|---------------|----------|
| **User ID** | Email received when signing up | ◉ Yes |
| **API Token** | QuantConnect Settings | ◉ Yes |
| **Organization ID** | Organization URL: /organization/{ID} | ◦ Optional |
Configuration Methods
Method 1: Environment Variables (Recommended)
Demo – Roo Code
◈ Natural Language Examples
This MCP server is designed to be used with natural language. Below are examples of how you can instruct an AI assistant to perform complex financial analysis tasks.
Factor‑Driven Portfolio Construction Pipeline
> **“Build a global equity long/short portfolio for 2025:**