A lightweight MCP (Model Context Protocol) server for CSV analysis, deployable to AWS Lambda.
- CSV Analysis: Analyze CSV files with row/column counts
- S3 CSV Tools: Read and analyze CSV files directly from AWS S3
- AWS Lambda Deployment: Serverless deployment with API Gateway
- Cursor Integration: Works with Cursor IDE via MCP proxy
- Configurable: Environment-based configuration
MCP_SERVER_URL: Your deployed MCP server URL (default: current Lambda URL)AWS_PROFILE: AWS profile for local developmentAWS_REGION: AWS region (default: eu-central-1)
-
Copy environment template:
cp env.example .env
-
Update your MCP server URL in
.env:MCP_SERVER_URL=https://your-api-gateway-id.execute-api.eu-central-1.amazonaws.com/prod/mcp
All deployment scripts use centralized configuration from config.env:
FUNCTION_NAME: Lambda function nameAPI_GATEWAY_NAME: API Gateway nameAWS_REGION: AWS regionMCP_SERVER_URL: MCP server endpoint URL
# Test Lambda handler
uv run lambda_handler.py
# Test MCP proxy
uv run test_proxy.pyThe server includes a simple tool for getting basic information from CSV files stored in AWS S3:
analyze_s3_csv: Basic info - count, columns, and sample 50 records
📊 Ultra Simple (KISS):
- Pandas integration - uses
pd.read_csv()directly with S3 URLs - No analysis - just count, columns, and sample data
- Easy to use - just provide bucket name and file key
Example Usage:
# Get basic info from a CSV file in S3
analyze_s3_csv("my-bucket", "data/sales.csv")# Create deployment package
./create_deployment_package.sh
# Deploy via GitHub Actions (manual trigger)
# Or upload mcp-server-deployment.zip to AWS Lambda# Local cleanup (requires confirmation)
./cleanup.sh
# GitHub Actions cleanup (manual trigger with confirmation)
# Go to Actions → Cleanup AWS Resources → Run workflow
# Type "DELETE" when promptedThe MCP proxy automatically connects to your deployed server using the configured URL.
├── lambda_handler.py # AWS Lambda entry point
├── mcp_proxy.py # MCP proxy for Cursor
├── server.py # MCP server configuration
├── tools/
│ ├── __init__.py # Auto-registers all tools
│ ├── csv_tools.py # Local CSV analysis tools
│ └── s3_csv_tools.py # S3 CSV analysis tools
├── utils/
│ ├── file_reader.py # Local file utilities
│ └── s3_csv_processor.py # S3 CSV processing utilities
├── create_deployment_package.sh # Deployment script
└── .github/workflows/deploy.yml # GitHub Actions