Sample Serverless MCP Servers

Cloud and DevOps

Sample implementations of AI Agents and MCP Servers running on AWS Serverless compute.

Your AI app calls Sample Serverless MCP Servers, which does the cloud and DevOps work and sends the result back to the chat.

About Sample Serverless MCP Servers

Sample Serverless MCP Servers is a community MCP server from aws-samples, filed in our directory under cloud and devops. Sample implementations of AI Agents and MCP Servers running on AWS Serverless compute.

At a glance

Publisher
aws-samples (community)
Runs
See the README for setup
Written in
HCL
License
MIT-0
GitHub stars
245

How to set up Sample Serverless MCP Servers

  1. Follow the install steps in the Sample Serverless MCP Servers README; it is written in HCL, so have that toolchain ready.
  2. Check the Sample Serverless MCP Servers README for keys or settings; the registry lists none that Sample Serverless MCP Servers requires.
  3. Add Sample Serverless MCP Servers to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Sample Serverless MCP Servers tools to confirm the connection.
  5. Run one read-only task with Sample Serverless MCP Servers first, and keep your app asking before each tool call until the results look right.

Sample Serverless MCP Servers compared with similar servers

  • Lambda by mikegc-aws has fewer GitHub stars than Sample Serverless MCP Servers (237 against 245); both are community servers, and both run locally.
  • HomeLab Monitor by SikamikanikoBG has more GitHub stars than Sample Serverless MCP Servers (246 against 245); both are community servers, and both run locally.
  • SOMCP by bilieebiliee1-design has fewer GitHub stars than Sample Serverless MCP Servers (228 against 245); both are community servers, and both run locally.

Before you connect Sample Serverless MCP Servers

  • Give Sample Serverless MCP Servers its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Sample Serverless MCP Servers tool call until you trust what it does with them.
  • Treat text that Sample Serverless MCP Servers fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Sample Serverless MCP Servers on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Sample Serverless MCP Servers

How marketing and sales teams put Sample Serverless MCP Servers to work, by company size. Pick the size closest to yours and start Sample Serverless MCP Servers on one use case.

Small business

  • A small business can ask Sample Serverless MCP Servers why the site is slow or down and get the likely cause in plain words.
  • Owners can use Sample Serverless MCP Servers to check hosting costs and spot services they pay for but no longer use.
  • Sample Serverless MCP Servers runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Web teams can connect Sample Serverless MCP Servers to watch deploys during a launch and roll back fast if a campaign page breaks.
  • Marketing engineering can use Sample Serverless MCP Servers to spin up preview environments for every landing page review.
  • Start Sample Serverless MCP Servers on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should give Sample Serverless MCP Servers read access first, with changes gated by the same approvals as any infrastructure change.
  • Large orgs can use Sample Serverless MCP Servers to answer cost and reliability questions across accounts, so marketing launches are planned with real capacity.
  • Sample Serverless MCP Servers is a community server, so have security review the code and pin a version before Sample Serverless MCP Servers touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Sample Serverless MCP Servers README

From aws-samples/sample-serverless-mcp-servers on GitHub, shared under its MIT-0 license. Images are left out; the original has them.

README.md

Sample Serverless MCP Servers

This repo contains a collection of sample implementations of MCP Servers. These are samples, not production grade code.

