AWS Lambda MCP Runner
Run existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions
What is AWS Lambda MCP Runner?
AWS Lambda MCP Runner is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to run existing model context protocol (mcp) stdio-based servers in aws lambda functions
Run existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Run existing Model Context Protocol (MCP) stdio-based server
Use Cases
Maintainer
Works with
Installation
NPM
npx -y @aws/run-mcp-servers-with-aws-lambdaManual Installation
npx -y @aws/run-mcp-servers-with-aws-lambdaConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use AWS Lambda MCP Runner
The AWS Lambda MCP Runner is an AWS Labs library that wraps existing stdio-based MCP servers and deploys them as AWS Lambda functions, enabling serverless, scalable MCP infrastructure in the cloud. It supports multiple deployment architectures including API Gateway with OAuth, Lambda Function URLs with SigV4, and Bedrock AgentCore Gateway, making it easy to expose any stdio MCP server over HTTP without modifying the server itself. Teams building production AI agent systems on AWS use it to scale MCP workloads, manage credentials securely through AWS Secrets Manager, and integrate with existing AWS IAM policies.
Prerequisites
- AWS account with permissions to create Lambda functions, API Gateway, and IAM roles
- AWS CLI configured with credentials (aws configure)
- Python 3.x or Node.js runtime environment for your Lambda functions
- An existing stdio-based MCP server package to wrap and deploy
- An MCP-compatible client such as Claude Desktop configured to connect to your deployed endpoint
Install the library for Python or TypeScript
Install the AWS Lambda MCP adapter library for your preferred runtime.
# Python
pip install run-mcp-servers-with-aws-lambda
# TypeScript/Node.js
npm install @aws/run-mcp-servers-with-aws-lambdaCreate a Lambda handler that wraps your MCP server (Python)
Write a Lambda handler function that configures StdioServerParameters pointing to your existing MCP server and hands control to the adapter.
import sys
from run_mcp_servers_with_aws_lambda import LambdaMcpServer
from mcp import StdioServerParameters
server_params = StdioServerParameters(
command=sys.executable,
args=["-m", "your_mcp_server_module", "--your-arg", "value"],
)
lambda_handler = LambdaMcpServer(server_params).handlerConfigure credentials and secrets
Pass API keys to your wrapped MCP server using Lambda environment variables or retrieve them at runtime from AWS Secrets Manager for better security.
import boto3
def get_secret(secret_name):
client = boto3.client('secretsmanager')
response = client.get_secret_value(SecretId=secret_name)
return response['SecretString']
# Pass to server via env in StdioServerParameters
env = {"MY_API_KEY": get_secret("my-mcp-api-key")}Deploy the Lambda function
Package your handler and dependencies and deploy to AWS Lambda. Attach an appropriate IAM execution role and configure your chosen trigger (API Gateway, Function URL, or direct invoke).
# Using AWS SAM or CDK for deployment (example SAM command)
sam build && sam deploy --guidedConfigure your MCP client to connect to the Lambda endpoint
Update your Claude Desktop or other MCP client config to point to the deployed Lambda endpoint URL, using the appropriate authentication method (OAuth, SigV4, or IAM).
{
"mcpServers": {
"lambda-mcp": {
"command": "npx",
"args": ["-y", "@aws/run-mcp-servers-with-aws-lambda"],
"env": {
"AWS_REGION": "us-east-1",
"LAMBDA_FUNCTION_NAME": "your-mcp-lambda-function"
}
}
}
}AWS Lambda MCP Runner Examples
Client configuration
Claude Desktop configuration using the AWS Lambda MCP Runner package to connect to a Lambda-hosted MCP server.
{
"mcpServers": {
"lambda-mcp": {
"command": "npx",
"args": ["-y", "@aws/run-mcp-servers-with-aws-lambda"],
"env": {
"AWS_REGION": "us-east-1",
"LAMBDA_FUNCTION_NAME": "my-mcp-server-lambda",
"AWS_ACCESS_KEY_ID": "your_access_key",
"AWS_SECRET_ACCESS_KEY": "your_secret_key"
}
}
}
}Prompts to try
Example prompts once your MCP server is running serverlessly on AWS Lambda.
- "List all available tools on the Lambda-hosted MCP server"
- "Use the MCP server to query my database for records from the last 7 days"
- "Invoke the file-processing tool on this S3 object: s3://my-bucket/data.csv"
- "Run the analytics tool and return a summary of the results"Troubleshooting AWS Lambda MCP Runner
Lambda function times out when starting the MCP server subprocess
Increase the Lambda timeout to at least 30 seconds to allow the stdio subprocess to initialize. For cold starts with large dependencies, consider using Lambda SnapStart or provisioned concurrency.
Child MCP server process cannot access AWS credentials
The subprocess spawned by the adapter does not automatically inherit Lambda execution role credentials. Explicitly pass AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN as environment variables to StdioServerParameters, or retrieve credentials from the execution role before spawning.
API Gateway returns 403 Forbidden when connecting
Ensure your IAM policy grants the calling identity execute-api:Invoke permission on your API Gateway resource ARN. For SigV4-authenticated Lambda Function URLs, verify the caller has lambda:InvokeFunctionUrl permission.
Frequently Asked Questions about AWS Lambda MCP Runner
What is AWS Lambda MCP Runner?
AWS Lambda MCP Runner is a Model Context Protocol (MCP) server that run existing model context protocol (mcp) stdio-based servers in aws lambda functions It connects AI assistants to external tools and data sources through a standardized interface.
How do I install AWS Lambda MCP Runner?
Install via npm with the command: npx -y @aws/run-mcp-servers-with-aws-lambda. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with AWS Lambda MCP Runner?
AWS Lambda MCP Runner 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 Runner free to use?
Yes, AWS Lambda MCP Runner is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
AWS Lambda MCP Runner Alternatives — Similar Cloud Services Servers
Looking for alternatives to AWS Lambda MCP Runner? 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 Runner 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 Runner?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.