sam less
MCP server from eleva/sam-serverless-mcp-server
claude mcp add --transport stdio eleva-sam-serverless-mcp-server node src/index.js
How to use
This MCP server is a minimal Model Context Protocol (MCP) server implemented in Node.js and deployed as an AWS Lambda function via the Serverless Application Model (SAM). It exposes an HTTP endpoint at /mcp where clients can send JSON-RPC requests to discover tools or invoke tool methods. The example tool included with this project is add, which takes two numbers a and b and returns their sum as a content payload. You can interact with the server locally using SAM and curl to simulate a client calling the MCP API, or deploy to AWS and call the API Gateway endpoint produced by the deployment. Tools are registered on the MCP server at startup and can be listed or invoked through the standard MCP tooling conventions.
How to install
Prerequisites:
- Node.js v22+ (for development and building the Node-based MCP server)
- Docker (for local SAM emulation if desired)
- AWS CLI (for deployment)
- SAM CLI (for building and deploying)
Installation steps:
- Clone or download the repository to your local machine.
- Install dependencies:
npm install
- Test the server locally with SAM:
sam build
sam local start-api
This will start the local API Gateway replacement and your MCP endpoint will be available at http://localhost:3000/mcp 4) Deploy to AWS:
sam build
sam deploy --guided
Follow the prompts to configure the stack name, region, and parameters. After a successful deploy, note the API endpoint URL printed by the deployment process and use it to call the MCP endpoint in the cloud.
Notes:
- The code expects to be run in a Node.js environment; locally you can start the function via SAM and access /mcp as described.
- If you modify templates or tools, re-run sam build and re-deploy as needed.
Additional notes
Tips and common considerations:
- The MCP server is designed to be lightweight and relies on the @modelcontextprotocol/sdk for MCP behavior; ensure your AWS Lambda runtime supports the same Node version as your development environment.
- When running locally, the endpoint is typically http://localhost:3000/mcp; if you switch to a different port in SAM, adjust accordingly.
- If you need to switch deployment from REST API (Api) to HTTP API (HttpApi), update template.yml Events section as described in the README (HttpApi supports lower latency and different request/response shapes).
- Environment variables can be added under the env field in mcp_config to customize server name, version, or to inject configuration for deployments.
- For testing tools, you can use the included curl examples in the README to list tools and call the add tool.
- Ensure Docker is available if you intend to run SAM locally with containers for a closer production-like environment.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.