LocalCloud MCP
cloud.local由 local.cloud 发布v0.1.12更新于 Oct 24, 2026
A free local cloud environment for AI agents to build, test, and debug Google Cloud applications.
概览
把 AI 编码代理连接到免费的本地 Docker 版 Google Cloud 模拟环境,用于构建、测试和调试 GCP 应用。
- 可以做什么
- 管理本地运行时:启动、停止、重启、重置容器并查看服务与运行状态。
- 生成 SDK 环境配置:输出 Google 客户端库所需的模拟器变量与端点覆盖,也支持 Terraform 和 Docker Compose。
- 操作本地数据服务:查询 BigQuery、Spanner、Cloud SQL,发布和拉取 Pub/Sub 消息,测试 Cloud Storage 存储桶。
- 检查与诊断:读取运行时日志、执行环境自检,并在改动前预览计划中的操作。
- 按项目和用户区分上下文,默认让每个 git 仓库拥有独立项目。
- 适用场景
- 适合代理正在编写或调试调用 Google Cloud API 的代码,并希望用本地模拟器而非计费项目来验证的场景。也适用于测试套件、CI 临时环境和需要真实服务形态数据但不想使用真实凭据的代理循环。
- 运行要求
- 以本地进程方式在用户机器上运行(仅桌面端),需先安装 LocalCloud CLI。需要运行中的 Docker 引擎(Docker Desktop、Colima、OrbStack、Rancher Desktop 或 Docker Engine),容器至少需要 4 GiB 内存,并需 5380-5406 范围内的空闲主机端口。支持 Apple Silicon 上的 macOS 13+ 以及 Linux x86_64/aarch64;CLI 不支持 Intel Mac 和 Windows。
安装
在 SourceWeft 中
- 打开 控制台中的 LocalCloud MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
LocalCloud CLI
A free local cloud environment for developers and AI coding agents.
Build, test, and debug Google Cloud applications from your terminal or coding agent. MCP connects your agent to local services, SDK configuration, test data, readiness, and diagnostics.
Run local service workflows without Google Cloud service charges, start with one command, and create local projects for your experiments and test suites within your machine's capacity.
Website · MCP guide · Claude & Codex marketplace setup
[Version] [CLI] [Runtime] [Protocol] [Python] [License]
Install · Quickstart · How it works · Services · Commands · AI agents & MCP · Troubleshooting
localcloud (aliased lc) is the official host CLI for LocalCloud. It manages the
container runtime lifecycle, multi-project context, SDK environment variables, persistent Docker volumes,
and the Model Context Protocol bridge — so your application code keeps calling the same Google Cloud client
libraries it already uses, just pointed at loopback.
Why LocalCloud
- 27 services, one container. Storage, Pub/Sub, BigQuery, Spanner, Bigtable, Firestore, IAM, KMS, Dataproc, Cloud Run and more come up together — not as a dozen emulators you wire up by hand.
- Your SDK code doesn't change.
eval "$(lc env)"exports the emulator variables the official Google client libraries already look for. Same calls, same objects, loopback endpoints. - Isolated, durable environments. A named Docker volume is the runtime's identity. Run a scratch environment for CI beside your everyday one, and keep data across restarts.
- Built for humans and automation. Every command renders a readable terminal summary, and the same
result as complete JSON with
--verbose.--dry-runpreviews mutations;--debugprints the equivalentdocker run. - Agent-native. A first-class MCP bridge lets AI coding agents provision, seed, inspect, and reset real GCP-shaped state as part of their own loop — not a UI a person has to click through.
- Zero live-cloud footprint. The CLI validates that every generated endpoint is loopback and refuses to
emit a real
googleapis.comaddress. There is no silent fallback to production.
How it compares
Breadth is service availability — a callable, service-level integration. Operation-level parity is service-specific and recorded per service in the LocalCloud compatibility matrix.
Install
Prerequisites
Docker Desktop, Colima, OrbStack, Rancher Desktop, or Docker Engine, installed and running. LocalCloud needs at least 4 GiB of memory available to the container for stable operation.
No Docker yet? On macOS with Homebrew, lc doctor --fix (or lc start in a terminal) offers to install
Colima, a free, lightweight Docker engine, and starts it with 4 CPUs
and 8 GiB of memory.
On Apple Silicon, run the Docker VM on VZ with Rosetta rather than QEMU: it is faster, and QEMU has
known issues with LocalCloud (the BigQuery emulator can fail under it). lc doctor reports the Docker
app, its VM type and Rosetta, and lc doctor --fix offers to switch Colima or Rancher Desktop.
macOS and Linux
The installer adds localcloud and the shorter lc alias when available.
Homebrew
Upgrading
Update the CLI to the latest release:
lc update detects how LocalCloud was installed (script installer or Homebrew) and upgrades the CLI in place. For Homebrew, brew upgrade localcloud also works.
Standalone binaries
Signed release archives with Sigstore verification bundles are published for:
Intel Macs are not supported: 0.1.11 was the last release with an Intel macOS archive.
Windows users can run the container directly — see the Docker setup instructions.
Verify
Release builds embed their exact source commit and release date, so a binary can always be traced back.
Quickstart
Five minutes from nothing to a working Cloud Storage bucket.
1. Check your machine
Confirms Docker connectivity, reports the Docker app and its VM setup, and shows the resolved LocalCloud
context. Continue when the last line starts with [OK]. It creates no LocalCloud state, so it is always safe
to run first.
If it lists Setup findings, lc doctor --fix offers to fix them, asking before each change.
2. Start the runtime
start checks the registry for a newer image by default (--no-pull to skip), publishes the canonical
ports on all host interfaces, waits for service readiness, and tails logs for five seconds.
A service that reports a permanent failure doesn't fail the start. The command succeeds and warns
that the service is not available, giving the runtime's reason.
Use lc start --local-only to bind published ports to 127.0.0.1 instead.
Pass --local-only on subsequent start, restart, and reset commands to keep that binding.
Running start again on a live runtime is safe.
3. Configure your shell
This exports the variables the official Google client libraries already read:
4. Call it from your code
No LocalCloud-specific client. No endpoint arguments. The environment does the work.
5. Look around, then stop
Your data survives stop and restart. lc start brings it back exactly as it was.
Tip for AI coding agents: Skip manual shell setup! Head to AI agents & MCP to configure Cursor, Claude Code, or Windsurf in one command (
lc mcp install).
How it works
The CLI never becomes a proxy — it configures and supervises. Once lc start returns, your SDK talks to
the container directly.
Three identities, deliberately separate
This is the one concept worth internalizing, because every flag follows from it:
Project and user are request context: switching them is instant and never touches Docker. Defaults are
localcloud-data, local-gcp-project, and local-developer. The MCP bridge instead gives each git
repository its own project, named after the repository, unless --project-id or the repository's
localcloud.yaml names one.
Ports
New runtimes prefer the canonical range 5380–5405 (plus DNS 5410/udp). With Cloud SQL MySQL
enabled, the set also includes 5406, which LocalCloud's MySQL companion container publishes. If that
complete set is unavailable, the CLI proposes one contiguous alternative from 5508–5539, then
5821–5840, then 5322–5342, and asks before creating the container. Such a runtime publishes only
the ports its enabled services use, so four can run beside the canonical one. To pick the host ports
yourself, set host.port_range: 6000-6099 or pass --port-range 6000-6099. The CLI never scans the
operating system's general ephemeral range, and lc env always emits the ports actually in use.
Services
27 Google Cloud–compatible services, 22 enabled by default:
Full catalog — service IDs and defaults
Use the ID with --services or services.enabled in localcloud.yaml.
● on services start automatically
when services.enabled is unset; ○ off services are available but must be selected explicitly.
Select an explicit set at start time, or reset to the built-in default:
Services you enable or disable in the Console are saved on the data volume and come back on the next
start. --services outranks them for that start without clearing them, and start prints a
Service sources line naming where each enabled service came from. See
Which services run.
Lite and full images. lc start runs the lite image (agentcloud/localcloud:lite) by default. It has
every service above, but BigQuery's lite edition (no BigQuery ML, JavaScript UDFs, or EXTERNAL_QUERY on
Cloud SQL; Spanner's still works), and GKE creates metadata-only clusters. --full runs the full image
(:latest, or <version> instead of <version>-lite); the runtime keeps it on later starts and restarts
until --lite.
Staying current. A runtime keeps the image it was started with. A floating tag like lite is
refreshed by --pull. A version tag like agentcloud/localcloud:0.1.8-lite never moves by itself,
so start and restart look for a newer version on the same channel (lite or full) and, in a terminal,
ask before switching:
The check reads Docker Hub's tag list at most once every 6 hours. When Docker Hub can't be reached,
it offers newer images already on your machine instead. A "no" is remembered for that data volume
until a newer version appears. Scripts and --verbose runs never switch: they get an Image update
line instead. An explicit --pull switches without asking. Set LOCALCLOUD_IMAGE_UPDATE_CHECK=false
to turn the check off. See Which image runs.
Commands
lc and localcloud are interchangeable in every example.
Run lc COMMAND --help for command-specific flags and the valid --fields paths.
Output modes
Every command speaks to a person and to a script from the same result:
Service selection is marked with ● (on) and ○ (off) as well as color, so it stays legible under
NO_COLOR or a dumb terminal.
Exit codes
Recipes
An isolated environment per test suite. A second volume is a second, fully independent LocalCloud.
Several projects on one runtime. Switching is a request-context change, not a restart.
Terraform and OpenTofu. --format terraform emits GOOGLE_*_CUSTOM_ENDPOINT variables that the Google
provider reads — evaluate them into your shell, do not redirect them into a .tf file.
Docker Compose services. Emit the same endpoints as Compose-ready environment entries.
A JSON payload for scripts.
Signed local identity for host processes. Application Default Credentials obtain LocalCloud-signed
ID and access tokens for a service account from a 12-hour metadata relay on 127.0.0.1. The command
warns, without changing anything, when GOOGLE_APPLICATION_CREDENTIALS or gcloud's application-default
credentials would take precedence, and keeps the relay out of a configured HTTP(S)_PROXY. See
env --identity.
In CI. Skip the registry check for reproducibility (--no-pull also keeps the newer-version check
off the network), disable log tailing, fail loudly, and leave out the web console the tests never open.
Preview before you mutate. Lifecycle dry runs are strictly read-only and never pull.
Restart with local image vs pull. By default, lc restart recreates the container using the
currently available local Docker image, without pulling. A runtime pinned to a version tag still gets the
newer-version offer, which reads Docker Hub's tag list at most every 6 hours. Pass --no-pull to stay off
the network entirely. Use --pull to fetch a newer image.
If the new image cannot start on the existing data, restart recreates the runtime on the image it was
running and says so in the error (rolled_back_to_image).
Reset one project without losing the others.
lc reset --all-projects deliberately mutates nothing. Recreating every project means deleting the data
volume, and LocalCloud never runs docker volume rm for you — it prints the steps and exits non-zero so
nothing is destroyed by accident.
AI agents & MCP
LocalCloud provides native Model Context Protocol (MCP) integration, giving AI coding agents a local cloud environment to build, test, and debug Google Cloud applications with standard SDKs and zero Google Cloud service charges for local workflows.
Follow the local setup guide for Claude, Codex, Cursor, and other clients for installation, GitHub plugins, connection checks, and a first test prompt. Local setup does not depend on official Directory approval.
Why agents work best with LocalCloud MCP
- On-demand auto-start: When your agent makes a call or initializes, the MCP bridge checks and starts LocalCloud in the background automatically (guarded by file lock against race conditions). Pass
--no-startif you prefer manual runtime control. - Shared default environment: Sessions using the default
localcloud-datavolume reuse its runtime. Select another data volume deliberately when you need a separate Docker environment. - Safe local testing: Agents generate authentic emulator environment variables (
eval "$(lc env)"), query local databases (BigQuery, Spanner, Cloud SQL), publish/pull Pub/Sub messages, and test Cloud Storage buckets directly against loopback. - Project contexts: Use
--project-idfor different applications and tests. Projects share the selected runtime and are not a security boundary.
One-command setup: lc mcp install
Configure LocalCloud for your AI coding client in one command:
Use claude-code explicitly for Claude Code; claude is a Claude Desktop alias. --client all configures only the clients it detects and fails if it finds none. Codex uses its own registration command. --client cline writes Cline's shared settings file; see Cline to edit it by hand. Choose a direct connection or the GitHub plugin per client to avoid duplicate tools.
- Global by default: Installs into user-level configuration (
--global). Use--projectwith a client that supports repository scope (Cursor, Claude Code, Gemini CLI, or Antigravity). Claude Desktop, Windsurf, and Cline always use user configuration. For a project installation in a GUI client, add--command-path "$(command -v localcloud)"to keep an absolute executable path. - Desktop PATH resilience: On macOS, automatically resolves to permanent system binaries (
/opt/homebrew/bin/localcloudor/usr/local/bin/localcloud), ensuring GUI applications launched from the Dock or Finder run smoothly without shell PATH issues. - Custom overrides: Pass
--command-path <CMD>to supply a custom executable (e.g.lcor/opt/homebrew/bin/lc), or--bareto force the barelocalcloudcommand.
Instructing your agent
Prompt your agent to use LocalCloud emulators:
You have access to the
localcloudMCP server. Follow itsuse-localcloud-instead-of-gcpprompt. Runlocalcloud guideor uselocalcloud_get_envto direct all Google Cloud client libraries and Terraform to local loopback emulators.
You can also run lc guide in your terminal: it prints authoritative, copy-pasteable workflow guidance generated from the runtime's own service catalog, so it cannot drift from what the image actually ships.
What the agent can do
The MCP bridge exposes the running runtime's tools, resources, and prompts. Discover its catalog to check the capabilities available in your environment:
Reproducible cloud workflows
Run the three reproducible cloud workflows for complete agent prompts and Python/SDK test runs for Cloud Storage, Pub/Sub, and BigQuery:
(Watch the recorded demo or see the full MCP Architecture & Guide).
Manual client configuration
If you prefer to configure your MCP client manually:
(On macOS desktop apps, an absolute path like /opt/homebrew/bin/localcloud is recommended when launched from Dock/Finder; use bare "localcloud" when launching from a terminal shell with PATH configured).
For clients that speak HTTP directly, use http://127.0.0.1:5380/mcp together with X-LocalCloud-Project and X-LocalCloud-User headers.
Configuration
Sample data is owned by container startup and the Console Re-seed Data action.
The CLI does not discover, mount, or apply seed files. Existing host.seed
settings are ignored; use server.auto_seed: false to disable container bootstrap.
Managed containers with an old CLI seed mount are recreated on start/restart
with their existing data volume preserved.
Everything above works with zero configuration. When you want a versioned, shared setup, drop a
localcloud.yaml beside your project:
The file is a recursive partial overlay on the packaged defaults: omitted values inherit, and a mapping
member set to null is deleted. The CLI resolves it in this order:
- an explicit positional path —
lc start ./custom.yaml LOCALCLOUD_CONFIG./localcloud.yaml- the runtime's remembered config
~/.local/share/localcloud/localcloud.yaml, or$LOCALCLOUD_HOME/localcloud.yamlwhenLOCALCLOUD_HOMEis set- built-in defaults
An explicit, environment, or remembered path that is missing or unreadable fails rather than silently
falling back. CLI flags override the corresponding host values.
server and services.catalog settings, such as server.allowed_origins for a LAN dev app or
per-service retention limits (everything is kept by default), pass through to LocalCloud, which refuses
any key it does not know. See Gateway settings, which also lists
retired keys to remove from older files.
The image comes from --image/--lite/--full, then host.image, then LOCALCLOUD_IMAGE, then the
image the data volume last ran, then agentcloud/localcloud:lite
(details).
host.docker_socket: auto (the default) mounts the host Docker socket only when an enabled service needs
it — Compute Engine, Cloud Run, GKE, or Dataproc. Set true to always mount it, or false as a hard
opt-out.
start, restart, reset, and stop send anonymous startup-error and hourly usage events. Set
LOCALCLOUD_TELEMETRY=false or DO_NOT_TRACK=1 to turn them off; see
Telemetry for exactly what is sent.
→ Full configuration reference
Troubleshooting
Still stuck? lc doctor --verbose and lc status --verbose produce the complete machine-readable state,
and --debug prints the exact docker run the CLI would use.
Documentation
Development
LocalCloud CLI targets Python 3.11+ and uses uv.
For live container lifecycle qualification, follow the Lifecycle test runbook.
Tests that need a live Docker engine are marked docker; deselect them with -m "not docker".
lc env --identity consumes LocalCloud's typed identity session contract. The fixtures in
tests/fixtures/identity/ are validated against the contract vendored in
tests/fixtures/identity/localcloud-contract.json, which records the LocalCloud revision it came
from; refresh it with python3 scripts/sync-identity-contract.py --localcloud <checkout>, and set
LOCALCLOUD_SOURCE=<checkout> to also check it against that checkout. The end-to-end session test
runs a real lc start and lc env --identity against an image (on Colima, use a --basetemp
under your home directory so that Docker can bind-mount the configuration):
License and support
LocalCloud is proprietary software governed by the LocalCloud Public Preview License. LocalCloud MCP is free for the documented local development workflows.
- Website — local.cloud
- Documentation — local.cloud/docs
- Support — open an issue on GitHub, or email [email protected]
来源:README.md,提交 f7489a5
工具
0版本历史
1- v0.1.12最新Oct 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。