Serverless Framework
$ serverless Official High Riskserverless (sls) packages and deploys Lambda functions, EventBridge triggers, and CloudFormation stacks from serverless.yml. While serverless package and serverless info --json help inspect artifacts, v4 requires a SERVERLESS_LICENSE_KEY / login for organizations, and output formatting varies across subcommands.
brew install serverless Project-coupled CloudFormation/Lambda bundler; best invoked via CLI inside the service repo rather than an MCP wrapper.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports serverless info --json and serverless print --format json, but mixed banners/stdout noise and v4 license key prompts can trip headless agents.
info --jsonandprint --format jsonexist on select commands- v4 CLI commands may block or fail without
SERVERLESS_LICENSE_KEY/ login
serverless package acts as a local pre-flight build step, whereas deploy and remove mutate live AWS CloudFormation stacks and IAM roles without a --dry-run flag on deploy.
serverless packageseparates local bundling from live AWS deploymentserverless removetears down entire CloudFormation stacks
Available via npm, npx, and Homebrew across macOS, Linux, and Windows, requiring Node.js.
- Node.js runtime dependency; widely distributed via npm
Streamlines AWS Lambda packaging and event wiring, though newer teams often prefer AWS SAM, CDK, or SST.
- Mature plugin ecosystem and compact
serverless.ymlsyntax
Official serverless/serverless vendor tool, though v4's move to mandatory license/auth caused friction in open-source workflows.
- Official vendor CLI (
serverless/serverless), v4 proprietary license model
Extensive documentation at serverless.com/framework/docs covering AWS events and CLI commands.
- Official CLI and provider docs at serverless.com
Security, Auth & Guardrails
Stores Serverless v4 auth in ~/.serverlessrc or SERVERLESS_ACCESS_KEY / SERVERLESS_LICENSE_KEY; AWS deployments use standard AWS CLI credentials.
Serverless Framework v4 is free for individuals/orgs under $2M annual revenue, and requires a paid license key above that threshold; AWS resources incur cloud billing.
# Serverless Framework Agent Rules - Run `serverless package` and `serverless print` before any `serverless deploy`. - Verify `SERVERLESS_LICENSE_KEY` or auth session is configured in CI before running commands. - Never run `serverless remove` without explicit user confirmation.
Agent-Ready Command Recipes
Safe Read-Only Queries
serverless print --format json
Resolves variables in serverless.yml and outputs the effective configuration without deploying.
serverless info --json
Queries the deployed CloudFormation stack summary in JSON format.
Controlled Writes & Previews
serverless package --stage dev
Builds the deployment package and CloudFormation template into .serverless/ without calling AWS deploy.
Strengths for Agents
- +
serverless packagebuilds CloudFormation templates and zip bundles locally before touching AWS. - +
serverless print --format jsonresolves variable interpolations cleanly. - + Concise
serverless.ymlsyntax for Lambda + API Gateway workflows.
Caveats & Pitfalls
- ! Serverless v4 requires authentication or
SERVERLESS_LICENSE_KEY(commercial license over $2M revenue). - ! JSON output is inconsistent across subcommands and often mixed with decorative CLI banners.