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 產生的概覽

把 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。
安裝前請注意
MCP 橋接可自動啟動執行環境,代理也能建立、填入與重設本地專案狀態,重設操作可能清空 Docker 磁碟區中的資料。多個專案共用同一個執行環境,且明確不構成安全邊界。預設情況下發布的連接埠會綁定到所有主機介面,可用僅限本地的選項限制為回環位址。start、restart、reset 與 stop 會傳送匿名使用與啟動錯誤事件,除非關閉遙測。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 LocalCloud MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

console
$ lc doctor╭── LocalCloud v0.1.14 ───────────────────────────────────────────────────────────────────────╮│                            │ Top commands                                                   ││ Checking LocalCloud setup  │  localcloud (or lc)    status | start | stop | restart         ││                            │  eval $(lc env)        Exports env vars that redirect cloud se…││           ╭────╮           │────────────────────────────────────────────────────────────────││        ╭──╯    ╰──╮        │ Context                                                        ││       ╭─╯        ╰─╮       │  Data Volume: localcloud-data        Project: local-gcp-project││      ╭╯            ╰╮      │  User: local-developer                                         ││      ╰──────────────╯      │  Config: built-in defaults (overridable by ./localcloud.yaml)  ││                            │                                                                │├────────────────────────────┴────────────────────────────────────────────────────────────────┤│ Supported Services (● 22 enabled · ○ 5 disabled)                                            ││  ● Storage      ● Pub/Sub      ○ Firestore    ● Bigtable     ● Spanner      ● BigQuery      ││  ● Cloud SQL    ● AlloyDB      ● Memorystore  ● Dataproc     ● Tasks        ● Scheduler     ││  ● Functions    ○ Cloud Run    ○ Compute      ○ GKE          ● Workflows    ○ Vertex AI     ││  ● Sheets       ● KMS          ● Secrets      ● IAM          ● Logging      ● Monitoring    ││  ● Resource Mgr ● Service Usage ● Billing                                                   │╰─────────────────────────────────────────────────────────────────────────────────────────────╯ Tip: Run localcloud guide for AI agent workflows, or lc for the fast alias.
Docker  29.8.1 (/opt/homebrew/bin/docker) · Colima 0.10.1 (VZ, Rosetta on)Image   agentcloud/localcloud:lite (ID: 66d2113a69fb)Ports   5380-5406 (in use by localcloud)[OK] LocalCloud is ready to start  0.5s

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-run previews mutations; --debug prints the equivalent docker 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.com address. There is no silent fallback to production.

How it compares

LocalCloudgcloud beta emulatorsTestcontainersReal GCP dev project
Services27~5 (Bigtable, Datastore/Firestore, Pub/Sub, Spanner)Wraps the same emulatorsAll
SetupOne CLI commandOne process per serviceWritten in test codeProject, billing, IAM
SDK wiringeval "$(lc env)"Per-emulator, manualPer-container, in codeADC + real credentials
Web consoleBuilt in——Yes
Terraform / OpenTofulc env --format terraform——Yes
Agent control (MCP)Built in———
Data persistenceDocker volume, survives restartsProcess lifetimeTest lifetimeDurable
Cost / credentialsNoneNoneNoneBilled, real keys

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

sh
curl -fsSL https://local.cloud/install.sh | sh

The installer adds localcloud and the shorter lc alias when available.

Homebrew

sh
brew install LocalGCloud/tap/localcloud
brew upgrade localcloud     # upgradebrew uninstall localcloud   # remove

Upgrading

Update the CLI to the latest release:

sh
lc update

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:

PlatformArchitecturesMinimum
macOSApple SiliconmacOS 13+
Linuxx86_64, aarch64glibc 2.35+ (Ubuntu 22.04+)

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

console
$ lc --versionlocalcloud 0.1.14 (commit c2bed60e4464, released 2026-11-03)

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

sh
lc doctor

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

sh
lc start
console
Config        built-in defaults (overridable by ./localcloud.yaml)Data volume   localcloud-dataOrigin        managedProject       local-gcp-projectUser          local-developerImage         agentcloud/localcloud:liteImage status  Available locallyURL           http://127.0.0.1:5380Ports         5380-5406Services      alloydb, bigquery, bigtable, cloudbilling, cloudfunctions, cloudiam,              cloudresourcemanager, cloudscheduler, cloudsql, cloudtasks, dataproc, gcs,              kms, logging, memorystore, monitoring, pubsub, secretmanager, serviceusage,              sheets, spanner, workflows[OK] LocalCloud is ready  8.4s

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

