[BUG] All claude.ai built-in MCP servers disappear on every restart — require /login each session

Resolved 💬 3 comments Opened May 7, 2026 by Pixy Closed May 7, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Every time Claude Code restarts, all claude.ai built-in MCP servers are gone from the \/mcp\ dialog. They only come back after running \/login\, but disappear again as soon as Claude Code is closed and reopened — even seconds later.

This affects all claude.ai MCP servers simultaneously (Notion, Atlassian, Slack, Google Drive, Google Calendar, HubSpot, Sentry, Miro, Figma, etc.).

As an additional symptom of the same root cause, the default model also resets to Sonnet on every restart, even when Opus was set during the previous session.

Environment

  • OS: macOS 25.4.0 (Darwin)
  • Claude Code version: 2.1.132
  • Auth method: oauth_token (firstParty)
  • Install method: CLI

Steps to Reproduce

  1. Open Claude Code, run /login to authenticate
  2. Run /mcp — all claude.ai MCP servers are visible and connected
  3. Quit Claude Code completely
  4. Reopen Claude Code (even immediately, seconds later)
  5. Run /mcp — only local/plugin MCPs are shown, all claude.ai servers are gone

Expected Behavior

claude.ai MCP servers should persist across sessions without requiring /login on every restart. The OAuth token/session should be reused or refreshed automatically.

Actual Behavior

/mcp only shows local MCPs and built-in plugins after restart. The full list of claude.ai servers only reappears after running /login again.

# After restart — only 3 servers visible:
Local MCPs: datadog-mcp (needs auth)
Built-in:   context7 (connected), github (failed)

# After /login — all servers restored:
claude.ai Notion ✓, claude.ai Atlassian ✓, claude.ai Google Drive ✓,
claude.ai Google Calendar ✓, claude.ai Slack ✗, claude.ai HubSpot ✗ ...

Diagnostics

  • claude auth statusloggedIn: true even when MCPs are missing — the basic auth token is present, but the cloud MCP session is not
  • ~/.claude/mcp-needs-auth-cache.json only contains datadog-mcp (a local HTTP MCP), no claude.ai entries
  • No mcp-oauth-tokens file exists on disk — tokens appear to be in-memory only
  • claudeAiMcpEverConnected in ~/.claude.json correctly lists previously connected servers (Notion, Atlassian, Google Drive, Google Calendar, Miro), confirming they were connected but not persisted
  • macOS Keychain has a Claude Code-credentials entry, but the cloud MCP session is not persisted there

Related Issues

  • #47372 — Slack plugin OAuth not persisted (same root cause, scoped to one plugin)
  • #52565 — Custom MCP connector tokens not persisted on Windows
  • #26281 — MCP OAuth tokens without expires_in and refresh_token silently expires

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