reconnect
Diagnose the ga-mcp-full MCP connection and walk through reconnect options when tools stop responding.
/ga-mcp-full:reconnect
Diagnose the ga-mcp-full MCP server and surface the exact reconnect path for the current failure mode. Use this when GA tool calls stop responding, return auth errors, or the /plugin detail view shows a red error line for ga-mcp-full.
Why this command exists
Claude Code's /plugin and /mcp menus do not expose a plugin-extensible "reconnect" button for stdio MCP servers — that affordance is HTTP-transport-only per the MCP 2025-06-18 spec. So reconnects for this stdio server happen through one of three paths, and the right path depends on which failure you hit. This command runs the diagnostics needed to pick the right one.
Steps
-
Check CLI installation — if this fails, no other reconnect path will help:
command -v ga-mcp-full && ga-mcp-full --versionIf missing, point the user at
/ga-mcp-full:setup. -
Check auth state:
ga-mcp-full auth statusRelay the output verbatim.
-
Check
.mcp.jsonsanity — staleenvsubstitution entries are the most common load-time failure:cat .mcp.json 2>/dev/null || echo "(no project-scoped .mcp.json in cwd)"Flag any
${GA_MCP_CLIENT_*}entries in theenvblock — those make Claude Code refuse to start the subprocess even though the bundled client would work without them. -
Pick the reconnect path based on findings, and tell the user exactly what to do:
Symptom Reconnect path auth statusreportsAuthenticated: noorToken expired: trueRun /ga-mcp-full:auth-login. No process restart needed —auth.pyreloads credentials from disk on the next tool call.auth statusreports stale account /email: <unknown …>Run /ga-mcp-full:auth-loginto upgrade the cached token to the v0.4.0 scope set (adds openid/email)./plugindetail view shows "Missing environment variables: GA_MCP_CLIENT_ID…".mcp.jsondeclares required env vars it shouldn't. Fix by removing theenvblock (bundled client is the default). Then restart Claude Code — plugin config is only re-read on session start.MCP subprocess crashed mid-session / claude mcp listshows it as✗ Failed to connectOpen the /mcpdialog; stdio servers are restarted by toggling the server off and on there. If that fails, restart Claude Code.Everything looks healthy but tool calls still 401 Run /ga-mcp-full:auth-logoutthen/ga-mcp-full:auth-login— clears the cached refresh token and forces a fresh consent. -
Do not attempt to restart the stdio subprocess yourself — there is no CLI or API for a plugin to force-restart its own MCP server from inside a Claude Code session. The restart paths above (in-session
/mcptoggle, or Claude Code restart) are the only sanctioned options.
Notes
- Most "reconnect" needs after a fresh
ga-mcp-full auth loginare actually zero-restart:get_credentials()re-reads~/.config/ga-mcp/credentials.jsonon each tool invocation, so the next call picks up new auth automatically. - If the user is on a version older than v0.4.0, cached tokens lack the openid/email scopes and
whoamiwill returnemail: None. This is a soft degradation, not a failure — no reconnect needed unless they want the email lookup working.