AWS Lambda MCP Runner

v0.5.19Cloud Servicesstable

Run existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions

awslambdamcpmodelcontextprotocol
Share:
367
Stars
0
Downloads
0
Weekly
0/5

What is AWS Lambda MCP Runner?

AWS Lambda MCP Runner is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to run existing model context protocol (mcp) stdio-based servers in aws lambda functions

Run existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Run existing Model Context Protocol (MCP) stdio-based server

Use Cases

Run MCP servers in AWS Lambda.
Deploy serverless MCP implementations.
Scale MCP workloads on AWS.
awslabs

Maintainer

LicenseApache-2.0
Languagepython
Versionv0.5.19
UpdatedMay 12, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @aws/run-mcp-servers-with-aws-lambda

Manual Installation

npx -y @aws/run-mcp-servers-with-aws-lambda

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use AWS Lambda MCP Runner

The AWS Lambda MCP Runner is an AWS Labs library that wraps existing stdio-based MCP servers and deploys them as AWS Lambda functions, enabling serverless, scalable MCP infrastructure in the cloud. It supports multiple deployment architectures including API Gateway with OAuth, Lambda Function URLs with SigV4, and Bedrock AgentCore Gateway, making it easy to expose any stdio MCP server over HTTP without modifying the server itself. Teams building production AI agent systems on AWS use it to scale MCP workloads, manage credentials securely through AWS Secrets Manager, and integrate with existing AWS IAM policies.

Prerequisites

  • AWS account with permissions to create Lambda functions, API Gateway, and IAM roles
  • AWS CLI configured with credentials (aws configure)
  • Python 3.x or Node.js runtime environment for your Lambda functions
  • An existing stdio-based MCP server package to wrap and deploy
  • An MCP-compatible client such as Claude Desktop configured to connect to your deployed endpoint
1

Install the library for Python or TypeScript

Install the AWS Lambda MCP adapter library for your preferred runtime.

# Python
pip install run-mcp-servers-with-aws-lambda

# TypeScript/Node.js
npm install @aws/run-mcp-servers-with-aws-lambda
2

Create a Lambda handler that wraps your MCP server (Python)

Write a Lambda handler function that configures StdioServerParameters pointing to your existing MCP server and hands control to the adapter.

import sys
from run_mcp_servers_with_aws_lambda import LambdaMcpServer
from mcp import StdioServerParameters

server_params = StdioServerParameters(
    command=sys.executable,
    args=["-m", "your_mcp_server_module", "--your-arg", "value"],
)

lambda_handler = LambdaMcpServer(server_params).handler
3

Configure credentials and secrets

Pass API keys to your wrapped MCP server using Lambda environment variables or retrieve them at runtime from AWS Secrets Manager for better security.

import boto3

def get_secret(secret_name):
    client = boto3.client('secretsmanager')
    response = client.get_secret_value(SecretId=secret_name)
    return response['SecretString']

# Pass to server via env in StdioServerParameters
env = {"MY_API_KEY": get_secret("my-mcp-api-key")}
4

Deploy the Lambda function

Package your handler and dependencies and deploy to AWS Lambda. Attach an appropriate IAM execution role and configure your chosen trigger (API Gateway, Function URL, or direct invoke).

# Using AWS SAM or CDK for deployment (example SAM command)
sam build && sam deploy --guided
5

Configure your MCP client to connect to the Lambda endpoint

Update your Claude Desktop or other MCP client config to point to the deployed Lambda endpoint URL, using the appropriate authentication method (OAuth, SigV4, or IAM).

{
  "mcpServers": {
    "lambda-mcp": {
      "command": "npx",
      "args": ["-y", "@aws/run-mcp-servers-with-aws-lambda"],
      "env": {
        "AWS_REGION": "us-east-1",
        "LAMBDA_FUNCTION_NAME": "your-mcp-lambda-function"
      }
    }
  }
}

AWS Lambda MCP Runner Examples

Client configuration

Claude Desktop configuration using the AWS Lambda MCP Runner package to connect to a Lambda-hosted MCP server.

{
  "mcpServers": {
    "lambda-mcp": {
      "command": "npx",
      "args": ["-y", "@aws/run-mcp-servers-with-aws-lambda"],
      "env": {
        "AWS_REGION": "us-east-1",
        "LAMBDA_FUNCTION_NAME": "my-mcp-server-lambda",
        "AWS_ACCESS_KEY_ID": "your_access_key",
        "AWS_SECRET_ACCESS_KEY": "your_secret_key"
      }
    }
  }
}

Prompts to try

Example prompts once your MCP server is running serverlessly on AWS Lambda.

- "List all available tools on the Lambda-hosted MCP server"
- "Use the MCP server to query my database for records from the last 7 days"
- "Invoke the file-processing tool on this S3 object: s3://my-bucket/data.csv"
- "Run the analytics tool and return a summary of the results"

Troubleshooting AWS Lambda MCP Runner

Lambda function times out when starting the MCP server subprocess

Increase the Lambda timeout to at least 30 seconds to allow the stdio subprocess to initialize. For cold starts with large dependencies, consider using Lambda SnapStart or provisioned concurrency.

Child MCP server process cannot access AWS credentials

The subprocess spawned by the adapter does not automatically inherit Lambda execution role credentials. Explicitly pass AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN as environment variables to StdioServerParameters, or retrieve credentials from the execution role before spawning.

API Gateway returns 403 Forbidden when connecting

Ensure your IAM policy grants the calling identity execute-api:Invoke permission on your API Gateway resource ARN. For SigV4-authenticated Lambda Function URLs, verify the caller has lambda:InvokeFunctionUrl permission.

Frequently Asked Questions about AWS Lambda MCP Runner

What is AWS Lambda MCP Runner?

AWS Lambda MCP Runner is a Model Context Protocol (MCP) server that run existing model context protocol (mcp) stdio-based servers in aws lambda functions It connects AI assistants to external tools and data sources through a standardized interface.

How do I install AWS Lambda MCP Runner?

Install via npm with the command: npx -y @aws/run-mcp-servers-with-aws-lambda. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with AWS Lambda MCP Runner?

AWS Lambda MCP Runner works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is AWS Lambda MCP Runner free to use?

Yes, AWS Lambda MCP Runner is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "run-model-context-protocol-servers-with-aws-lambda": { "command": "npx", "args": ["-y", "@aws/run-mcp-servers-with-aws-lambda"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use AWS Lambda MCP Runner?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides