
aws documentation mcp on lambda
本项目是一个基于AWS Lambda的无服务器应用,使用Model Context Protocol (MCP) 实现AWS文档检索与流式响应。
Repository Info
About This Server
本项目是一个基于AWS Lambda的无服务器应用,使用Model Context Protocol (MCP) 实现AWS文档检索与流式响应。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
AWS Documentation MCP on Lambda
This project is a serverless application that implements the AWS Documentation Model Context Protocol (MCP) server on AWS Lambda with response streaming capabilities.
Project Overview
This application deploys a Lambda function that supports response streaming using AWS SAM (Serverless Application Model). The main features include:
- AWS Documentation search and retrieval functionality using the Model Context Protocol (MCP)
- Real-time responses utilizing Lambda Response Streaming
- Python-based implementation of the MCP server
About the Libraries Used
This project uses a fork of the AWS Documentation MCP server with experimental support for streamable HTTP:
- Repository: github.com/moritalous/mcp
Architecture
This application consists of the following components:
- MCPStreamableFunction: Lambda function using Python 3.12 runtime
- Lambda Adapter Layer: Layer to support response streaming
- Function URL: Endpoint for direct access to the Lambda function without authentication
Prerequisites
To use this project, you need:
- AWS CLI
- SAM CLI
- Python 3.12
- Docker
Setup and Deployment
Setting up the Local Development Environment
# Clone the repository
git clone https://github.com/moritalous/aws-documentation-mcp-on-lambda.git
# Navigate to the project directory
cd aws-documentation-mcp-on-lambda
Build and Deploy
# Build the application
sam build
# Deploy the application (interactive for the first time)
sam deploy --guided
During deployment, you will be prompted to enter the following information:
- Stack Name: Name of the CloudFormation stack (e.g., aws-documentation-mcp-on-lambda)
- AWS Region: Region to deploy to
- Confirm changes before deploy: Whether to confirm changes
- Allow SAM CLI IAM role creation: Whether to allow IAM role creation
- Save arguments to samconfig.toml: Whether to save the configuration
After deployment completes, the Lambda Function URL will be output. You can use this URL to access the API.
Features and Endpoints
This application provides the following endpoints:
- POST /mcp/: Initialize and send MCP requests
- GET /mcp/: Health check endpoint
Implemented Tools
This MCP server implements AWS Documentation tools:
-
search_documentation: Search AWS documentation
- Parameter:
search_phrase(string) - Parameter:
limit(integer, optional)
- Parameter:
-
read_documentation: Read AWS documentation page
- Parameter:
url(string) - Parameter:
max_length(integer, optional) - Parameter:
start_index(integer, optional)
- Parameter:
-
recommend: Get content recommendations for an AWS documentation page
- Parameter:
url(string)
- Parameter:
Testing Connection from Local to Lambda
You can test the connection to your deployed Lambda function using an MCP client that supports the Model Context Protocol.
Resource Cleanup
To remove resources when no longer needed:
sam delete --stack-name <your-stack-name>
Additional Information
- AWS SAM Developer Guide
- Lambda Response Streaming
- Model Context Protocol
Quick Start
Clone the repository
git clone https://github.com/moritalous/aws-documentation-mcp-on-lambdaInstall dependencies
cd aws-documentation-mcp-on-lambda
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.