sh
eval "$(lc env)"

This exports the variables the official Google client libraries already read:

sh
export STORAGE_EMULATOR_HOST="http://127.0.0.1:5382"export BIGQUERY_EMULATOR_HOST="http://127.0.0.1:5388"export SPANNER_EMULATOR_HOST="127.0.0.1:5386"export BIGTABLE_EMULATOR_HOST="127.0.0.1:5385"export GOOGLE_CLOUD_PROJECT="local-gcp-project"export CLOUDSDK_CORE_PROJECT="local-gcp-project"export CLOUDSDK_API_ENDPOINT_OVERRIDES_STORAGE="http://127.0.0.1:5382/"# …one entry per enabled service, plus gcloud endpoint overrides and a local access token

4. Call it from your code

No LocalCloud-specific client. No endpoint arguments. The environment does the work.

Python

python
from google.cloud import storage
client = storage.Client()bucket = client.create_bucket("my-bucket")bucket.blob("hello.txt").upload_from_string(    "Hello from LocalCloud!")

Node.js / TypeScript

typescript
import { Storage } from "@google-cloud/storage";
const storage = new Storage();const [bucket] = await storage.createBucket("my-bucket");await bucket.file("hello.txt")  .save("Hello from LocalCloud!");

Go

go
ctx := context.Background()client, _ := storage.NewClient(ctx)defer client.Close()
bucket := client.Bucket("my-bucket")_ = bucket.Create(ctx, "local-gcp-project", nil)

gcloud CLI

sh
gcloud storage buckets create gs://my-bucketgcloud storage ls

5. Look around, then stop

sh
lc console   # open the web console for the selected projectlc status    # runtime health, endpoints, and ownershiplc logs      # recent runtime logslc restart   # recreate runtime with current local image (--pull to check registry)lc stop      # stop the container; the data volume is untouched

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

  your code ──► google-cloud-* SDK ──► 127.0.0.1:5380-5406 ─────────┐  terraform ──► GOOGLE_*_CUSTOM_ENDPOINT ───────────────────────────┤  AI agent  ──► lc mcp (stdio) / :5380/mcp (HTTP) ──────────────────┤                                                                    │                      ┌─────────────────────────────────────────────┘          ┌───────────▼─────────────────────────────────────────────┐          │  Docker container  ·  agentcloud/localcloud             │          │                                                         │          │   :5380  gateway · console · admin API · MCP · facades  │          │   :5382  Cloud Storage      :5386-87  Spanner           │          │   :5383  Pub/Sub            :5388-89  BigQuery          │          │   :5384  Firestore          :5390     Memorystore       │          │   :5385  Bigtable           :5391     PostgreSQL        │          └───────────────────┬─────────────────────────────────────┘                              │              Docker volume:  localcloud-data              mounted at   :  /var/lib/localcloud

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:

AxisFlagWhat it selectsScope
Data volume--data-volumeThe durable runtime identity — a named Docker volume mounted at /var/lib/localcloud. Two volumes are two independent LocalClouds.Docker
Project--project-idA logical Google Cloud project inside one runtime. Many projects share a volume. start and MCP startup create a missing one.Request
User--userThe attributed caller sent to LocalCloud services, normalized to <name>@localcloud.invalid where a principal is required.Request

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:

GroupServices
Storage & databasesCloud Storage, Firestore, Bigtable, Spanner, BigQuery, AlloyDB, Cloud SQL, Memorystore
Messaging & orchestrationPub/Sub, Cloud Tasks, Cloud Scheduler, Cloud Workflows
Compute & serverlessCloud Functions, Cloud Run, Compute Engine, GKE, Dataproc
Security & identityCloud IAM, Secret Manager, Cloud KMS
Management & billingResource Manager, Service Usage, Cloud Billing
ObservabilityCloud Logging, Cloud Monitoring
AI & productivityVertex AI, Google Sheets
Full catalog — service IDs and defaults

Use the ID with --services or services.enabled in localcloud.yaml.

