MCP ExplorerExplorer

Aws Documentation Mcp On Lambda

@moritalouson a year ago
1 MIT
FreeCommunity
AI Systems
A serverless AWS Lambda application for AWS Documentation MCP with streaming.

Overview

What is Aws Documentation Mcp On Lambda

aws-documentation-mcp-on-lambda is a serverless application that implements the AWS Documentation Model Context Protocol (MCP) server on AWS Lambda, providing response streaming capabilities.

Use cases

Use cases include integrating AWS Documentation search into applications, providing real-time documentation assistance in chatbots, and enhancing user experience in technical documentation platforms.

How to use

To use aws-documentation-mcp-on-lambda, clone the repository, set up your local development environment with AWS CLI, SAM CLI, Python 3.12, and Docker, then build and deploy the application using SAM commands.

Key features

Key features include AWS Documentation search and retrieval functionality using MCP, real-time responses with Lambda Response Streaming, and a Python-based implementation of the MCP server.

Where to use

aws-documentation-mcp-on-lambda can be used in fields requiring efficient documentation search and retrieval, such as software development, technical support, and educational platforms.

Content

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:

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:

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:

  1. search_documentation: Search AWS documentation

    • Parameter: search_phrase (string)
    • Parameter: limit (integer, optional)
  2. read_documentation: Read AWS documentation page

    • Parameter: url (string)
    • Parameter: max_length (integer, optional)
    • Parameter: start_index (integer, optional)
  3. recommend: Get content recommendations for an AWS documentation page

    • Parameter: url (string)

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

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers