Skip to content

v4.1.1 — Gemini ADC mode + MCP env backfill + Windows node stdio fix

Choose a tag to compare

@LKbaba LKbaba released this 21 Apr 05:43
· 10 commits to main since this release

Highlights

Two long-standing bugs fixed that together made Gemini-mcp (and any Node-based MCP with an env block) unusable under Claude CLI on Windows — plus a new Gemini Vertex AI ADC auth mode that lets you skip service-account JSON keys entirely.

Fixed

  • MCP subprocess env stripping (Claude CLI upstream workaround) — Claude CLI hands mcp-config.json's env map to child_process.spawn() without merging process.env; any MCP server declaring an env block therefore loses PATH, APPDATA, HOME, SystemRoot, and HTTPS_PROXY/HTTP_PROXY/NO_PROXY. Symptoms: Google auth library fails to locate ADC credentials under %APPDATA%\gcloud, corporate-proxy users can't reach the Gemini API, Node fails to resolve runtime paths. McpConfigManager.backfillHostEnv() now backfills ~30 critical host vars into every server's env map (user/injected values always win — this is a backfill, not an override). See anthropics/claude-code issues #1254, #24586, #28332.
  • Windows node + cmd /c wrapper breaking MCP stdio — node was incorrectly in the Windows cmd /c wrapper list alongside shim launchers (npx, npm). Wrapping node adds an extra shell layer that breaks the JSON-RPC stdio handshake between Claude CLI and the MCP subprocess: tools/list may succeed via direct probes but tools/call returns MCP error -32000: Connection closed. Removed node from the wrapper list; only .cmd/.bat shim launchers are wrapped now.

New Features

  • Gemini Vertex AI — Application Default Credentials (ADC) mode — New auth option under "Vertex AI (GCP Project)" → "Use ADC (gcloud auth)". Users who have run gcloud auth application-default login can now point the extension at a GCP project without exporting a service-account JSON key.
    • New config key claudeCodeChatUI.gemini.authMode (enum: api-key / vertex-json / adc)
    • McpConfigManager injects GOOGLE_GENAI_USE_VERTEXAI=true + GOOGLE_CLOUD_PROJECT=<id> when ADC mode is active; ADC discovery (via google-auth-library) then finds the credentials file on disk
  • Vertex AI auth-mode UI hierarchy — Top-level radio toggles API Key (AI Studio) vs Vertex AI (GCP Project); the Vertex AI panel now contains a nested sub-radio for JSON Key File vs ADC. The sub-panel uses left indent + a faint left border so the sub-options visually belong to their Vertex AI parent (previously rendered as a flat 2×2 grid that read like four peer options).

Diagnostic

  • MCP env probe logging — ClaudeProcessService logs the critical subset of env vars handed to Claude CLI (APPDATA, USERPROFILE, HOME, PATH, proxy vars, Gemini/Anthropic keys) on every spawn, with secret-like values redacted. McpConfigManager emits a per-server env-key probe right after writing mcp-config.json, plus a specific Gemini marker describing which stderr line to look for in the subprocess (Auth mode: vertex-ai (project: ...) vs No authentication configured). Makes future MCP env-related bug reports triagable from a single debug_log.txt.

Build

  • .vscodeignore adds scripts/** exclusion — dev-only probe and smoke-test scripts (probe-mcp-initialized.mjs, test-gemini-adc.mjs, probe-gemini.js) no longer ship in the VSIX.

Install

  • Download claude-code-chatui-4.1.1.vsix below, then in VS Code / Cursor: Ctrl+Shift+P → Extensions: Install from VSIX...
  • Or wait for the VS Code Marketplace update.

Full Changelog: v4.1.0...v4.1.1