IDGoogle Cloud serviceDefault
gcsCloud Storage● on
pubsubPub/Sub● on
firestoreFirestore○ off
bigtableBigtable● on
spannerSpanner● on
bigqueryBigQuery● on
sheetsGoogle Sheets● on
secretmanagerSecret Manager● on
cloudtasksCloud Tasks● on
cloudschedulerCloud Scheduler● on
cloudfunctionsCloud Functions (2nd Gen)● on
alloydbAlloyDB● on
dataprocDataproc● on
cloudiamCloud IAM● on
cloudresourcemanagerCloud Resource Manager● on
serviceusageService Usage● on
cloudbillingCloud Billing● on
loggingCloud Logging● on
monitoringCloud Monitoring● on
gkeGKE○ off
computeCompute Engine○ off
cloudrunCloud Run○ off
memorystoreMemorystore (Redis/Valkey)● on
workflowsCloud Workflows● on
vertexaiVertex AI○ off
kmsCloud KMS● on
cloudsqlCloud SQL● on

● 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:

sh
lc start --services gcs,pubsub,bigquery,firestorelc start --services 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.

sh
lc start --full

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:

console
A newer LocalCloud image is available for this runtime.  Current  agentcloud/localcloud:0.1.8-lite   (the image data volume 'localcloud-data' last ran)  Offered  agentcloud/localcloud:0.1.11-lite  (Docker Hub; will be pulled, 373.1 MB)The runtime is recreated on the new image and its data volume is migrated forward, so going back may not be possible.Use 0.1.11-lite now? [y/N]

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.

CommandPurpose
lc updateUpdate the CLI through its script installer or Homebrew
lc doctorInspect Docker access, VM engine, and host setup; --fix interactively resolves issues
lc startStart the runtime; supports --services, --local-only, --tls, --no-ui, and creating the project named by --project-id
lc statusShow runtime health, ownership, endpoints, and Docker details
lc envGenerate SDK, Terraform, or Docker Compose configuration; --identity starts a local identity session
lc consoleOpen the web console for the selected project and user
lc logsPrint recent runtime logs
lc restartRecreate the container with the local image (default: --no-pull); --pull checks the registry and moves a pinned version to the newest
lc resetReset the selected project (--all-projects prints manual recreate steps)
lc stopStop the runtime without deleting persistent data
lc cleanupRemove malformed Docker resources, stale runtime state, and legacy files
lc guidePrint authoritative coding-agent guidance
lc mcpRun the stdio MCP bridge; lc mcp install configures AI coding agents

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:

FlagEffect
(none)Concise terminal summary, with spinners and elapsed time in an interactive shell
--verboseThe complete structured result as JSON on stdout
--fields PATH[,PATH…]Append specific JSON paths to the concise summary
--dry-runValidate and print every planned Docker and LocalCloud mutation, changing nothing
--debugDiagnostics on stderr, including a copyable equivalent docker run command
sh
lc status --verbose | jq '.container.url'lc start  --fields mcp.direct_url,container.namelc start  --dry-run                    # preview before mutating anythingNO_COLOR=1 lc doctor                   # symbols still carry status without color

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

CodeMeaning
0Success
1Completed with failures (for example cleanup partial), or an unexpected internal error
2LocalCloud error — invalid input, Docker problem, or a failed operation. Rendered as Error [code] message
130Command interrupted with Ctrl-C

Recipes

An isolated environment per test suite. A second volume is a second, fully independent LocalCloud.

sh
lc start  --data-volume ci-e2e --project-id pr-1421lc status --data-volume ci-e2elc stop   --data-volume ci-e2e

Several projects on one runtime. Switching is a request-context change, not a restart.

sh
lc start --project-id payments-deveval "$(lc env --project-id payments-dev)"
lc start --project-id analytics-deveval "$(lc env --project-id analytics-dev)"

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.

console
$ eval "$(lc env --format terraform)"$ env | grep GOOGLE_ | head -4GOOGLE_STORAGE_CUSTOM_ENDPOINT=http://127.0.0.1:5382/storage/v1/GOOGLE_BIGQUERY_CUSTOM_ENDPOINT=http://127.0.0.1:5388/GOOGLE_PROJECT=local-gcp-projectGOOGLE_OAUTH_ACCESS_TOKEN=localcloud-user.bG9jYWwtZGV2ZWxvcGVy…
$ terraform apply

Docker Compose services. Emit the same endpoints as Compose-ready environment entries.

sh
lc env --format docker-compose

A JSON payload for scripts.

sh
lc env --format json | jq '.STORAGE_EMULATOR_HOST'

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.

