AWS cloud integration (Lambda, API Gateway, Secrets Manager, CloudWatch)
Infrastructure as Code (CDK)
Full TypeScript type safety with Zod validation
Local development server
Built-in monitoring and authentication
Development
Aspect
This Implementation
Official Server
Setup
Node.js ecosystem
Python ecosystem
Type Safety
Full TypeScript + Zod validation
Python type hints
Testing
Jest + comprehensive test suite
Python testing framework
Documentation
Extensive MD docs + API reference
README + inline docs
Local Development
HTTP server + nodemon for dev reloading
Python STDIO + inspector
IDE Support
Full IntelliSense + autocomplete
Python IDE support
Production
Factor
This Implementation
Official Server
Security
AWS IAM + API Gateway auth
Container security
Monitoring
CloudWatch logs + metrics
Container logging
Cost
Pay-per-request (serverless)
Fixed container costs
Maintenance
Managed AWS services
Container updates needed
Reliability
AWS SLA (99.95%+)
Container orchestration dependent
Global Distribution
Multi-region AWS deployment
Manual geographic deployment
Features
67 tools organized across categories:
Project Management (5 tools)
Create, read, update, delete projects
List user projects
File Operations (5 tools)
Create, read, update, delete algorithm files
Update file names and contents
Backtesting (10 tools)
Create and manage backtests
Read results, charts, orders, insights, reports
Historical simulation analytics
Live Trading (12 tools)
Deploy algorithms to live trading
Monitor portfolio, orders, logs
Risk controls and liquidation
AI-Powered Tools (6 tools)
Code completion and syntax checking
Error message enhancement
PEP8 formatting
QuantConnect documentation search
Research & Data (8 tools)
Object store for research data
Parameter optimization
Compilation services
Account information
Collaboration & Infrastructure (21 tools)
Project collaboration tools
Node management
Live command broadcasting
Health monitoring
Version information
Quick Start
Prerequisites: Node.js 18+, QuantConnect account
Local Development
# Install dependencies
git clone <repository-url>
cd aws-lambda-mcp
npm ci
npm run build
# Configure credentials
cd services/quant-connect-local
echo "QUANTCONNECT_USER_ID=your-user-id" > .env
echo "QUANTCONNECT_API_TOKEN=your-api-token" >> .env
# Start development server
npm start
# Server runs at http://localhost:55555/mcp
# Test the connection
curl -X POST http://localhost:55555/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
AWS Production Deployment
# Deploy infrastructure (creates empty secrets)
cd infra && npm run deploy
# Populate secrets with actual QuantConnect credentials
aws secretsmanager update-secret \
--secret-id "quant-connect-mcp/user-id" \
--secret-string "your-quantconnect-user-id"
aws secretsmanager update-secret \
--secret-id "quant-connect-mcp/api-token" \
--secret-string "your-quantconnect-api-token"
After deployment, you'll receive API Gateway endpoint and API key for authentication.
Configuration
Local Development
Environment Variables: QUANTCONNECT_USER_ID, QUANTCONNECT_USER_ID in .env file
Server: Runs on port 55555 (configurable via PORT)
Debug: Enable with DEBUG=* or DEBUG=quant-connect:*
AWS Production
API Gateway: REST endpoint with API key authentication
Memory usage: 150-300MB typical, up to 500MB for large operations
Development
Monorepo Structure
npm run lint # Code linting across all packages
npm run build # Build all packages
npm test # Run unit tests
npm run test:e2e # End-to-end tests (requires deployed server)
Hot Reloading for Development
Enable file watching during development:
# Install nodemon globally
npm install -g nodemon
# Start with automatic restart on changes
cd services/quant-connect-local
nodemon --watch src --ext ts,js --exec "npm start"
Testing Strategy
Unit Tests: 100% coverage for all TypeScript files
Ensure environment variables are set (local development)
Cold Start Timeouts
First Lambda invocation may take 2-3 seconds
Consider provisioned concurrency for production workloads
Rate Limiting
API Gateway enforces 100 req/sec by default
Implement exponential backoff for high-volume usage
Tool Validation Errors
Check input parameters match expected Zod schemas
Review tool documentation for required fields
Debug Mode
Enable verbose logging:
# Local development
DEBUG=* npm start
# Lambda (via environment variables)
LOG_LEVEL=debug
Acknowledgments
This project's Middy MCP integration is inspired by the middy-mcp package by Frédéric Barthelet. While our implementation is independently developed with different architectural choices, we acknowledge the foundational work done by the middy-mcp community in establishing patterns for MCP server integration with AWS Lambda.
License
This project is licensed under the MIT License - see the LICENSE file for details.