mcpField
S
sample-serverless-mcp-server

sample-serverless-mcp-server

Local
github.com/aws-samplesCloud & Infra19Updated 58w ago

About sample-serverless-mcp-server

sample-serverless-mcp-server is a sample GitHub MCP server built on Amazon Lambda and the Streamable HTTP protocol. It is intended for developers who want to deploy an MCP server in a serverless environment.

Key features

  1. 01Streamable HTTP MCP protocol support
  2. 02Elastic deployment on Amazon Lambda
  3. 03Requests handled through API Gateway

Use cases

  1. 01Deploying a GitHub MCP server to Amazon Lambda
  2. 02Studying how to adapt the TypeScript MCP server to Streamable HTTP

MCP support

This project is an MCP server that adapts the official TypeScript MCP server to Streamable HTTP, serving MCP clients through API Gateway and Lambda.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

sample-serverless-mcp-server

A Github MCP Server implementation based on Amazon Lambda and Streamable HTTP protocol.

Project Description

This project demonstrates how to transform the official TypeScript MCP Server to support Streamable HTTP protocol and deploy it via Amazon Lambda. The implementation leverages new features introduced in MCP v2025.03.26, including:

  • Stream transmission based on HTTP Chunked Transfer Encoding

  • Dynamic context priority control

  • Seamless integration with existing HTTP infrastructure

Key Features

  • Streamable HTTP MCP protocol support

  • Elastic deployment based on Amazon Lambda

  • Optimized cost-performance balance

MCP Server on Amazon Lambda Architecture

Architecture

Quick Start

Prerequisites
  • Node.js 20+
  • AWS CLI configured
  • OSS-Serverless CLI
Serverless Streamable HTTP MCP Server
  • Github MCP Server
How to deploy Github MCP Server on Amazon Lambda :

This project needs to set up a GITHUB_PERSONAL_ACCESS_TOKEN, which has been stored in Amazon Lambda environment variables.

Never submit your serverless.yml to a GitHub public repository.

# Clone repository
git clone https://gitlab.aws.dev/wsuam/sample-serverless-mcp-server.git
cd sample-serverless-mcp-server/src/github/

# Install dependencies
npm install
npm install -g osls

#Set your github personal access token in serverless.yml 
cp serverless.example.yml serverless.yml
#edit serverless.yml , GITHUB_PERSONAL_ACCESS_TOKEN: <Your GitHub Personal Access Token>


# Test local
npm sls offline

# Deploy to AWS Lambda
npm sls deploy

Architecture Overview

The project utilizes the following architecture:

  • API Gateway: Handles HTTP requests

  • Lambda: Executes MCP Server logic

  • Streamable HTTP: Implements streaming responses

  • DynamoDB and S3 store request logs (this part is not ready yet).

Development Guide

  1. Configure AWS credentials
  2. Run npm sls offline
  3. Follow the prompts to complete deployment configuration

Contributing

Pull requests are welcome. Before submitting, please ensure:

  • Code follows project standards
  • All tests pass
  • Documentation is updated

License

This library is licensed under the MIT-0 License. See the LICENSE file.

Project Status

Project is under active development. Issues and suggestions are welcome.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.