Get the FREE Ultimate OpenClaw Setup Guide →

cdk less

MCP server from eleva/cdk-serverless-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio eleva-cdk-serverless-mcp-server node src/index.js

How to use

This MCP server is a minimal Model Context Protocol (MCP) implementation deployed on AWS Lambda and exposed via API Gateway using AWS CDK. It uses the @modelcontextprotocol/sdk and middy middleware to wire a simple MCP server with an example tool called add. The server exposes an HTTP POST endpoint at /mcp and supports the standard MCP tools listing and tool invocation via JSON-RPC. After deployment, you can discover the live URL from the CDK stack outputs and test the server locally or remotely using the provided curl examples to list tools and call the add tool (which adds two numbers and returns the result).

To use, send JSON-RPC requests to the /mcp endpoint. First fetch the available tools with a tools/list call, then invoke a tool with tools/call by specifying the tool name and arguments. The included add tool demonstrates a very small arithmetic operation: you provide a and b, and it responds with the sum as a text payload.

How to install

Prerequisites:

  • Node.js v22+ (as recommended by the project)
  • npm (comes with Node.js)
  • AWS CDK v2+ installed globally

Step-by-step installation:

  1. Clone or download the repository
  2. Install dependencies
npm install
  1. Run tests locally (optional)
npm run test
  1. Bootstrap and deploy the CDK stack to AWS
cdk bootstrap
cdk deploy
  1. Retrieve the API endpoint from the CloudFormation outputs or CDK stack outputs after deployment and test using curl as shown in the README.

Additional notes

Notes and tips:

  • The server is designed as a single AWS Lambda function behind an API Gateway endpoint (typically /mcp).
  • Local development can be simulated by testing the server code paths and by unit tests in tests using Jest as described in the README.
  • The example tool implemented is add, which takes two numbers a and b and returns their sum as a content payload. You can extend the server by registering more tools via server.tool(...) calls in the src/index.js file.
  • If you customize the environment, consider adding standard MCP environment variables (if any) or AWS-related configuration to the CDK stack (e.g., region, role permissions, Lambda timeout).
  • Ensure that the deployed Lambda has appropriate permissions to be invoked by API Gateway and that the endpoint URL is correctly used in clients.

Related MCP Servers

Sponsor this space

Reach thousands of developers