AWS Lambda MCP Cookbook

v1.0.0Cloud Servicesstable

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.

aws-lambda-mcp-cookbookmcpai-integration
Share:
127
Stars
0
Downloads
0
Weekly
0/5

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

Deploy serverless MCP servers using AWS Lambda.
Access CI/CD pipeline blueprints and best practices for MCP.
ran-isenberg

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 5, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx aws-lambda-mcp-cookbook

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-cookbook
2

Activate the Poetry virtual environment

Use Poetry to create and activate the virtual environment with all project dependencies.

poetry env activate
poetry install
3

Bootstrap 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/REGION
4

Deploy 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 deploy
5

Run 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 pr
6

Connect 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.

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.

Quick Config Preview

{ "mcpServers": { "aws-lambda-mcp-cookbook": { "command": "npx", "args": ["-y", "aws-lambda-mcp-cookbook"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides