serverlessrun

v0.1.0
io.github.CloudCorpRecords/serverlessrun Checked 2 days ago Published 1 month ago

AWS Lambda functions, versions, aliases, layers and settings as MCP tools.

AWS Lambda as MCP tools, shaping requests for the documented Lambda REST API. serverlessrun is a clean-room rebuild of the core surface of the aws-lambda MCP server, under a new name: the same tool names and request shapes, fresh code, no copied branding. list_functions, get_function, invoke_function, list_versions_by_function, get_alias, list_aliases, list_layers, get_layer_version, list_event_source_mappings, get_account_settings.

Summary extracted from the README.

serverlessrun

AWS Lambda as MCP tools, shaping requests for the documented Lambda REST API. serverlessrun is a clean-room rebuild of the core surface of the aws-lambda MCP server, under a new name: the same tool names and request shapes, fresh code, no copied branding.

Tools (core subset, 10)

list_functions, get_function, invoke_function, list_versions_by_function, get_alias, list_aliases, list_layers, get_layer_version, list_event_source_mappings, get_account_settings.

Not in this subset: function create/update/delete and code upload, configuration and policy management, tags, concurrency controls, function URLs, destinations, event source mapping writes, and code signing.

How it works

Every tool shapes a documented Lambda REST request (API version 2015-03-31) and hands it to an injectable executor: execute({ service: "lambda", operation, path, method, body, query }). Library users can inject their own executor or signer to run against real AWS with their own signing stack.

Setup

export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export AWS_REGION=us-east-1        # optional, this is the default
export AWS_SESSION_TOKEN=...       # optional

Honest limitation: this rebuild ships no SigV4 signer of its own. With credentials set but no signer injected, calls fail with SigV4 signing not configured: inject a signer/executor. With no credentials, calls fail with an error naming AWS_ACCESS_KEY_ID.

CLI

npx @reneturcios/serverlessrun list_functions '{}'
npx @reneturcios/serverlessrun mcp        # stdio MCP server

Each tool name is a subcommand taking one JSON object argument.

MCP client config

{
  "mcpServers": {
    "serverlessrun": {
      "command": "npx",
      "args": ["-y", "@reneturcios/serverlessrun", "mcp"],
      "env": { "AWS_ACCESS_KEY_ID": "...", "AWS_SECRET_ACCESS_KEY": "..." }
    }
  }
}

Docker

docker run -i -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY ghcr.io/cloudcorprecords/serverlessrun

Development

npm install
npm run build
npm test

License

MIT