Back to MCP Servers

LocalStack MCP Server

Manage local AWS environments with LocalStack: container lifecycle, CDK/Terraform/SAM deployment, log analysis, chaos injection, and Cloud Pods state snapshots.

Developer Tools by LocalStack API Key active
Overview

The LocalStack MCP Server is an experimental public preview server, maintained by LocalStack, that connects MCP-compatible clients to a local LocalStack environment for AWS cloud development and testing. It eliminates manual LocalStack management by exposing tooling for container lifecycle, infrastructure deployment, log inspection, IAM analysis, chaos injection, and state management directly to an AI agent.

The server ships roughly a dozen tools covering the full LocalStack workflow: starting and stopping the container, deploying CDK, Terraform, or SAM projects via cdklocal, tflocal, and samlocal, analyzing logs for errors, generating IAM policies from violations, injecting faults to test resilience, saving and loading Cloud Pods snapshots, importing/exporting local state files, managing extensions from the marketplace, provisioning ephemeral cloud instances, replicating real AWS resources into LocalStack, and inspecting application traces through App Inspector. A documentation search tool backed by CrawlChat is also included.

Authentication requires a LocalStack Auth Token, and the AWS Replicator tool additionally needs real AWS credentials. The project is distributed via npm as @localstack/localstack-mcp-server and is licensed under Apache 2.0.

Tools

Tool Description
localstack-management Execute start, stop, restart, and status checks against the LocalStack container, with auth token integration.
localstack-deployer Automate CDK, Terraform, and SAM deployments to LocalStack using cdklocal, tflocal, and samlocal wrappers.
localstack-logs-analysis Inspect LocalStack logs and return summaries, errors, requests, or raw data for troubleshooting.
localstack-iam-policy-analyzer Detect IAM violations in the running environment and generate remediating IAM policies.
localstack-chaos-injector Inject service fault rules and network effects to test application resilience.
localstack-cloud-pods Manage remote Cloud Pods state snapshots (save, load, delete) for sharing and persisting environments.
localstack-state-management Handle local file-based state export, import, inspect, and reset with service-level granularity.
localstack-extensions List, install, uninstall, and browse LocalStack Extensions from the marketplace.
localstack-ephemeral-instances Provision and manage cloud-hosted ephemeral LocalStack instances for remote testing.
localstack-aws-client Execute AWS CLI commands via awslocal inside the running LocalStack container.
localstack-aws-replicator Replicate resources from a real AWS account into LocalStack.
localstack-app-inspector Inspect application traces and spans via the App Inspector tool.
localstack-docs Search the LocalStack documentation through a CrawlChat public collection and return focused snippets.
Setup Guide

Prerequisites

  • Docker and the LocalStack CLI available on your PATH
  • Node.js v22.x or higher
  • A valid LocalStack Auth Token (set as LOCALSTACK_AUTH_TOKEN)
  • Optional: cdklocal, tflocal, or samlocal if you plan to use the deployer tool

Install via npx

The server is published on npm as @localstack/localstack-mcp-server. Most clients can run it via npx without a separate install step.

MCP client configuration

Add the following to your MCP client config (for example ~/.cursor/mcp.json or your Claude Desktop config):

{
  "mcpServers": {
    "localstack-mcp-server": {
      "command": "npx",
      "args": ["-y", "@localstack/localstack-mcp-server"],
      "env": {
        "LOCALSTACK_AUTH_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}

Optional environment variables

  • MAIN_CONTAINER_NAME: override the container name (default localstack-main)
  • MCP_ANALYTICS_DISABLED: set to 1 to disable analytics
  • APP_INSPECTOR: set to 1 to enable App Inspector by default
  • AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION: required only for the AWS Replicator tool (also available as AWS_REPLICATOR_SOURCE_* variants)

Cursor one-click install

Cursor users can use the deeplink install button in the repository README to add the server without editing JSON manually.

Use Cases
  • Spin up a local LocalStack container, deploy a Terraform or CDK stack to it, and validate that resources were created, all from a single agent prompt.
  • Run integration tests against a LocalStack environment with chaos injection (latency, faults) to confirm application resilience.
  • Diagnose failing Lambda or API Gateway calls by asking the agent to pull and summarize LocalStack logs and errors.
  • Generate a least-privilege IAM policy from observed access violations, then re-run the workload to confirm it passes.
  • Snapshot a working dev environment to a Cloud Pod, share it with teammates, and reload it later for reproducible testing.
Example Prompts
  • "Start LocalStack and deploy the Terraform project in ./infra, then show me which resources were created."
  • "Tail LocalStack logs and summarize any errors from the last DynamoDB calls."
  • "Inject a 50% fault rate on S3 PutObject and re-run my integration tests."
  • "Save the current LocalStack state to a Cloud Pod called 'demo-baseline'."
  • "Analyze recent IAM violations and produce a policy that would allow the failing calls."
Pros
  • Official server maintained by LocalStack, covering the full local AWS workflow end to end.
  • Broad tool surface: container lifecycle, IaC deploys (CDK/Terraform/SAM), logs, IAM, chaos, state, extensions, and replication.
  • Distributed as a single npm package, runnable via npx with minimal setup.
  • Includes a built-in infrastructure-tester workflow prompt that ties deployment, validation, and integration tests together.
Limitations
  • Marked as experimental public preview, so behavior and tool surface may change.
  • Requires a paid/registered LocalStack Auth Token; not usable with vanilla open-source LocalStack alone.
  • AWS Replicator and several advanced features need extra credentials and CLI wrappers (cdklocal, tflocal, samlocal) installed locally.
Alternatives
  • AWS Labs MCP servers: official AWS-maintained MCP servers for real AWS services (CDK, CloudFormation, Lambda, etc.).
  • Terraform MCP Server by HashiCorp for Terraform-focused workflows.
  • Running awslocal and the LocalStack CLI directly via a generic shell MCP server if you only need ad-hoc command execution.