Lambda MCP Adaptor

v1.0.0Cloud Servicesstable

An MCP server SDK for AWS serverless architecture with familiar, official SDK-like API design.

lambda-mcp-adaptormcpai-integration
Share:
12
Stars
0
Downloads
0
Weekly
0/5

What is Lambda MCP Adaptor?

Lambda MCP Adaptor is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server sdk for aws serverless architecture with familiar, official sdk-like api design.

An MCP server SDK for AWS serverless architecture with familiar, official SDK-like API design.

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An MCP server SDK for AWS serverless architecture with famil

Use Cases

Build AWS serverless applications with MCP SDK.
Integrate Lambda functions into AI agent workflows.
moritalous

Maintainer

LicenseApache-2.0
Languagejavascript
Versionv1.0.0
UpdatedMar 31, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx lambda-mcp-adaptor

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Lambda MCP Adaptor

The lambda-mcp-adaptor is a TypeScript/JavaScript SDK that makes it straightforward to build MCP servers on AWS serverless infrastructure (API Gateway + Lambda), providing a clean fluent API similar to the official MCP SDK. It implements the Streamable HTTP transport from the MCP 2025-03-26 specification with a stateless design suited for Lambda's ephemeral execution model, and includes built-in Bearer token authentication for securing endpoints. Developers can register tools, resources, and prompts using familiar patterns, then deploy the whole stack with AWS SAM in minutes.

Prerequisites

  • Node.js 22 or higher and npm
  • AWS account with permissions to deploy API Gateway and Lambda functions
  • AWS SAM CLI installed (for the recommended deployment workflow)
  • The zod library for schema validation
1

Initialize an AWS SAM application

Use the SAM CLI to scaffold a new Node.js Lambda project that will host the MCP server.

sam init --runtime nodejs22.x --name my-mcp-server --app-template hello-world
cd my-mcp-server
2

Install lambda-mcp-adaptor and zod

Install the adapter directly from GitHub and the zod schema validation library.

npm install github:moritalous/lambda-mcp-adaptor zod
3

Create your MCP server in app.mjs

Replace the Lambda handler with an MCP server definition. Register tools using the fluent API and export the Lambda handler created by createLambdaHandler.

import { createMCPServer, createLambdaHandler, Auth } from 'lambda-mcp-adaptor';
import { z } from 'zod';

const server = createMCPServer({
  name: 'My MCP Server',
  version: '1.0.0',
  description: 'A serverless MCP server on AWS Lambda'
});

server.auth(Auth.bearerToken(process.env.MCP_TOKEN));

server.tool('greet', { name: z.string() }, async ({ name }) => ({
  content: [{ type: 'text', text: `Hello, ${name}!` }]
}));

export const lambdaHandler = createLambdaHandler(server);
4

Update the SAM template

Edit template.yaml to add an API Gateway endpoint at /mcp and pass the MCP_TOKEN parameter as an environment variable to the Lambda function.

5

Build and deploy to AWS

Build the SAM application and deploy it interactively, passing your Bearer token as a parameter.

sam build
sam deploy --guided --parameter-overrides MCPToken=your-secret-token-here
6

Configure your MCP client with the deployed URL

After deployment, SAM outputs the API Gateway URL. Use this URL in your MCP client configuration with the Bearer token for authentication.

Lambda MCP Adaptor Examples

Client configuration

MCP client configuration pointing to a deployed Lambda-backed MCP server endpoint with Bearer token authentication.

{
  "mcpServers": {
    "lambda-mcp": {
      "url": "https://<api-id>.execute-api.<region>.amazonaws.com/Prod/mcp",
      "headers": {
        "Authorization": "Bearer your-secret-token-here"
      }
    }
  }
}

Prompts to try

Example interactions once your custom Lambda MCP tools are deployed and connected.

- "Call the greet tool with my name"
- "List all available tools on this server"
- "Run the calculate tool: add 42 and 58"
- "What tools does this MCP server expose?"

Troubleshooting Lambda MCP Adaptor

401 Unauthorized responses from the deployed endpoint

Ensure the Authorization header is set to `Bearer <your-token>` in client requests and that MCP_TOKEN in the Lambda environment matches exactly. Token comparison is case-sensitive.

SAM deploy fails with missing parameter errors

Confirm the MCPToken parameter is defined in your template.yaml Parameters section and pass it explicitly with `--parameter-overrides MCPToken=<value>` during `sam deploy`.

MCP client reports session management errors

This adaptor uses a stateless design — there is no server-side session state. Ensure your MCP client supports stateless Streamable HTTP transport as defined in the MCP 2025-03-26 specification.

Frequently Asked Questions about Lambda MCP Adaptor

What is Lambda MCP Adaptor?

Lambda MCP Adaptor is a Model Context Protocol (MCP) server that mcp server sdk for aws serverless architecture with familiar, official sdk-like api design. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Lambda MCP Adaptor?

Follow the installation instructions on the Lambda MCP Adaptor GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Lambda MCP Adaptor?

Lambda MCP Adaptor works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Lambda MCP Adaptor free to use?

Yes, Lambda MCP Adaptor is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "lambda-mcp-adaptor": { "command": "npx", "args": ["-y", "lambda-mcp-adaptor"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Lambda MCP Adaptor?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides