Back to Home
awslabs icon

run-model-context-protocol-servers-with-aws-lambda

Verified Safe

by awslabs

Overview

This project provides a CDK pipeline to automate the deployment of Model Context Protocol (MCP) servers as AWS Lambda functions, offering client transports for Lambda invocation and SigV4 HTTP, and server adapters/handlers for various AWS Lambda event models.

Installation

Run Command
npm install && npm run build && npm run deploy

Environment Variables

  • AWS_REGION
  • LOG_LEVEL
  • DOG_API_KEY_SECRET_ARN

Security Notes

The project uses standard AWS SDKs for Lambda invocation and SigV4 HTTP signing, which are generally secure. The `stdioServerAdapter` runs child processes per request; while this is a common pattern for certain types of servers, it introduces a potential risk vector if the `command` or `args` parameters are sourced from untrusted input or configured insecurely. However, within the context of this deployment pipeline, these parameters are expected to be defined by the developer for trusted MCP servers. No obvious 'eval' or obfuscation is present. Hardcoded secrets are avoided by using AWS Secrets Manager for examples like the Dog Facts API Key.

Similar Servers

Stats

Interest Score75
Security Score8
Cost ClassMedium
Stars343
Forks39
Last Update2026-01-15

Tags

AWSLambdaMCPDeploymentJSON-RPCServerless