Directory Runtime IaC Description
strands-agent-on-lambda Python(Agent)
Node.js(MCP)
Terraform, CDK A sample implementation of AI Agent using Strands Agents SDK and connected MCP Server running on AWS Lambda, includes integration with Cognito for user authentication
strands-agent-on-lambda-python Python SAM A sample implementation of AI Agent using Strands Agents SDK running on AWS Lambda
stateless-mcp-on-lambda-nodejs Node.js Terraform A sample implementation of a remote stateless MCP Server running natively on AWS Lambda and Amazon API Gateway
stateless-mcp-on-lambda-python Python SAM A sample implementation of a remote stateless MCP Server running natively on AWS Lambda and Amazon API Gateway
stateless-mcp-on-ecs-nodejs Node.js Terraform A sample implementation of a remote stateless MCP Server running natively on Amazon ECS with Application Load Balancer
stateful-mcp-on-ecs-nodejs Node.js Terraform A sample implementation of a remote stateful MCP Server running natively on Amazon ECS with Application Load Balancer
stateful-mcp-on-ecs-python Python SAM A sample implementation of a remote stateful MCP Server running natively on Amazon ECS with Application Load Balancer
lambda-ops-mcp-server Node.js Terraform A demo PoC of a local MCP Server that can be used for discovering and upgrading functions on deprecated runtimes

Stateful VS Stateless MCP Servers

When using Streamable HTTP Transport with MCP Servers/Clients, it’s important to understand the difference and trade-offs between stateful and stateless MCP server implementations. Each model has implications for scalability, connection handling, and session management.

Key Aspects

The Streamable HTTP Transport specification outlines two important capabilities. First, a client may initiate a long-lived HTTP GET request to establish a persistent SSE (Server-Sent Events) connection, allowing the server to push data even when the client hasn’t sent a POST request. Second, if the connection is interrupted, the client should be able to resume communication by reconnecting through another GET request. Both features imply that the server must be able to maintain a persistent session context and support long-lived connections. Read more about Streamable HTTP Transport session management modelcontextprotocol.io/specification/2025-03-26/basic.

Stateful model challenges

In a stateful MCP server, this means maintaining session state in memory and keeping SSE connections alive over time. However, as of early May 2025, none of the official MCP SDKs support external session persistence (e.g. in Redis or DynamoDB). This limitation makes it difficult to scale stateful servers horizontally. For example, a client might establish a session with one server instance, but if subsequent requests are routed to a different instance, the session context will be lost and the connection will fail.

That said, it is still possible to scale stateful MCP servers if you're willing to configure session affinity, also known as sticky sessions, at the load balancer level. For example, cookie-based sticky sessions can ensure that a client is routed to the same server instance for the duration of a session. However, the TypeScript MCP Client SDK currently relies on the fetch API, which doesn’t natively support cookies. To work around this limitation, you'll need to implement manual cookie handling, as shown in the stateful-mcp-on-ecs example.

Stateless to the rescue

The MCP specification also allows for a stateless server mode. In this mode, the server doesn’t maintain session context between requests, and clients are not expected to resume dropped connections. Stateless mode enables seamless horizontal scaling and works well in environments where elasticity and load distribution are critical. This model is demonstrated in the stateless-mcp-on-lambda, stateless-mcp-on-ecs, and stateless-mcp-on-lambda-python samples included in this repository.

Refer to each folder separately for further instructions and deployment steps.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

Questions about Sample Serverless MCP Servers

What is the Sample Serverless MCP Servers MCP server?

Sample implementations of AI Agents and MCP Servers running on AWS Serverless compute. Sample Serverless MCP Servers is maintained by aws-samples on GitHub at aws-samples/sample-serverless-mcp-servers, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Sample Serverless MCP Servers MCP server?

Sample Serverless MCP Servers doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (aws-samples/sample-serverless-mcp-servers). Like most servers, Sample Serverless MCP Servers ends with a command or URL you paste into your AI app's MCP config.

Does Sample Serverless MCP Servers need an API key?

The registry lists no required keys for Sample Serverless MCP Servers. Check the Sample Serverless MCP Servers README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Sample Serverless MCP Servers an official MCP server?

No. Sample Serverless MCP Servers is a community server maintained by aws-samples. Community servers can be excellent; read the code and the open issues before you give Sample Serverless MCP Servers access to company data.

What license is Sample Serverless MCP Servers under?

Sample Serverless MCP Servers is released under the MIT-0 license, according to its GitHub repository. The license covers the code of Sample Serverless MCP Servers; the service it connects to has its own terms.