Run Model Context Protocol (MCP) servers with AWS LambdaSAFE
Run existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://pypi.org/project/run-mcp-servers-with-aws-lambda/) [](https://www.npmjs.com/package/@aws/run-mcp-servers-with-aws-lambda)
This project enables you to run Model Context Protocol stdio-based servers in AWS Lambda functions.
Currently, most implementations of MCP servers and clients are entirely local on a single machine. A desktop application such as an IDE or Claude Desktop initiates MCP servers locally as child processes and communicates with each of those servers over a long-running stdio stream.
flowchart LR subgraph "Your Laptop" Host["Desktop Applicationwith MCP Clients"] S1["MCP Server A(child process)"] S2["MCP Server B(child process)"] Host |"MCP Protocol(over stdio stream)"| S1 Host |"MCP Protocol(over stdio stream)"| S2 end
This library helps you to wrap existing stdio MCP servers into Lambda functions. You can invoke these function-based MCP servers from your application using the MCP protocol over short-lived HTTPS connections. Your application can then be a desktop-based app, a distributed system running in the cloud, or any other architecture.
flowchart LR subgraph "Distributed System" App["Your Applicationwith MCP Clients"] S3["MCP Server A(Lambda function)"] S4["MCP Server B(Lambda function)"] App |"MCP Protocol(over HTTPS connection)"| S3 App |"MCP Protocol(over HTTPS connection)"| S4 end
Using this library, the Lambda function will manage the lifecycle of your stdio MCP server. Each Lambd
ddf8bcd92890OBSERVED · 2026-10-12Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add run-mcp-servers-with-aws-lambda --env DOG_API_KEY_SECRET_ARN=${DOG_API_KEY_SECRET_ARN} -- npx -y @aws/[email protected]{
"mcpServers": {
"run-mcp-servers-with-aws-lambda": {
"command": "npx",
"args": [
"-y",
"@aws/[email protected]"
],
"env": {
"DOG_API_KEY_SECRET_ARN": "${DOG_API_KEY_SECRET_ARN}"
}
}
}
}Exposed tools (1)
1 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
echo | read | Echo back the provided message |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (6 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (19)
.mergify.yml
.pre-commit-config.yaml
.versionrc
exec(command, (error) => {cp ../../README.md .
cp ../../README.md .
cd ../../examples/servers/time
cd ../../../src/typescript/
cd ../../examples/servers/weather-alerts/
self.callback_url = f"http://localhost:{self.callback_port}/callback""redirect_uris": [self.callback_url],
aiohttp
@aws-sdk/client-bedrock-runtime, @aws-sdk/client-cloudformation, @aws-sdk/client-s3, @aws-sdk/client-secrets-manager, @aws-sdk/client-ssm, @modelcontextprotocol/sdk, @strands-agents/sdk, @types/json-s
@aws-crypto/sha256-js, @aws-sdk/client-bedrock-runtime, @aws-sdk/client-cloudformation, @aws-sdk/client-s3, @aws-sdk/client-ssm, @aws-sdk/credential-provider-node, @aws-sdk/protocol-http, @aws-sdk/typ
aws-cdk-lib, constructs, @types/aws-lambda, @types/node, aws-cdk, cdk-nag, typescript
mcp-openapi-proxy
will then have access to use your API key to call the third-party APIs by invoking the function.
will then have access to use the function's AWS credentials to call AWS APIs by invoking the function.
with open(f"{aws_dir}/credentials", "w") as f:Gates applied: no_behavioural_pass.
ddf8bcd92890full audit observations/trust-audit/mcp-server/awslabs__run-model-context-protocol-servers-with-aws-lambda.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | ddf8bcd92890 | SAFE | B | 89 | first audit |
Questions
What is the @aws/run-mcp-servers-with-aws-lambda MCP server?
Run existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions
What tools does @aws/run-mcp-servers-with-aws-lambda expose?
1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is @aws/run-mcp-servers-with-aws-lambda safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does @aws/run-mcp-servers-with-aws-lambda need?
It reads DOG_API_KEY_SECRET_ARN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does @aws/run-mcp-servers-with-aws-lambda run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @aws/run-mcp-servers-with-aws-lambda at 0.5.21.
How current is this page?
The grade is for one exact copy of the source (ddf8bcd92890), read on 2026-10-12. The repository is watched and re-audited when it changes.