sh
eval "$(lc env --identity --account [email protected])"python my_app.py          # google.auth.default() now returns the runner accounteval "$(lc env --identity --stop)"

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.

sh
lc start --data-volume ci-$GITHUB_RUN_ID --no-pull --no-ui --tail 0 --verbose# …run tests…lc stop  --data-volume ci-$GITHUB_RUN_ID

Preview before you mutate. Lifecycle dry runs are strictly read-only and never pull.

sh
lc start --dry-run          # every planned Docker and LocalCloud mutation, in orderlc restart --dry-run

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.

sh
lc restart                  # fast restart with current local image (e.g. after building locally)lc restart --no-pull        # same, and never contacts Docker Hublc restart --pull           # pull a newer image (a pinned version moves to the newest on its channel)

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.

sh
lc reset                    # clears the selected project; reseed from the Consolelc reset --all-projects     # prints manual recreate steps; deletes nothing

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-start if you prefer manual runtime control.
  • Shared default environment: Sessions using the default localcloud-data volume 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-id for 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:

sh
# Install for Cursor (user-level in ~/.cursor/mcp.json)lc mcp install --client cursor
# Install for Claude Code (user scope via claude CLI)lc mcp install --client claude-code
# Install for Claude Desktop (claude_desktop_config.json)lc mcp install --client claude-desktop
# Register directly in Codex (CLI and local desktop sessions)codex mcp add localcloud -- "$(command -v localcloud)" mcp
# Install for Gemini CLI (~/.gemini/settings.json)lc mcp install --client gemini
# Install for Antigravity (~/.gemini/config/mcp_config.json)lc mcp install --client antigravity
# Install for Windsurf (~/.codeium/windsurf/mcp_config.json)lc mcp install --client windsurf
# Configure every supported client installed on this machinelc mcp install --client all

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 --project with 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/localcloud or /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. lc or /opt/homebrew/bin/lc), or --bare to force the bare localcloud command.

Instructing your agent

Prompt your agent to use LocalCloud emulators:

You have access to the localcloud MCP server. Follow its use-localcloud-instead-of-gcp prompt. Run localcloud guide or use localcloud_get_env to 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:

CapabilityTools & ResourcesWhat the agent does
Service discovery & healthlocalcloud_list_services
localcloud_check_readiness
Discovers running services, assigned loopback ports, and verifies emulator readiness before sending requests.
API catalog & schemaslocalcloud_get_api_catalog
localcloud_browse_resources
Inspects full Google Cloud REST OpenAPI schemas, method parameters, and browses buckets, tables, and topics.
Data querying & SQLlocalcloud_query_dataRuns real SQL queries against local BigQuery, Cloud Spanner, and Cloud SQL databases without requiring client SDKs.
SDK & Terraform wiringlocalcloud_get_env
localcloud_generate_terraform_env
Generates environment export commands (STORAGE_EMULATOR_HOST, etc.) and Terraform provider overrides.
Testing & scenarioslocalcloud_list_recipes
localcloud_export_state
Seeds test data scenarios, creates project state checkpoints, and diffs state changes.

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:

[LocalCloud MCP demo]

(Watch the recorded demo or see the full MCP Architecture & Guide).

Manual client configuration

If you prefer to configure your MCP client manually:

json
{  "mcpServers": {    "localcloud": {      "command": "/opt/homebrew/bin/localcloud",      "args": ["mcp"]    }  }}

