Localstack Mcp Server
io.github.localstack由 GitHub 帳號 localstack 發布v0.5.0更新於 Oct 24, 2026
A LocalStack MCP Server providing essential tools for local cloud development & testing
概覽
讓 AI 助理用自然語言啟動、部署、除錯與檢視本機 LocalStack 雲端模擬環境(AWS、Snowflake、Azure)。
- 可以做什麼
- 啟動、停止、重新啟動並查看 LocalStack 的 AWS、Snowflake、Azure 模擬器狀態
- 部署 CDK、Terraform、SAM 專案並讀取部署結果
- 分析日誌、依權限違規產生 IAM 政策、注入混沌故障或網路延遲
- 對模擬服務執行 AWS CLI、Azure CLI 與 Snowflake SQL 指令
- 透過 Cloud Pods、本機匯出匯入、擴充套件與臨時雲端執行個體管理狀態
- 檢索 LocalStack 文件並檢視 App Inspector 的追蹤與 IAM 評估
- 適用情境
- 適合在本機以 LocalStack 開發與測試雲端基礎設施時使用:部署 IaC、排查呼叫失敗、進行韌性測試,或在接觸真實雲端帳號前驗證資源。
- 執行需求
- 以 npx(需 Node.js v20 以上)或 Docker 映像在本機執行,需要已安裝並執行 Docker。所有工具都要求以 LOCALSTACK_AUTH_TOKEN 提供 LocalStack Auth Token。選用 CLI:cdklocal、tflocal、samlocal、snow、az。AWS Replicator 需要來源 AWS 憑證,例如 AWS_ACCESS_KEY_ID、AWS_SECRET_ACCESS_KEY 與 AWS_DEFAULT_REGION。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Localstack Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
LocalStack MCP Server
Let an AI agent manage and interact with LocalStack on your machine.
[!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.
Quick start
Set up the server in your MCP client with the interactive wizard:
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.
What you can ask your agent
Once the server is configured, talk to LocalStack through your agent in natural language:
- "Start LocalStack and deploy the Terraform project in
./infra, then tell me which resources came up." - "My Lambda calls are failing. Read the LocalStack logs, find the permission errors, and generate an IAM policy that fixes them."
- "Inject 500ms of latency into DynamoDB and confirm my retry logic still works."
- "Search the LocalStack docs for how to enable S3 event notifications and summarize the steps."
- "Start the LocalStack Azure emulator, create a resource group and a storage account, and upload
./data/sample.csvto a new blob container."
How it works
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:
- Start, stop, restart, and monitor the LocalStack for AWS, Snowflake and Azure emulators with built-in auth.
- Deploy CDK, Terraform, and SAM projects with automatic configuration detection.
- Search LocalStack documentation for guides, API references, and configuration details.
- Parse logs, catch errors, and auto-generate IAM policies from violations.
- Inject chaos faults and network effects into LocalStack to test system resilience.
- Manage LocalStack state snapshots via Cloud Pods for development workflows.
- Export, import, inspect, and reset LocalStack state locally with Export & Import State file-based workflows.
- Install, remove, list, and discover LocalStack Extensions from the marketplace.
- Launch and manage Ephemeral Instances for remote LocalStack testing workflows.
- Replicate external AWS resources into LocalStack with AWS Replicator so IaC stacks can resolve shared dependencies locally.
- Inspect LocalStack application flows with App Inspector traces, spans, events, payload metadata, and IAM policy evaluations.
- Start repeatable LocalStack workflows from ready-made MCP prompts, including infrastructure validation and integration test generation.
Tools
This server provides your AI with dedicated tools for managing your LocalStack environment:
[!NOTE] All tools in this MCP server require
LOCALSTACK_AUTH_TOKEN.
Prompts
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.
Installation
Set up with the wizard (recommended)
The fastest way to install the MCP server is the interactive setup wizard:
The wizard:
- lets you choose how to run the server (
npxon your machine, or the self-contained Docker image), - checks the prerequisites (Node.js, Docker) and tells you how to fix anything missing,
- picks up your
LOCALSTACK_AUTH_TOKENfrom the environment, or asks for it, - lets you pass extra LocalStack config (e.g.
DEBUG=1,PERSISTENCE=1), - detects your installed MCP clients (Cursor, Antigravity, Claude Code, Claude Desktop, VS Code, Codex, OpenCode, Amazon Q CLI) and writes the right configuration for each one you select.
It can also run fully non-interactively, e.g. in dotfiles or scripts:
To remove the server from your clients again:
Run npx -y @localstack/localstack-mcp-server init --help for all options.
Prerequisites
- Docker installed and running. The MCP server manages the LocalStack container directly through the Docker API.
cdklocal,tflocal, orsamlocalinstalled in your system path if you want to deploy CDK, Terraform, or SAM projects- Snowflake CLI (
snow) installed in your system path if you want to use the Snowflake tool - Azure CLI (
az) installed in your system path if you want to use the Azure tool (see docs/AZURE.md) - A valid LocalStack Auth Token configured as
LOCALSTACK_AUTH_TOKEN(required for all MCP tools) - Node.js v20 or higher installed in your system path
Run with npx
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. The server manages LocalStack through your Docker daemon; any deployment CLIs used by tools run from your host PATH.
All LocalStack MCP tools require LOCALSTACK_AUTH_TOKEN to be set. You can get your LocalStack Auth Token by following the official documentation.
Run from source
If you installed from source, change command and args to point to your local build:
Run with Docker
The localstack/localstack-mcp-server Docker image bundles Terraform/tflocal, CDK/cdklocal, SAM/samlocal, and the Snowflake 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; state lives in a named Docker volume (localstack-mcp) unless LOCALSTACK_VOLUME_DIR points at a host directory.
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.
See docs/DOCKER.md for the run command, MCP client config, IaC project mounts, CDK notes, and troubleshooting.
LocalStack configuration
See docs/AZURE.md for how the Azure tool runs the Azure CLI.
Migration notes (CLI-free lifecycle)
Since v0.6.0 the MCP server no longer uses (or requires) the localstack CLI. The LocalStack container is created directly through the Docker Engine API. Behavioral differences from CLI-driven starts:
~/.localstack/*.envconfig profiles andDOCKER_FLAGSare not read at start. Pass configuration through theenvVarsargument of thelocalstack-managementstart action, or setLOCALSTACK_-prefixed variables in the MCP server's environment (LocalStack aliasesLOCALSTACK_<NAME>to<NAME>natively).- Besides
LOCALSTACK_*/PROVIDER_OVERRIDE_*, only a curated set of common unprefixed config variables is forwarded from the host environment (DEBUG,LS_LOG,SERVICES,PERSISTENCE,EAGER_SERVICE_LOADING,ENFORCE_IAM,IAM_SOFT_MODE,EXTENSION_AUTO_INSTALL,APP_INSPECTOR,DNS_ADDRESS,MAIN_DOCKER_NETWORK, and theLAMBDA_*/CFN_*/SNOWFLAKE_*/SF_*families). - Port 443 is published by default. If something else uses port 443 locally, set
GATEWAY_LISTEN=:4566to skip it. - If you previously used
lstk, note the container the server creates is namedlocalstack-main(externally startedlocalstack-awscontainers are still detected and managed;restartpreserves their name, image, and volume).
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.
Contributing
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:
- Install Git and Node.js
- Clone the repository
- Install dependencies with
yarn - Build with
yarn build
MCP Server Tester
This repository includes MCP Server Tester for tool validation in direct mode and LLM host mode.
- Run direct MCP tests (deterministic):
- Run Gemini-based MCP host evals:
- Open the latest MCP Server Tester HTML report:
- Run both:
Notes:
- MCP tests target the lifecycle-aware local server command
node dist/cli.jsby default. LOCALSTACK_AUTH_TOKENis required for all MCP tool usage and test suites.- You can override the target command with:
MCP_TEST_COMMANDMCP_TEST_ARGS(space-separated arguments)
License
[LocalStack Server MCP server]來源:README.md,提交 3646916
工具
0版本歷史
1- v0.5.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分