Connect your MCP client
Claude Code
Section titled “Claude Code”claude mcp add kode-gopher -- kode-gopher serve --context=<context> --namespace=<namespace>Claude Desktop and other clients
Section titled “Claude Desktop and other clients”Most clients take a JSON config like this (claude_desktop_config.json for Claude Desktop):
{ "mcpServers": { "kode-gopher": { "command": "kode-gopher", "args": ["serve", "--context=<context>", "--namespace=<namespace>"] } }}Settings:
- Command: use the full path, typically
~/go/bin/kode-gopher, if your client doesn’t inherit yourPATH. --context: leave it out to use your current kubectl context.--namespace:defaulton kind,codemodewith the GKE overlay.
Try it
Section titled “Try it”The server offers three tools: execute_go_code, gcp_auth_status and lookup_package_docs. Their descriptions tell the model which packages are precompiled and how to write a snippet, so you can just ask:
Use execute_go_code to list the GKE clusters in my project.
Ask it to call gcp_auth_status to see who snippets run as.
Credentials
Section titled “Credentials”In this mode kode-gopher copies your ADC file (~/.config/gcloud/application_default_credentials.json) and GOOGLE_CLOUD_PROJECT into the sandbox for each run. Snippets can do anything your account can do. Treat the model’s code as running as you, because it is.
With no ADC file, snippets run without credentials and gcp_auth_status reports mode=none. More in Credentials.
Troubleshooting
Section titled “Troubleshooting”- Stuck at “opening sandbox”. The warm pool has no ready sandbox. Check
kubectl -n <namespace> get sandboxes,pods. On GKE, a fresh pool waits for nodes to scale up and the image to pull, which takes a few minutes. On kind, check that the image was loaded. ErrImagePullon GKE right after updating your checkout. The overlay pins a sandbox image tag that CI publishes when a change merges. For a few minutes after a merge that changed the image, the tag may not exist yet.- Slow builds with
tidied: true. The snippet imports a package outside the precompiled set, so the build rango mod tidyfirst. It works, but more slowly. Later calls in the same session are faster. - Permission errors from Google APIs. These come from your own account. Compare
gcp_auth_statuswithgcloud auth list, and checkGOOGLE_CLOUD_PROJECT.