How does the Lambda function manage the MCP server lifecycle?
Each invocation starts the MCP server as a child process, initializes it, forwards the incoming request, returns the server’s response, and then shuts down the child process.
@awslabs
Basic information
Run existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"run-model-context-protocol-servers-with-aws-lambda": {
"command": "python",
"args": [
"-m",
"my_mcp_server_python_module",
"--my-server-command-line-parameter",
"some_value"
]
}
}
}Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
It enables you to run MCP stdio-based servers in AWS Lambda functions, wrapping existing MCP servers so that clients communicate over short-lived HTTPS connections instead of long-running local stdio streams. This library targets developers who want to deploy MCP servers in a distributed cloud architecture while still using standard MCP tooling.
Install the package from PyPI (run-mcp-servers-with-aws-lambda) or NPM (@aws/run-mcp-servers-with-aws-lambda). Determine your MCP server’s command and arguments (using StdioServerParameters in Python or serverParams in TypeScript), then package the server with the Lambda function code. Use the provided handler classes (e.g., APIGatewayProxyEventHandler) to process incoming MCP requests. The README includes examples for both Python and TypeScript, as well as guidance on passing secrets and AWS credentials to the child process.
Each invocation starts the MCP server as a child process, initializes it, forwards the incoming request, returns the server’s response, and then shuts down the child process.
The library supports OAuth via API Gateway (e.g., Amazon Cognito), SigV4 authentication with Lambda function URLs, and IAM authentication when using the Lambda Invoke API.
You can configure secrets as encrypted Lambda environment variables or retrieve them from AWS Secrets Manager in the function code. The README provides code examples for both Python and TypeScript. Note that any user with invoke access can also use those secrets.
Four transports are supported: MCP Streamable HTTP via API Gateway, MCP Streamable HTTP via Amazon Bedrock AgentCore Gateway, a custom Streamable HTTP with SigV4 for Lambda function URLs, and a custom Lambda invocation transport using

HostTracker is a website and infrastructure monitoring service that has run external checks since 2004 for more than 500,000 websites. Its official MCP server lets an AI assistant operate a HostTracker account directly i
Development environments for coding agents. Enable multiple agents to work safely and independently with your preferred stack.

Build and run websites, APIs, automations, and admin tools from chat. Your agent creates the data, logic, pages, and scheduled jobs; Tessryx hosts them on your own domain. No code generated, nothing to deploy.

SimpleBackups is automated backup management for databases, servers, cloud storage and SaaS apps. It covers Supabase, Neon, PlanetScale, PostgreSQL, MySQL, MongoDB, and apps like Notion, GitHub and Linear. This connector

Publish and manage static websites from Claude, ChatGPT or Cursor. SoFast's remote MCP server lets your AI assistant create a site, upload the HTML/CSS it generated, publish it with HTTPS, and pause, rename or update it.
Comments