Feature Request: Automatic MCP reconnection on auth token expiry
Problem
HTTP MCP servers commonly use short-lived auth tokens (e.g. 1-hour TTL) via headersHelper. When a token expires mid-session, all MCP tool calls silently fail until the user manually runs /mcp to reconnect — which re-executes headersHelper and obtains a fresh token.
Requested Behavior
When an HTTP MCP server returns a 401/403, Claude Code should automatically reconnect (re-executing headersHelper) and retry the failed request, without requiring manual intervention.
Why This Matters
Long-running Claude Code sessions are a common use case, but short-lived auth tokens make them fragile. The current workaround — a local proxy to handle token refresh — is significant overhead for what could be a built-in reconnect-on-auth-failure behavior.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