localstack-mcp-server

v0.8.0
io.github.localstack/localstack-mcp-server Checked 1 hour ago Published 17 hours ago

A LocalStack MCP Server providing essential tools for local cloud development & testing

Values you need

VariableWhat it is
LOCALSTACK_AUTH_TOKENrequired secret LocalStack Auth Token (required for all LocalStack MCP tools)
AWS_ACCESS_KEY_IDoptional secret Source AWS access key used by AWS Replicator to read external AWS resources
AWS_SECRET_ACCESS_KEYoptional secret Source AWS secret access key used by AWS Replicator to read external AWS resources
AWS_SESSION_TOKENoptional secret Optional source AWS session token used by AWS Replicator for temporary credentials
AWS_DEFAULT_REGIONoptional Source AWS region used by AWS Replicator
AWS_REPLICATOR_SOURCE_AWS_ACCESS_KEY_IDoptional secret Optional Replicator-specific source AWS access key. Use this instead of AWS_ACCESS_KEY_ID when the Replicator source account should be isolated from generic AWS config.
AWS_REPLICATOR_SOURCE_AWS_SECRET_ACCESS_KEYoptional secret Optional Replicator-specific source AWS secret access key. Use with AWS_REPLICATOR_SOURCE_AWS_ACCESS_KEY_ID.
AWS_REPLICATOR_SOURCE_AWS_SESSION_TOKENoptional secret Optional Replicator-specific source AWS session token for temporary credentials.
AWS_REPLICATOR_SOURCE_REGION_NAMEoptional Optional Replicator-specific source AWS region. Use with the AWS_REPLICATOR_SOURCE_* credential group.
AWS_REPLICATOR_SOURCE_ENDPOINT_URLoptional Optional Replicator-specific source AWS endpoint URL for advanced source-account scenarios.
APP_INSPECTORoptional 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.
LOCALSTACK_IMAGE_NAMEoptional Docker image the management start action launches for the AWS stack (LOCALSTACK_IMAGE_NAME wins over IMAGE_NAME). Defaults to localstack/localstack-pro:latest.
LOCALSTACK_VOLUME_DIRoptional Host directory mounted at /var/lib/localstack in the LocalStack container. Defaults to the per-OS cache path the LocalStack CLI used; inside Docker it defaults to the localstack-mcp named volume.
GATEWAY_LISTENoptional Override the gateway port bindings for the start action (comma-separated [host]:port entries). When set, the implicit 443 binding is skipped.
MAIN_CONTAINER_NAMEoptional Explicit LocalStack container name for Docker-based tools and the container created by start. Defaults to localstack-main; detection also finds containers lstk started, such as localstack-aws.
DOCKER_HOSToptional Docker daemon endpoint used for all container operations (unix://, npipe://, tcp://). Defaults to the platform's standard socket.
DOCKER_SOCKoptional Host path of the Docker socket mounted into the LocalStack container (Lambda needs it). Validated to exist when set explicitly. Defaults to /var/run/docker.sock.
EXTERNAL_SERVICE_PORTS_STARToptional Inclusive start of the host port range published for external LocalStack services on start (default 4510).
EXTERNAL_SERVICE_PORTS_ENDoptional Inclusive end of the host port range published for external LocalStack services on start (default 4560).
LOCALSTACK_HOSTNAMEoptional Host name of the LocalStack gateway the tools call. Defaults to localhost; when the server runs in Docker, host.docker.internal.
LOCALSTACK_PORToptional Port of the LocalStack gateway the tools call. Defaults to 4566.
LOCALSTACK_AZURE_IMAGE_NAMEoptional Docker image the management start action launches for service: azure. Defaults to localstack/localstack-azure:latest.
LOCALSTACK_AZ_PATHoptional The az launcher, or the Azure CLI's Python, for localstack-azure-client. Defaults to the first az on PATH.
LOCALSTACK_AZ_CONFIG_DIRoptional The Azure tool's own Azure CLI profile directory; it must not overlap ~/.azure. Defaults to ~/.localstack/azure/mcp-config-<port>.
LOCALSTACK_AZ_WORKDIRoptional The directory localstack-azure-client runs az in; relative file paths resolve against it. Defaults to the server's working directory.
LOCALSTACK_AZ_TIMEOUT_SECONDSoptional Time limit in seconds for one Azure CLI command (5-3600). Defaults to 300.

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add localstack-mcp-server -e 'LOCALSTACK_AUTH_TOKEN=<LOCALSTACK_AUTH_TOKEN>' -- npx -y @localstack/localstack-mcp-server@0.8.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "localstack-mcp-server": {
      "args": [
        "-y",
        "@localstack/localstack-mcp-server@0.8.0"
      ],
      "command": "npx",
      "env": {
        "LOCALSTACK_AUTH_TOKEN": "<LOCALSTACK_AUTH_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "localstack-mcp-server": {
      "args": [
        "-y",
        "@localstack/localstack-mcp-server@0.8.0"
      ],
      "command": "npx",
      "env": {
        "LOCALSTACK_AUTH_TOKEN": "<LOCALSTACK_AUTH_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "LOCALSTACK_AUTH_TOKEN",
      "id": "localstack-auth-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "localstack-mcp-server": {
      "args": [
        "-y",
        "@localstack/localstack-mcp-server@0.8.0"
      ],
      "command": "npx",
      "env": {
        "LOCALSTACK_AUTH_TOKEN": "${input:localstack-auth-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.localstack-mcp-server]
command = "npx"
args = ["-y", "@localstack/localstack-mcp-server@0.8.0"]
env = { "LOCALSTACK_AUTH_TOKEN" = "<LOCALSTACK_AUTH_TOKEN>" }

For AI agents

  1. Ask the user for: LOCALSTACK_AUTH_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: localstack-app-inspector, localstack-aws-client, localstack-aws-replicator, localstack-azure-client, localstack-chaos-injector, localstack-cloud-pods, localstack-deployer, localstack-docs, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json