Provides infrastructure for hosting MCP servers as AWS Lambda functions with streaming capabilities via Server-Sent Events (SSE), supporting Function URLs but not API Gateway or Application Load Balancer.
Runs MCP servers on Node.js runtime, which is officially supported for Lambda response streaming needed for the SSE transport functionality.
Offers TypeScript support for developing MCP servers with type definitions and interfaces to enhance development experience.
Integrates with Zod schema validation to define and validate parameters for MCP tool implementations.
MCP Lambda Server
A Node.js package that provides MCP (Model Context Protocol) server infrastructure for AWS Lambda functions with SSE support.
Features
Adapts the MCP TypeScript SDK to work with AWS Lambda
Supports Server-Sent Events (SSE) through Lambda response streaming
Handles CORS and HTTP method validation
TypeScript support
Related MCP server: Node Omnibus MCP Server
Important Notes
Lambda response streaming only works with Function URLs. It does not work with API Gateway or Application Load Balancer.
Only Node.js runtime is officially supported for response streaming.
Installation
Usage
Create your Lambda function and import the package:
Required Lambda Configuration
Runtime: Node.js 18.x or later
Handler: index.handler
Memory: 128 MB minimum (adjust based on your needs)
Timeout: 120 seconds recommended
Function URL: Required and must have response streaming enabled
API Gateway/ALB: Not supported with streaming
Package Contents
This package provides:
MCP Server implementation with SSE transport
Protocol handling (JSON-RPC)
Streaming response support
Type definitions and interfaces
Your Lambda function provides:
Tool and prompt implementations
Business logic
Any necessary API clients or services
Configuration
License
MIT