If you're running LocalStack for local AWS development, this lets Claude control the entire workflow without leaving the conversation. Start and stop containers, deploy CDK/Terraform/SAM projects, parse logs for errors, auto-generate IAM policies from access violations, inject chaos faults for resilience testing, and manage Cloud Pods for state snapshots. It also handles LocalStack Extensions, Ephemeral Instances, and the AWS Replicator for pulling in external resources. Most features require a LocalStack auth token. Think of it as turning your AI into a LocalStack operator that can troubleshoot deployments, analyze traces, and run infrastructure validation workflows on demand.
[!IMPORTANT] The LocalStack MCP server is currently available as an experimental public preview. For questions, issues or feedback, please utilize the LocalStack Community slack or submit a GitHub Issue
LocalStack emulates the cloud on your local machine so software teams and AI agents can validate security, quality, and reliability faster and more safely than the cloud allows. This Model Context Protocol (MCP) server lets any MCP client (Cursor, Claude, VS Code, and more) start LocalStack, deploy infrastructure, and debug your local cloud in natural language.
Set up the server in your MCP client with the interactive wizard:
npx -y @localstack/localstack-mcp-server init
The wizard detects your installed clients, asks how you want to run the server, and writes the configuration for you. You need a LocalStack Auth Token; the wizard reads LOCALSTACK_AUTH_TOKEN from your environment or asks for it. For the full options, prerequisites, and manual setup, see Installation.
Once the server is configured, talk to LocalStack through your agent in natural language:
./infra, then tell me which resources came up."The server connects MCP-compatible apps directly to your local LocalStack environment and its emulated AWS services, so your assistant can operate the stack securely without custom scripts or manual setup.
This server eliminates custom scripts and manual LocalStack management. Your agent can:
This server provides your AI with dedicated tools for managing your LocalStack environment:
[!NOTE] All tools in this MCP server require
LOCALSTACK_AUTH_TOKEN.
| Tool Name | Description | Key Features |
|---|---|---|
localstack-management | Manages LocalStack runtime operations for AWS and Snowflake stacks | - Execute start, stop, restart, and status checks - Integrate LocalStack authentication tokens - Inject custom environment variables - Verify real-time status and perform health monitoring |
localstack-deployer | Handles infrastructure deployment to LocalStack for AWS environments | - Automatically run CDK, Terraform, and SAM tooling to deploy infrastructure locally - Enable parameterized deployments with variable support - Process and present deployment results - Requires you to have cdklocal, tflocal, or samlocal installed in your system path |
localstack-logs-analysis | Analyzes LocalStack for AWS logs for troubleshooting and insights | - Offer multiple analysis options including summaries, errors, requests, and raw data - Filter by specific services and operations - Generate API call metrics and failure breakdowns - Group errors intelligently and identify patterns |
localstack-iam-policy-analyzer | Handles IAM policy management and violation remediation | - Set IAM enforcement levels including enforced, soft, and disabled modes- Search logs for permission-related violations - Generate IAM policies automatically from detected access failures - Requires a valid LocalStack Auth Token |
localstack-chaos-injector | Injects and manages chaos experiment faults for system resilience testing | - Inject, add, remove, and clear service fault rules - Configure network latency effects - Comprehensive fault targeting by service, region, and operation - Built-in workflow guidance for chaos experiments - Requires a valid LocalStack Auth Token |
localstack-cloud-pods | Manages remote LocalStack Cloud Pods for development workflows | - Save current state as a Cloud Pod - Load previously saved Cloud Pods instantly - Delete Cloud Pods from remote cloud-backed storage - Use this for managed remote state snapshots, not local export/import files - Requires a valid LocalStack Auth Token |
localstack-state-management | Manages local file-based LocalStack state export/import workflows | - Export LocalStack state to a local file on disk through the LocalStack State REST API - Import LocalStack state from a local file - Inspect current LocalStack state as JSON metamodel data - Reset all state or only selected services - Supports service-level granularity for export, reset, and inspect - Use this for local disk workflows; use Cloud Pods for remote cloud-backed snapshots - Requires a valid LocalStack Auth Token |
localstack-extensions | Installs, uninstalls, lists, and discovers LocalStack Extensions | - Manage installed extensions via CLI actions (list, install, uninstall)- Browse the LocalStack Extensions marketplace ( available)- Requires a valid LocalStack Auth Token |
localstack-ephemeral-instances | Manages cloud-hosted LocalStack Ephemeral Instances | - Create temporary cloud-hosted LocalStack instances and get an endpoint URL - List available ephemeral instances, fetch logs, and delete instances - Supports lifetime, extension preload, Cloud Pod preload, and custom env vars on create - Requires a valid LocalStack Auth Token and LocalStack CLI |
localstack-aws-client | Runs AWS CLI commands inside the LocalStack for AWS container | - Executes commands via awslocal inside the running container- Sanitizes commands to block shell chaining - Auto-detects LocalStack coverage errors and links to docs |
localstack-aws-replicator | Replicates external AWS resources into a running LocalStack instance | - Start single-resource replication jobs with a resource type and identifier or ARN - Start batch replication jobs, such as SSM parameters under a path prefix - Poll job status by job ID and list existing jobs - List resource types supported by the running Replicator extension - Reads source AWS credentials from the MCP server environment and supports optional target account or region overrides |
localstack-app-inspector | Inspects LocalStack application traces, spans, events, and IAM evaluations | - Enable or disable App Inspector for the running LocalStack instance - List and inspect traces to understand AWS service-to-service flows - Drill into spans, events, payload metadata, and IAM policy evaluation events - Filter by service, region, operation, resource, ARN, status, and time range - Requires a valid LocalStack Auth Token and the App Inspector feature in the connected LocalStack license |
localstack-docs | Searches LocalStack documentation through CrawlChat | - Queries LocalStack docs through a public CrawlChat collection - Returns focused snippets with source links only - Helps answer coverage, configuration, and setup questions without requiring LocalStack runtime |
localstack-snowflake-client | Runs SQL against the LocalStack Snowflake emulator through the snow CLI | - Execute SELECT, DDL (CREATE/DROP), DML (INSERT/UPDATE/DELETE), and SHOW/DESCRIBE statements from a query string or a .sql file- Check the Snowflake connection before running queries - Set optional database, schema, warehouse, and role context per query - Requires the Snowflake CLI ( snow) and a valid LocalStack Auth Token |
Prompts are user-selected workflow templates exposed by MCP clients as slash commands or quick actions. They frame multi-step LocalStack tasks so the assistant follows the same phases, evidence requirements, and reporting format every time.
| Prompt Name | Description | Arguments |
|---|---|---|
infrastructure-tester | Deploys an IaC project to LocalStack, validates declared resources with live AWS probes and App Inspector evidence, then writes and runs deterministic integration tests. | iac_path (required), iac_type, test_language, test_framework, mode, services_focus, user_focus |
The fastest way to install the MCP server is the interactive setup wizard:
npx -y @localstack/localstack-mcp-server init
The wizard:
npx on your machine, or the self-contained Docker image),LOCALSTACK_AUTH_TOKEN from the environment, or asks for it,DEBUG=1,PERSISTENCE=1),It can also run fully non-interactively, e.g. in dotfiles or scripts:
npx -y @localstack/localstack-mcp-server init --method npx --client cursor,claude-code --yes
To remove the server from your clients again:
npx -y @localstack/localstack-mcp-server remove
Run npx -y @localstack/localstack-mcp-server init --help for all options.
cdklocal, tflocal, or samlocal installed in your system path if you want to deploy CDK, Terraform, or SAM projectssnow) installed in your system path if you want to use the Snowflake toolLOCALSTACK_AUTH_TOKEN (required for all MCP tools)Add the following to your MCP client's configuration file (e.g., ~/.cursor/mcp.json). This configuration uses npx to run the server, which will automatically download and install the package if needed. LocalStack and any deployment CLIs used by tools run from your host PATH.
{
"mcpServers": {
"localstack": {
"command": "npx",
"args": ["-y", "@localstack/localstack-mcp-server"],
"env": {
"LOCALSTACK_AUTH_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
All LocalStack MCP tools require LOCALSTACK_AUTH_TOKEN to be set. You can get your LocalStack Auth Token by following the official documentation.
If you installed from source, change command and args to point to your local build:
{
"mcpServers": {
"localstack": {
"command": "node",
"args": ["/path/to/your/localstack-mcp-server/dist/stdio.js"],
"env": {
"LOCALSTACK_AUTH_TOKEN": "<YOUR_TOKEN>"
}
}
}
}
The localstack/localstack-mcp-server Docker image bundles the LocalStack CLI, awslocal, Terraform/tflocal, CDK/cdklocal, SAM/samlocal, Snowflake CLI, and Docker CLI. The only required host dependency is Docker. The container uses the mounted Docker socket to run LocalStack as a sibling container on the host.
If you use the deployer tool with local Terraform, CDK, or SAM projects, bind-mount those project paths into the MCP container and pass the in-container path to the tool. The simplest convention is to mount projects at the same absolute path they use on the host.
{
"mcpServers": {
"localstack": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/var/run/docker.sock:/var/run/docker.sock",
"-v", "/Users/you/.localstack-mcp:/Users/you/.localstack-mcp",
"-e", "XDG_CACHE_HOME=/Users/you/.localstack-mcp",
"--add-host", "host.docker.internal:host-gateway",
"--add-host", "s3.host.docker.internal:host-gateway",
"--add-host", "snowflake.localhost.localstack.cloud:host-gateway",
"-e", "LOCALSTACK_AUTH_TOKEN",
"-e", "LOCALSTACK_HOSTNAME=host.docker.internal",
"-v", "/Users/you/projects:/Users/you/projects",
"localstack/localstack-mcp-server:latest"
],
"env": { "LOCALSTACK_AUTH_TOKEN": "<YOUR_TOKEN>" }
}
}
}
See docs/DOCKER.md for the run command, MCP client config, IaC project mounts, CDK notes, and troubleshooting.
| Variable Name | Description | Default Value |
|---|---|---|
LOCALSTACK_AUTH_TOKEN (required) | The LocalStack Auth Token to use for the MCP server | None |
MAIN_CONTAINER_NAME | The name of the LocalStack container to use for the MCP server | localstack-main |
MCP_ANALYTICS_DISABLED | Disable MCP analytics when set to 1 | 0 |
APP_INSPECTOR | Set to 1 in the LocalStack container environment to enable App Inspector by default across restarts. The MCP tool can also toggle App Inspector at runtime with set-status. | 0 |
AWS_ACCESS_KEY_ID (required for AWS Replicator tool) | Source AWS access key used by AWS Replicator to read external AWS resources | None |
AWS_SECRET_ACCESS_KEY (required for AWS Replicator tool) | Source AWS secret access key used by AWS Replicator to read external AWS resources | None |
AWS_DEFAULT_REGION (required for AWS Replicator tool) | Source AWS region used by AWS Replicator | None |
For AWS Replicator-specific source credentials, you can use the AWS_REPLICATOR_SOURCE_ prefixed variants instead of the unprefixed variants. Do not mix the prefixed and unprefixed source credential groups; when any AWS_REPLICATOR_SOURCE_ variable is set, the Replicator tool reads the source configuration only from that group.
Built on the XMCP framework, you can add new tools by adding a new file to the src/tools directory and documenting it in the manifest.json file.
Pull requests are welcomed on GitHub! To get started:
yarnyarn buildThis repository includes MCP Server Tester for tool validation in direct mode and LLM host mode.
yarn test:mcp:direct
export GOOGLE_GENERATIVE_AI_API_KEY="<your-gemini-key>"
export LOCALSTACK_AUTH_TOKEN="<your-localstack-auth-token>"
yarn test:mcp:evals
npx mcp-server-tester open
yarn test:mcp
Notes:
node dist/stdio.js by default.LOCALSTACK_AUTH_TOKEN is required for all MCP tool usage and test suites.MCP_TEST_COMMANDMCP_TEST_ARGS (space-separated arguments)LOCALSTACK_AUTH_TOKENsecretLocalStack Auth Token (optional for Pro features)