MCP Lambda Server

Integrations

  • 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.

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

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

npm install @markvp/mcp-lambda-layer

Usage

Create your Lambda function and import the package:

import { MCPHandlerFactory } from '@markvp/mcp-lambda-layer'; import { z } from 'zod'; // Create MCP handler factory with your configuration const factory = new MCPHandlerFactory({ tools: { summarize: { params: { text: z.string(), }, handler: async ({ text }) => { // Your implementation here - could be any service/model/API const summary = await yourSummarizeImplementation(text); return { content: [{ type: 'text', text: summary }], }; }, }, }, prompts: { generate: { description: 'Generate content based on a prompt', handler: async extra => { // Your implementation here - could be any service/model/API const result = await yourGenerateImplementation(extra.prompt); return { content: [{ type: 'text', text: result }], }; }, }, }, }); // Export the handler directly export const handler = factory.getHandler();

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

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A Node.js package providing Model Context Protocol server infrastructure for AWS Lambda functions with streaming response capabilities through Server-Sent Events.

  1. Features
    1. Important Notes
      1. Installation
        1. Usage
          1. Required Lambda Configuration
          2. Package Contents
        2. License

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            An MCP server that provides tools for interacting with AWS S3 buckets, enabling direct access to S3 operations through the Model Context Protocol.
            Last updated -
            1
            Python
            • Apple
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server implementation that enables Claude to perform AWS operations on S3 and DynamoDB services through natural language commands.
            Last updated -
            23
            92
            Python
            MIT License
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that integrates with AWS CodePipeline, allowing users to manage pipelines through Windsurf and Cascade using natural language commands.
            Last updated -
            4
            TypeScript
          • A
            security
            A
            license
            A
            quality
            An Amazon S3 Model Context Protocol server that allows Large Language Models like Claude to interact with AWS S3 storage, providing tools for listing buckets, listing objects, and retrieving object contents.
            Last updated -
            3
            111
            6
            TypeScript
            MIT License
            • Apple

          View all related MCP servers

          ID: q88ev47vvz