AWS Lambda MCP Cookbook
This repository provides a working, deployable, open source-based, serverless MCP server blueprint with an AWS Lambda function and AWS CDK Python code with all the best practices and a complete CI/CD pipeline.
What is AWS Lambda MCP Cookbook?
AWS Lambda MCP Cookbook is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to this repository provides a working, deployable, open source-based, serverless mcp server blueprint with an aws lambda function and aws cdk python code with all the best practices and a complete ci/cd ...
This repository provides a working, deployable, open source-based, serverless MCP server blueprint with an AWS Lambda function and AWS CDK Python code with all the best practices and a complete CI/CD pipeline.
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- This repository provides a working, deployable, open source-
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx aws-lambda-mcp-cookbookConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use AWS Lambda MCP Cookbook
The AWS Lambda MCP Cookbook is a production-ready, open-source blueprint for deploying serverless MCP servers using AWS Lambda, AWS CDK with Python, and a complete CI/CD pipeline. It demonstrates two architectural approaches—a pure Lambda MCP server and a FastMCP server with a web adapter—both with DynamoDB session storage, observability integrations, and best practices baked in. DevOps teams and cloud architects use it to bootstrap serverless MCP deployments with enterprise-grade patterns rather than starting from scratch.
Prerequisites
- Python 3.12+ with Poetry v2 or higher installed
- Docker running locally (required for CDK bundling)
- An AWS account with credentials configured via AWS CLI
- AWS CDK CLI installed globally ('npm install -g aws-cdk')
- An MCP-compatible client such as Claude Desktop
Clone the repository
Clone the cookbook repository and navigate into the project directory.
git clone https://github.com/ran-isenberg/aws-lambda-mcp-cookbook.git
cd aws-lambda-mcp-cookbookActivate the Poetry virtual environment
Use Poetry to create and activate the virtual environment with all project dependencies.
poetry env activate
poetry installBootstrap your AWS CDK environment
If you haven't bootstrapped CDK in your AWS account and region, do so before deploying.
cdk bootstrap aws://ACCOUNT_ID/REGIONDeploy the stack to AWS
Run 'make deploy' to synthesize and deploy the CDK stack. This creates the Lambda function, DynamoDB table (TABLE_NAME), API Gateway, and all supporting infrastructure.
make deployRun the full CI/CD pipeline locally
Run 'make pr' to execute all checks: code formatting, unit tests, CDK synth, deployment, and integration/E2E tests in sequence.
make prConnect your MCP client to the deployed server
After deployment, CDK outputs the API Gateway URL. Add this URL to your MCP client configuration as the server endpoint using SSE or streamable HTTP transport.
AWS Lambda MCP Cookbook Examples
Client configuration
Claude Desktop configuration for connecting to a deployed AWS Lambda MCP server via the API Gateway endpoint (replace URL with your CDK stack output).
{
"mcpServers": {
"aws-lambda-mcp": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/client-sse"],
"env": {
"MCP_SERVER_URL": "https://your-api-id.execute-api.us-east-1.amazonaws.com/prod/mcp"
}
}
}
}Prompts to try
Once your Lambda MCP server is deployed and connected, test it with these prompts (based on the example math tool and serverless design prompt included in the cookbook).
- "Add the numbers 42 and 58 together using the math tool"
- "What session data is currently stored for this session?"
- "Give me a serverless architecture design prompt"
- "Fetch the user profile for user ID 123"
- "What best practices should I follow for serverless MCP deployments?"Troubleshooting AWS Lambda MCP Cookbook
CDK deploy fails with 'Docker daemon not running'
Start Docker Desktop before running 'make deploy'. The CDK stack bundles Lambda dependencies in a Docker container to ensure compatibility with the Lambda runtime.
DynamoDB session storage errors at runtime
Verify that the TABLE_NAME environment variable is correctly set in the Lambda function configuration. CDK sets this automatically during deploy; if you're testing locally, set TABLE_NAME to the DynamoDB table name created by the stack.
'make pr' fails at the integration test step
Ensure the deployment succeeded before integration tests run. Check the CloudFormation stack events in the AWS Console for deploy errors, and verify your AWS credentials have permissions to create Lambda, DynamoDB, and API Gateway resources.
Frequently Asked Questions about AWS Lambda MCP Cookbook
What is AWS Lambda MCP Cookbook?
AWS Lambda MCP Cookbook is a Model Context Protocol (MCP) server that this repository provides a working, deployable, open source-based, serverless mcp server blueprint with an aws lambda function and aws cdk python code with all the best practices and a complete ci/cd pipeline. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install AWS Lambda MCP Cookbook?
Follow the installation instructions on the AWS Lambda MCP Cookbook GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with AWS Lambda MCP Cookbook?
AWS Lambda MCP Cookbook works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is AWS Lambda MCP Cookbook free to use?
Yes, AWS Lambda MCP Cookbook is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
AWS Lambda MCP Cookbook Alternatives — Similar Cloud Services Servers
Looking for alternatives to AWS Lambda MCP Cookbook? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up AWS Lambda MCP Cookbook in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use AWS Lambda MCP Cookbook?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.