Skip to main content
MCP server CX Codex

localstack-mcp-server — Claude Code MCP server: how to install

Connects local LocalStack emulators to your AI assistant to deploy cloud infrastructure, inspect logs, and simulate network faults.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env LOCALSTACK_AUTH_TOKEN=<LOCALSTACK_AUTH_TOKEN> --env AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> --env AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> --env AWS_SESSION_TOKEN=<AWS_SESSION_TOKEN> --env AWS_DEFAULT_REGION=<AWS_DEFAULT_REGION> --transport stdio localstack-mcp-server -- npx -y @localstack/localstack-mcp-server
Open on GitHub

What localstack-mcp-server does

This server exposes runtime tools to interact directly with your local LocalStack instance. Using the localstack-management tool, an agent can start, stop, restart, and monitor the health of emulated AWS and Azure stacks.

Deployments run locally through localstack-deployer, which accepts Terraform, CDK, or SAM templates. When calls fail, the assistant can read runtime logs, detect permission violations, and draft corrective IAM policies. It can also introduce artificial latency to test how application code handles timeouts.

Every tool in this server depends on a valid LOCALSTACK_AUTH_TOKEN. Automated deployments will fail unless tflocal, cdklocal, or samlocal are already installed on your machine.

What it helps with

  • deploy local infrastructure templates using Terraform, CDK, or SAM
  • diagnose permission errors from logs and generate IAM policies
  • simulate API latency to evaluate client retry behavior
  • export and restore emulator state with Cloud Pods

Example prompts for the agent

  • Launch LocalStack, deploy the Terraform files from ./infra, and list the provisioned resources.
  • Check the failed Lambda execution logs, locate permission errors, and draft an IAM policy to resolve them.
  • Add 500ms latency to DynamoDB calls and test if retry handling functions correctly.

How to install localstack-mcp-server

Platform CLI

claude mcp add --env LOCALSTACK_AUTH_TOKEN=<LOCALSTACK_AUTH_TOKEN> --env AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> --env AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> --env AWS_SESSION_TOKEN=<AWS_SESSION_TOKEN> --env AWS_DEFAULT_REGION=<AWS_DEFAULT_REGION> --transport stdio localstack-mcp-server -- npx -y @localstack/localstack-mcp-server

Replace <…> with your own values. 6 more environment variables are in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about localstack-mcp-server

How to install localstack-mcp-server in Claude Code?

Run `claude mcp add --env LOCALSTACK_AUTH_TOKEN=<LOCALSTACK_AUTH_TOKEN> --env AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> --env AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> --env AWS_SESSION_TOKEN=<AWS_SESSION_TOKEN> --env AWS_DEFAULT_REGION=<AWS_DEFAULT_REGION> --transport stdio localstack-mcp-server -- npx -y @localstack/localstack-mcp-server`. Replace placeholder values with your LocalStack token and credentials.

What does localstack-mcp-server do?

It lets AI assistants start mock cloud emulators, execute local infrastructure deployments, and troubleshoot runtime issues without touching live cloud providers.

What external CLI tools are needed for deployments?

The deployment tool requires local installations of cdklocal, tflocal, or samlocal in your system environment.

Similar MCP servers

All MCP servers for Cloud: AWS, Azure, GCP →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor