Quick Start Guide
Get your QuantConnect MCP Server up and running in under 3 minutes. Professional-grade Model Context Protocol server for seamless AI-powered algorithmic trading research and portfolio optimization.
≡ Prerequisites
Ensure you have the required tools and accounts
⚡ Installation
Clone the repository and install dependencies
# Clone the repository
git clone https://github.com/taylorwilsdon/quantratic.git
cd quantratic
# Install with uv (recommended)
uv sync
# Or with pip
pip install -e .
◈ Set Up QuantConnect Credentials
Configure your QuantConnect API credentials
export QUANTCONNECT_USER_ID="your_user_id"
export QUANTCONNECT_API_TOKEN="your_api_token"
export QUANTCONNECT_ORGANIZATION_ID="your_org_id" # Optional
Get Your User ID
Found in the email you received when signing up for QuantConnect
Get Your API Token QuantConnect Settings
Available in your QuantConnect Settings page
Get Your Organization ID (Optional)
Found in your organization URL: /organization/{ID}
▸ Launch the Server
Start the QuantConnect MCP Server
STDIO Transport (Default)
Best for MCP clients like Claude Desktop
python main.py
HTTP Transport
Best for web integrations and testing
MCP_TRANSPORT=streamable-http MCP_PORT=8000 python main.py
↗ Start Analyzing
Begin your algorithmic trading research
# Initialize research environment
await initialize_quantbook(instance_name="research")
# Add securities for analysis
await add_multiple_equities(["AAPL", "MSFT", "GOOGL", "AMZN"], resolution="Daily")
# Perform sophisticated analysis
await perform_pca_analysis(
symbols=["AAPL", "MSFT", "GOOGL", "AMZN"],
start_date="2023-01-01",
end_date="2024-01-01"
)
This example shows basic usage. The server provides 50+ tools for comprehensive financial analysis, portfolio optimization, and backtesting.
§ Connect to Claude Desktop
Configure Claude Desktop to use your QuantConnect MCP Server
Claude Desktop Configuration
Add QuantConnect MCP to your Claude Desktop config
config.json:
{
"mcpServers": {
"quantconnect": {
"command": "python",
"args": ["/path/to/quantratic/main.py"],
"env": {
"QUANTCONNECT_USER_ID": "your_user_id",
"QUANTCONNECT_API_TOKEN": "your_api_token"
}
}
}
}
HTTP Mode Configuration
For HTTP transport mode
{
"mcpServers": {
"quantconnect": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8000/mcp"
]
}
}
}
Ready to Trade!
Your QuantConnect MCP Server is now ready for professional-grade algorithmic trading research. Start building sophisticated strategies with AI-powered financial analysis, portfolio optimization, and backtesting!