MCP Lambda SAM
by markvp
This project provides a serverless implementation of the Model Context Protocol (MCP) using AWS Lambda and SAM. It offers two distinct interfaces: System Configuration (Administrative) and System Usage (Client).
Last updated: N/A
What is MCP Lambda SAM?
MCP Lambda SAM is a serverless implementation of the Model Context Protocol (MCP) built using AWS Lambda and SAM. It allows for the registration and management of MCP tools, resources, and prompts, as well as establishing SSE connections, sending commands, and receiving streaming responses.
How to use MCP Lambda SAM?
Administrators can deploy the application using various methods, including AWS Serverless Application Repository (SAR), npx, or local development. They can then register MCP tools, resources, and prompts using the Registration API. Clients can connect to the server via SSE and send commands using the message endpoint, ensuring they have the necessary IAM permissions.
Key features of MCP Lambda SAM
Serverless architecture
Administrative and client interfaces
Dynamic Lambda tool invocation
SSE connection support
IAM permission management
Registration API
Use cases of MCP Lambda SAM
Orchestrating serverless AI tools
Building conversational AI applications
Creating event-driven systems
Managing and invoking Lambda functions dynamically
Implementing a streaming API
FAQ from MCP Lambda SAM
What is MCP?
What is MCP?
Model Context Protocol (MCP) is a protocol for managing and invoking models and tools in a context-aware manner.
What AWS services are used?
What AWS services are used?
AWS Lambda, DynamoDB, IAM, SQS, and API Gateway (via Lambda Function URLs).
How do I deploy the application?
How do I deploy the application?
You can deploy using AWS Serverless Application Repository (SAR), npx, programmatic usage with install, or local development and deployment.
How do I grant permissions to clients?
How do I grant permissions to clients?
You can grant access using either an IAM policy or aws lambda add-permission
to invoke the mcp
function URL.
What are common client errors?
What are common client errors?
Common client errors include 401 (Invalid/missing AWS credentials), 403 (Insufficient permissions), 404 (Invalid session ID), and 429 (Rate limit exceeded).