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
基本信息
Run existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"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"
]
}
}
}工具列表暂未提供
当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
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
MCP server connecting to Kubernetes

Buy .vn and 371 international domains in VND inside Claude Code, Codex or Cursor. Search and reserve as a guest, pay by VietQR, sign in with MONA Pass once to claim; the agent then points DNS and SSL at your app. Alias o
Connect Supabase to your AI assistants
Query MCP enables end-to-end management of Supabase via chat interface: read & write query executions, management API support, automatic migration versioning, access to logs and much more.
Open source MCP Servers for AWS
评论