MCP ExplorerExplorer

Mcp On Lambda

@linkcdon 10 months ago
3 MIT
FreeCommunity
AI Systems
A demo for streamable MCP on AWS Lambda with IAM-protected URLs.

Overview

What is Mcp On Lambda

mcp-on-lambda is a demonstration project that showcases how to build scalable MCP servers on AWS Lambda with a focus on security through IAM-protected Lambda URLs.

Use cases

Use cases include building serverless applications, creating APIs that require secure access, and implementing scalable data processing solutions in AWS.

How to use

To use mcp-on-lambda, deploy the project using AWS SAM, which provisions a Lambda function URL secured by AWS IAM. Utilize the AWSIAMTransport class to make HTTP requests to the Lambda function, automatically signing them with AWS Signature Version 4.

Key features

Key features include IAM protection for Lambda URLs, the AWSIAMTransport class for secure HTTP requests, and compatibility with various AWS credentials and roles.

Where to use

mcp-on-lambda can be used in cloud-based applications that require scalable and secure serverless architectures, particularly in environments that leverage AWS services.

Content

Streamable MCP Demo on AWS Lambda with IAM Protected Lambda URL

This repo is mainly based on the article https://community.aws/content/2vzj07Wyk6Lw281Tvs1Lw7kJJNW/building-scalable-mcp-servers-on-aws-lambda-a-practical-guide with following improvement:

  1. The SAM deployment provisions the Lambda function URL that is protected by AWS IAM.
  2. The MCP client can use the new AWSIAMTransport class to call the protected Lambda function URL. This class extends the default MCP typescript StreamableHTTPClientTransport by automatically sign the HTTP request with AWS Signature Version 4 for API requests. (by default use the local AWS credential, but you can use any AWS credential/role)

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers