Lambda MCP Server
Creates a simple MCP tool server with 'streaming' HTTP.
What is Lambda MCP Server?
Lambda MCP Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to creates a simple mcp tool server with 'streaming' http.
Creates a simple MCP tool server with 'streaming' HTTP.
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Creates a simple MCP tool server with 'streaming' HTTP.
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx lambda-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Lambda MCP Server
The Lambda MCP Server is a framework and demo that shows how to build and deploy Model Context Protocol tool servers on AWS Lambda using streaming HTTP — enabling serverless, auto-scaling MCP endpoints without managing persistent infrastructure. The included awslabs.mcp_lambda_handler Python library handles request routing, session persistence via DynamoDB, and bearer-token authentication, so developers can focus on writing tool functions. Cloud architects and AI developers use it as a template for deploying custom MCP servers to AWS that scale to zero when idle and integrate with Amazon Bedrock.
Prerequisites
- An AWS account with permissions to deploy Lambda, API Gateway, DynamoDB, and S3
- AWS SAM CLI installed and configured with credentials
- Amazon Bedrock access enabled in your AWS region, with the Amazon Nova Pro model enabled
- Python 3.10+ and pip or uv for local development
- An MCP-compatible AI client such as Claude Desktop or the Bedrock-hosted agent
Install the Lambda handler library
Install the awslabs.mcp_lambda_handler package, which provides the MCPLambdaHandler class and request routing logic.
pip install awslabs.mcp_lambda_handler
# Or with uv:
uv add awslabs.mcp_lambda_handlerClone the demo repository
Clone the Lambda MCP Server repository to get the example SAM template, Lambda function code with sample tools, and the Bedrock agent client.
git clone https://github.com/mikegc-aws/Lambda-MCP-Server.git
cd Lambda-MCP-ServerWrite or review your tool functions
Define MCP tools as Python functions decorated with @mcp_server.tool(). The demo includes three example tools: get_weather, count_s3_buckets, and get_time. Replace or extend these with your own business logic.
from awslabs.mcp_lambda_handler import MCPLambdaHandler
mcp_server = MCPLambdaHandler(name="mcp-lambda-server", version="1.0.0")
@mcp_server.tool()
def count_s3_buckets() -> str:
import boto3
return str(len(boto3.client('s3').list_buckets()['Buckets']))
def lambda_handler(event, context):
return mcp_server.handle_request(event, context)Deploy with AWS SAM
Build and deploy the SAM stack. When prompted, provide an McpAuthToken — this is the bearer token clients will use to authenticate to your API Gateway endpoint. Note the API Gateway URL from the stack outputs.
sam build && sam deploy --guidedConfigure session persistence with DynamoDB
Session state is persisted to a DynamoDB table. The table name defaults to 'mcp_sessions' and is configured via the MCP_SESSION_TABLE environment variable on the Lambda function, which the SAM template sets automatically.
Connect your MCP client to the Lambda endpoint
Use the API Gateway URL and your McpAuthToken to connect an MCP client. For Claude Desktop, use mcp-remote to bridge HTTP to stdio.
npx mcp-remote@latest https://<your-api-id>.execute-api.<region>.amazonaws.com/Prod/mcp --header "Authorization: Bearer <McpAuthToken>"Lambda MCP Server Examples
Client configuration
Connect Claude Desktop to your deployed Lambda MCP endpoint using mcp-remote as a local stdio bridge.
{
"mcpServers": {
"lambda-mcp": {
"command": "npx",
"args": [
"mcp-remote@latest",
"https://<your-api-id>.execute-api.<region>.amazonaws.com/Prod/mcp",
"--header",
"Authorization: Bearer <McpAuthToken>"
]
}
}
}Prompts to try
These prompts exercise the demo tools included in the Lambda MCP Server example.
- "How many S3 buckets do I have in my AWS account?"
- "What is the current UTC time?"
- "What is the weather in Seattle?" (returns simulated data)
- "Get the current time and tell me how long it has been since the last request."Troubleshooting Lambda MCP Server
sam deploy fails with permission errors
Your AWS credentials must have permissions to create Lambda functions, API Gateway APIs, DynamoDB tables, and IAM roles. Use an IAM user or role with AdministratorAccess for initial deployment, then tighten permissions after.
API Gateway returns 401 Unauthorized
Ensure you are passing the Authorization header with the exact McpAuthToken value you set during 'sam deploy --guided'. Tokens are case-sensitive. Redeploy with 'sam deploy' if you need to change the token.
Lambda function cold starts cause MCP connection timeouts
For low-latency use, enable Lambda Provisioned Concurrency on the function in the SAM template. Alternatively, increase the MCP client connection timeout setting to accommodate cold start latency (typically 1-3 seconds).
Frequently Asked Questions about Lambda MCP Server
What is Lambda MCP Server?
Lambda MCP Server is a Model Context Protocol (MCP) server that creates a simple mcp tool server with 'streaming' http. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Lambda MCP Server?
Follow the installation instructions on the Lambda MCP Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Lambda MCP Server?
Lambda MCP Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Lambda MCP Server free to use?
Yes, Lambda MCP Server is open source and available under the MIT-0 license. You can use it freely in both personal and commercial projects.
Lambda MCP Server Alternatives — Similar Cloud Services Servers
Looking for alternatives to Lambda MCP Server? 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 Lambda MCP Server 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 Lambda MCP Server?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.