[FEATURE] Feature request: lazy/on-demand OAuth re-auth for MCP servers (4 related issues closed/locked)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
This is a re-file of #66737, #62518, #68697, and #59531, all of which were closed (as duplicate/stale/completed) and are now locked, so no further feedback or activity can be added to them.
The underlying request is still unresolved: MCP servers configured with OAuth (including local stdio servers, e.g. a Home Assistant connector reached via a Nabu Casa webhook) trigger a re-authentication prompt on every session start, including sessions where the server isn't used at all, and this can repeat multiple times within a single session as the token expires.
Proposed Solution
Proposed solutions (carried over from #66737, still applicable): a settings.json option to suppress the startup "needs authentication" notice while keeping on-demand auth via /mcp fully functional; a lazy-auth mode that doesn't probe/flag OAuth servers at startup and prompts only when a tool from that server is first invoked; or silent token refresh where a refresh token exists, so normal expiry never surfaces as "needs authentication".
Alternative Solutions
Disabling the server entirely (disabledMcpServers via /mcp) removes its tools until manually re-enabled and is per-project, so it isn't a real workaround for an account-level or frequently-used connector.
Priority
Medium - Would be very helpful
Feature Category
MCP server integration
Use Case Example
I have a local MCP server (Home Assistant, reached via a Nabu Casa webhook, stdio transport) configured in Claude Desktop. Every time I start a plain chat session, I'm prompted to log in again even if I have no intention of using Home Assistant in that session, and this can happen more than once per session as the token lapses. There is currently no way to keep the server available but authenticate lazily, only on first actual tool use.
Additional Context
Related, now-locked threads: #66737, #62518, #68697, #59531. Also related but not locked: #65469 (batch manual reauthentication). Please consider reopening this as an active feature request rather than tracking it across several separate, now-inaccessible threads.