[BUG] claude.ai MCP integrations (Gmail, Google Calendar) not available in -p mode or --resume sessions since v2.1.79
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Cloud-managed claude.ai MCP integrations (Gmail, Google Calendar) are no longer available as tools when running
Claude Code in non-interactive mode (-p, --print, or --resume sessions). They work correctly in interactive
mode.
claude mcp list shows them as connected, and they execute successfully in interactive mode, but claude -p
cannot see or use them. Other OAuth-based MCPs added via plugins (Notion, Supabase) work fine in both modes —
the only difference is that plugin MCPs have local config in the plugin cache, while claude.ai MCPs are purely
cloud-managed with no local config file.
What Should Happen?
claude.ai MCP tools should be available in -p / non-interactive mode, just as they are in interactive mode, and
just as plugin MCPs (Notion, Supabase) are.
Error Messages/Logs
No error — the tools simply don't appear. Claude reports "I don't have any Gmail tools available" when asked in
-p mode, while the same query in interactive mode returns and executes the tools successfully.
Steps to Reproduce
- Have claude.ai Gmail and/or Google Calendar MCPs connected (visible and working in /mcp in interactive mode)
- Verify they work interactively: open claude, ask to list calendar events — works fine
- Run: claude -p "Do you have access to Gmail tools? List any mcp tools with gmail in the name."
- Claude reports no Gmail tools available
- Compare with plugin MCPs: claude -p "list your Notion tools" — these appear correctly
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Not sure of the exact version — it was working before v2.1.79 was installed on March 19, 2026.
Claude Code Version
2.1.79
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
13 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Not a duplicate, the referenced issues are older, and the previous version (2.1.78) which is from after those issues, had this working. The problem started with 2.1.79 -> i downgraded to 2.1.78 and confirmed it works
+1 for this, it's a regression
frustrating regression :+1:
I am also seeing this
Confirming I also see this regression. The workflow I describe below worked prior to 2.1.79; I'm on 2.1.81 now.
My logs show
claude -pactually connects to the MCP servers. But there's a race condition or timing issue: the prompt executes _before_ MCP servers can connect successfully.I had Opus analyze debug logs for a
claude -pprompt which interacts with Linear, and it reports this:Could be a server latency issue on the Anthropic or Linear end, or could be non-determinism in Opus's response to a failed tool call (API call isn't retried if a connection fails?), or something else altogether.
But the server connections _seem_ to be there, they're just too late for purposes of
claude -p.Right, this is a blocker!
https://github.com/anthropics/claude-code/issues/37121
Root Cause Confirmed (v2.1.81 binary reverse-engineering)
I spent a day tracing this through the compiled binary. Here is the exact code path:
The Two-Phase MCP Initialization
The
isPrintModeternary on Phase 2 unconditionally skips cloud MCP connection. The server list is fetched (visible inDEBUG=*logs as a request to/v1/mcp_servers?limit=1000), but the individual server connections are never established.Verification
security find-generic-passwordworks from LaunchAgent context ✓claude -pfrom terminal also shows 0 cloud MCP tools — it's not a daemon/keychain issue@guibonaccorsi's regression note
If this worked in v2.1.78, the
isPrintModegate on Phase 2 was likely added in v2.1.79. Possibly intentional (startup speed optimization?) but it breaks all non-interactive use cases.Workaround
Configure cloud MCP servers as local stdio servers in
.mcp.jsonusingmcp-remote:This works for servers without OAuth (Context7). For OAuth-protected servers (Jira, Slack, Notion, Gmail, Calendar),
mcp-remoterequires individual OAuth flows per server.Suggested Fix
Remove the
-pgate on Phase 2, or add an opt-in flag:Same issue with
claude.ai SlackMCP.Debug logs confirm the server connects successfully but tools are not registered as deferred tools:
44 deferred tools exist (non-MCP ones), but none of the claude.ai MCP tools are among them.
Repro:
Claude Code version: latest (as of 2026-03-25)
Platform: macOS (Apple Silicon)
This is a big problem 😱
Confirmed on our end as well. We run an automated meeting-minutes pipeline (
claude -p --output-format stream-json) that relies on theclaude_ai_bear(Bear Notes) MCP server for reading and writing notes.-pmodeclaude -preports zeromcp__claude_ai_bear__*toolsnpm install -g @anthropic-ai/claude-code@2.1.78)This is a blocker for any non-interactive automation that depends on claude.ai MCP connectors. We process ~8 meetings/day through this pipeline and cannot upgrade past 2.1.78.
Separately, even on 2.1.78 we hit a related but distinct issue where the MCP proxy (
mcp-proxy.anthropic.com) silently drops individual tool results — filed as #38437.This appears to be resolved in v2.1.84. Cloud MCP servers (Gmail, Calendar, Slack, Atlassian, Figma, Supabase) all load correctly in -p mode now.
I run a headless morning briefing via launchd that creates a Gmail draft using claude -p — it's been broken since 2.1.79 and started working again today on 2.1.84.
Tested with: claude -p "List MCP tools starting with mcp__claude_ai" --allowedTools "mcp__claude_ai_Gmail__gmail_search_messages"
All cloud MCP tools returned consistently across multiple runs.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.