Sample Serverless MCP Servers logo

Sample Serverless MCP Servers

Organization
aws-samples

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

Publisheraws-samples
Repositorysample-serverless-mcp-servers
LanguagePython
Forks
38
Stars
244
Available tools
0
Transport typestdio
LicenseMIT-0
Links
  • Connect tools to AI workflows

    Sample Serverless MCP Servers exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    244 stars and 38 forks from the linked repository.

Sample Serverless MCP Servers

This repo contains a collection of sample implementations of MCP Servers.

DirectoryRuntimeIaCDescription
strands-agent-on-lambdaPython(Agent) Node.js(MCP)Terraform, CDKA 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-pythonPythonSAMA sample implementation of AI Agent using Strands Agents SDK running on AWS Lambda
stateless-mcp-on-lambda-nodejsNode.jsTerraformA sample implementation of a remote stateless MCP Server running natively on AWS Lambda and Amazon API Gateway
stateless-mcp-on-lambda-pythonPythonSAMA sample implementation of a remote stateless MCP Server running natively on AWS Lambda and Amazon API Gateway
stateless-mcp-on-ecs-nodejsNode.jsTerraformA sample implementation of a remote stateless MCP Server running natively on Amazon ECS with Application Load Balancer
stateful-mcp-on-ecs-nodejsNode.jsTerraformA sample implementation of a remote stateful MCP Server running natively on Amazon ECS with Application Load Balancer
stateful-mcp-on-ecs-pythonPythonSAMA sample implementation of a remote stateful MCP Server running natively on Amazon ECS with Application Load Balancer
lambda-ops-mcp-serverNode.jsTerraformA 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 here.

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.

Use Sample Serverless MCP Servers MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Sample Serverless MCP Servers is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Sample Serverless MCP Servers as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Sample Serverless MCP Servers MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "sample-serverless-mcp-servers": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Sample Serverless MCP Servers MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Sample Serverless MCP Servers MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Sample Serverless MCP Servers to help me with this task?
Sample Serverless MCP Servers
Sure. I read it.
Here is what I found using Sample Serverless MCP Servers.

Frequently asked questions

What is the Sample Serverless MCP Servers MCP server used for?

Sample Serverless MCP Servers is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Sample Serverless MCP Servers MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Sample Serverless MCP Servers with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Sample Serverless MCP Servers MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Sample Serverless MCP Servers connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Sample Serverless MCP Servers MCP to TypingMind?

Sample Serverless MCP Servers runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Sample Serverless MCP Servers MCP provide in TypingMind?

Sample Serverless MCP Servers exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Sample Serverless MCP Servers MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Sample Serverless MCP Servers requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