Sample Serverless MCP Servers
@aws-samples
About Sample Serverless MCP Servers
Sample implementations of AI Agents and MCP Servers running on AWS Serverless compute
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Sample Serverless MCP Servers?
Sample Serverless MCP Servers is a repository containing a collection of sample implementations of MCP (Model Context Protocol) servers running on AWS serverless infrastructure. It includes examples for both stateless and stateful MCP servers, deployed on AWS Lambda and Amazon ECS, with Infrastructure as Code (IaC) templates in Terraform, CDK, and SAM. The samples target developers building AI agents or tools that integrate with the MCP protocol.
How to use Sample Serverless MCP Servers?
Clone the repository, navigate to the directory of the desired sample, and follow the deployment instructions and configuration steps provided in that directory’s own documentation.
Key features of Sample Serverless MCP Servers
- Multiple sample implementations for stateless and stateful MCP servers.
- Deployable on AWS Lambda or Amazon ECS with Application Load Balancer.
- IaC support via Terraform, CDK, and SAM.
- Runtime options: Node.js and Python.
- Includes a demo PoC for Lambda runtime operations.
- Streamable HTTP Transport with session management considerations.
Use cases of Sample Serverless MCP Servers
- Deploying a remote stateless MCP server on AWS Lambda for elastic scaling.
- Running a stateful MCP server on Amazon ECS with session affinity.
- Building an AI agent with Strands Agents SDK connected to an MCP server on Lambda.
- Discovering and upgrading Lambda functions on deprecated runtimes (demo PoC).
FAQ from Sample Serverless MCP Servers
What is the difference between stateful and stateless MCP servers?
Stateful MCP servers maintain session context in memory and support long-lived SSE connections, requiring session affinity for scaling. Stateless MCP servers do not keep session context between requests, enabling seamless horizontal scaling without sticky sessions.
What runtime and IaC options are available?
The samples are implemented in Node.js or Python. Infrastructure is deployed using Terraform, AWS CDK, or AWS SAM, with each sample’s directory specifying which tools are used.
Where do the MCP servers run?
The servers run on AWS services: AWS Lambda with API Gateway for stateless examples, and Amazon ECS with Application Load Balancer for both stateless and stateful examples.
Are there any known limitations for stateful MCP servers?
As of early May 2025, official MCP SDKs do not support external session persistence (e.g., Redis or DynamoDB), making it difficult to scale stateful servers horizontally without sticky sessions. The TypeScript MCP Client SDK relies on the fetch API, which doesn’t natively support cookies.
How do I get started with a specific sample?
Refer to the directory’s own README for detailed installation, configuration, and deployment steps. Each sample folder contains separate instructions.
Frequently asked questions
What is the difference between stateful and stateless MCP servers?
Stateful MCP servers maintain session context in memory and support long-lived SSE connections, requiring session affinity for scaling. Stateless MCP servers do not keep session context between requests, enabling seamless horizontal scaling without sticky sessions.
What runtime and IaC options are available?
The samples are implemented in Node.js or Python. Infrastructure is deployed using Terraform, AWS CDK, or AWS SAM, with each sample’s directory specifying which tools are used.
Where do the MCP servers run?
The servers run on AWS services: AWS Lambda with API Gateway for stateless examples, and Amazon ECS with Application Load Balancer for both stateless and stateful examples.
Are there any known limitations for stateful MCP servers?
As of early May 2025, official MCP SDKs do not support external session persistence (e.g., Redis or DynamoDB), making it difficult to scale stateful servers horizontally without sticky sessions. The TypeScript MCP Client SDK relies on the `fetch` API, which doesn’t natively support cookies.
How do I get started with a specific sample?
Refer to the directory’s own README for detailed installation, configuration, and deployment steps. Each sample folder contains separate instructions.
Basic information
More Cloud & Infrastructure MCP servers

Aws Kb Retrieval Server
modelcontextprotocolModel Context Protocol Servers
MCP Gateway
mcp-ecosystem🧩 MCP Gateway - A lightweight gateway service that instantly transforms existing MCP Servers and APIs into MCP servers with zero code changes. Features Docker deployment and management UI, requiring no infrastructure modifications.
Cloudflare MCP Server
cloudflareKubernetes MCP Server
reza-gholizadeManage Your Kubernetes Cluster with k8s mcp-server
Supabase MCP Server
supabase-communityConnect Supabase to your AI assistants
Comments