MCPSERV.CLUB
mikegc-aws

Lambda MCP Server

MCP Server

Serverless Model Context Protocol engine on AWS Lambda with session state

Stale(55)
223stars
2views
Updated 14 days ago

About

The Lambda MCP Server provides a stateless, serverless implementation of the Model Context Protocol using AWS Lambda. It supports Streamable HTTP clients, automatic session state persistence via DynamoDB, and bearer‑token authentication for secure, developer-friendly MCP tool deployments.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

MCP Lambda Server Demo

The Lambda MCP Server offers a streamlined, serverless solution for exposing Model Context Protocol (MCP) tools directly from AWS Lambda. By leveraging streamable HTTP, the server eliminates the need for long‑running services or complex infrastructure, enabling developers to deploy lightweight MCP endpoints that scale automatically with demand. This architecture is particularly valuable for teams building AI assistants who require fast, stateless tool access while still maintaining conversational context.

At its core, the server accepts MCP requests over a single HTTP connection and routes them to Python functions decorated with . The handler automatically serializes input, executes the tool, and streams back results in real time. Because Lambda functions terminate after each invocation, the server’s design ensures that every request is isolated, yet it still supports persistent session state across calls. Session data is stored in DynamoDB keyed by a conversation ID, allowing tools to read and write context without manual state management. This feature is essential for assistants that need to remember user preferences, track counters, or accumulate data across multiple tool invocations.

Key capabilities include:

  • Stateless deployment: No server maintenance or scaling concerns; Lambda handles concurrency and cold starts.
  • Streamable HTTP support: Enables continuous data flow for long‑running tools, improving responsiveness compared to traditional request/response patterns.
  • Built‑in session persistence: Automatic DynamoDB integration keeps conversation state intact across tool calls.
  • Bearer token authentication: API Gateway authorizers enforce MCP‑compliant security, protecting endpoints from unauthorized access.
  • Developer‑friendly API: Minimal boilerplate—just a decorator and a handler function—to expose any Python logic as an MCP tool.

Real‑world use cases abound: a customer support bot can query a Lambda‑based knowledge base, an analytics assistant can run ad‑hoc queries on data lakes, or a workflow orchestrator can trigger downstream Lambda functions while preserving context. Because the server is fully compatible with any MCP client that supports streamable HTTP—including the MCP Inspector and Strands Agents—developers can integrate it into existing AI pipelines with zero friction.

In summary, the Lambda MCP Server turns AWS Lambda into a first‑class MCP tool provider. It delivers scalability, simplicity, and stateful conversational support in one package, making it an ideal choice for developers building robust AI assistants that need to interact with external services without the overhead of managing traditional servers.