(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:

yaml
version: 1context:  project: payments-dev  user: local-developerhost:  data_volume: payments-data  memory: 8g  data: persistent  docker_socket: autoservices:  enabled:    - gcs    - pubsub    - bigquery    - firestore

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:

  1. an explicit positional path — lc start ./custom.yaml
  2. LOCALCLOUD_CONFIG
  3. ./localcloud.yaml
  4. the runtime's remembered config
  5. ~/.local/share/localcloud/localcloud.yaml, or $LOCALCLOUD_HOME/localcloud.yaml when LOCALCLOUD_HOME is set
  6. 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

SymptomWhat it meansFix
Error [docker_unavailable]Docker is not installed, not running, unreachable, or denies access (details.reason)Follow the message; lc doctor --fix installs Colima or starts your Docker app
Error [fix_confirmation_required]lc doctor --fix ran without a terminal (or with --verbose)Run it in an interactive terminal; it asks before each fix
BigQuery or another service stops soon after start on Apple SiliconThe Docker VM runs on QEMUlc doctor, then lc doctor --fix to switch to VZ with Rosetta
Error [docker_socket_unavailable]A service needs the Docker socket but it is missing or blockedCheck the socket path, or set host.docker_socket: false to disable Docker-backed services
Error [health_timeout] / runtime_readiness_timeoutThe container started but services were not ready in timelc logs --tail 200; confirm at least 4 GiB is available, or raise it with --memory 8g
Error [services_not_ready]The gateway is up, but the services the error names were still warming up at the deadline, or /readiness gave no answer (the error says why). The runtime keeps running, so status, logs and stop find itlc logs --tail 200 for those services; leave them out with --services if you don't need them
Warning: <Service> is not available (…)The runtime reports that service as failed for good (for example engine_port_unpublished); the other services runFollow the remedy in the warning; lc status repeats it
Warning: The Cloud SQL MySQL companion '…' could not startIts host port (5406 by default) is held by another container or processFree the port, or pin another with host.environment.LOCALCLOUD_MYSQL_PORT
Error [port_mapping_confirmation_required]Canonical ports are busy and the shell is non-interactive; the message names each busy port's container or process when it can tellFree the ports, or re-run with --accept-dynamic-ports
Error [data_volume_collision]More than one compatible container uses the same volumelc cleanup --dry-run to inspect, then lc cleanup
Error [ownership_mismatch] / ownership_forbiddenA Docker resource is not CLI-managedThe CLI never removes resources it does not own — remove it manually, or use a different --data-volume
Error [unknown_project]The project does not exist in this runtimeOnly start creates projects: lc start --project-id NAME
Error [mcp_connection_timeout]The /mcp endpoint was not ready in 10 slc status to confirm the runtime is up, then lc mcp --connect-timeout 30
A failed start or restart error carries rolled_back_to_imageThe newer image could not start on the existing data, so the runtime was recreated on its previous imagelc logs --tail 200; stay on the previous image, or pass --image to choose one
Image update line after start/restartA newer version of the runtime's pinned image exists; non-interactive runs only report itRun the command it names, answer the prompt in a terminal, or set LOCALCLOUD_IMAGE_UPDATE_CHECK=false
Error [dry_run_pull_conflict]--dry-run was combined with --pullPreviews are strictly read-only — use --dry-run --no-pull, with the image already present locally
Error [removed_flat_config]localcloud.yaml uses a pre-1.0 flat keyThe message names the replacement path — see configuration
Stale containers, networks, or locksInterrupted runs left resources behindlc cleanup --dry-run, then lc cleanup

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

GuideContents
CLI referenceEvery command, flag, output mode, and field path
Configurationlocalcloud.yaml, service catalog, volumes, projects, identity
IntegrationsPython, Node, Go, Terraform/OpenTofu, and MCP client setup
MCP guide & architectureAuto-start, project isolation, tool catalog, and client installers
MCP local setup guideClaude, Codex, Cursor and other clients: install, plugins, connection checks, first prompt
MCP privacyWhat the CLI and plugin handle, telemetry, and outbound traffic
MCP reproducible workflowsStep-by-step agent test scenarios for Storage, Pub/Sub, BigQuery
MCP listings and submissionsMarketplace, directory, awesome-list, and announcement links; status and follow-up
Lifecycle testingEnd-to-end container lifecycle test runbook and verification
Performance benchmarksEmpirical latency and load benchmarks for container lifecycle, MCP bridge, and emulated GCP services
local.cloud/docsProduct documentation, service compatibility, and the console

Development

LocalCloud CLI targets Python 3.11+ and uses uv.

sh
uv sync --extra test                                      # install dependencies
uv run --extra test python -m pytest -q                   # full suiteuv run --extra test python -m pytest -q -m "not docker"   # no Docker required
uv run lc --help                                          # run from source

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):

sh
LOCALCLOUD_RUN_IDENTITY_E2E=1 LOCALCLOUD_IMAGE=localcloud:<tag> \  uv run --frozen --extra test python -m pytest -m docker \  tests/integration/test_identity_session_acceptance.py

License and support

LocalCloud is proprietary software governed by the LocalCloud Public Preview License. LocalCloud MCP is free for the documented local development workflows.

來源:README.md,提交 f7489a5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.12最新Oct 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。