Run Model Context Protocol (MCP) servers with AWS Lambda
A library that wraps existing stdio-based MCP servers so they run as AWS Lambda functions, letting distributed or cloud applications reach them over short-lived HTTPS connections instead of a local child process.
This library runs existing stdio-based Model Context Protocol servers inside AWS Lambda functions. Most MCP servers are designed to run locally, started as a child process and communicating with a client over a long-running stdio stream; this library lets a Lambda function manage that child process's lifecycle instead, so a desktop app, a distributed system, or any other architecture can reach the same server over HTTPS.
Each Lambda invocation starts the stdio MCP server as a child process, initializes it, forwards the incoming request, returns the response, and shuts the server down. Lambda-based MCP servers can be reached through four transports: MCP Streamable HTTP over Amazon API Gateway or Amazon Bedrock AgentCore Gateway, both typically authenticated with OAuth; a custom Streamable HTTP transport over a Lambda function URL authenticated with AWS IAM; or direct Lambda Invoke API calls authenticated with IAM.
It is written in Python under the Apache-2.0 license.