serverless-mcp-server logo

serverless-mcp-server

by eleva

A simple Model Context Protocol (MCP) server deployed on AWS Lambda and exposed via Amazon API Gateway, deployed with Serverless Framework. It provides a minimal setup for interacting with models using the MCP standard.

View on GitHub

Last updated: N/A

What is serverless-mcp-server?

This is a serverless implementation of a Model Context Protocol (MCP) server. It's designed to be lightweight and easy to deploy on AWS Lambda, allowing you to interact with models using the MCP standard via an API Gateway endpoint.

How to use serverless-mcp-server?

  1. Install dependencies using npm install. 2. Install open source serverless globally using npm install -g osls. 3. Run locally with npm sls offline. 4. Deploy to AWS using sls deploy. You can then interact with the server using HTTP POST requests to the provided endpoint, following the MCP protocol.

Key features of serverless-mcp-server

  • Minimal MCP server setup using @modelcontextprotocol/sdk

  • Deployed as a single AWS Lambda function

  • HTTP POST endpoint exposed via API Gateway at /mcp

  • Supports local development via serverless-offline

Use cases of serverless-mcp-server

  • Serving model context information in a standardized way.

  • Integrating models with serverless applications.

  • Providing a simple interface for interacting with models.

  • Building lightweight model serving endpoints.

FAQ from serverless-mcp-server

What is MCP?

MCP stands for Model Context Protocol, a standard for exchanging context information with models.

What is Serverless Framework?

Serverless Framework is an open-source framework for building, deploying, and operating serverless applications.

How do I deploy this to AWS?

Run the command sls deploy after configuring your AWS credentials.

How do I test this locally?

Run the command npm sls offline to simulate the AWS Lambda and API Gateway environment locally.

What dependencies do I need?

You need Node.js v22+, Open Source Serverless or Serverless Framework v3+ and Serverless Offline