Use this repo instead - https://github.com/aws-samples/sample-serverless-mcp-servers
A simple MCP Server running natively on AWS Lambda and Amazon API Gateway without any extra bridging components or custom transports. This is now possible thanks to the Streamable HTTP transport introduced in v2025-03-26. This is merely a prototype.
Architecture is as simple as it gets:
- AWS CLI
- Terraform
Install dependencies:
cd src
npm install
cd ..
Bootstrap server and set env var with MCP Server endpoint:
cd terraform
terraform init
terraform plan
terraform apply
export SIMPLE_MCP_SERVER_ENDPOINT=$(terraform output --raw endpoint_url)
cd ..
Note: It might take a few seconds for API Gateway endpoint to become operational.
Run client:
node src/client.js
Observe the response:
> node client.js
> listTools response: { tools: [ { name: 'ping', inputSchema: [Object] } ] }
> callTool:ping response: { content: [ { type: 'text', text: 'pong' } ] }