-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Executive Summary
Critical Issue: Claude.ai web UI has a broken disconnect/reconnect flow for MCP servers that permanently prevents reauthentication, while mobile works perfectly with identical server implementation.
Impact: Users cannot recover from authentication issues on web platforms - they become permanently locked out of MCP services.
Issue Classification
- Severity: High (permanent service unavailability)
- Platform: Web UI only (desktop app + browser)
- Component: MCP authentication state management
- Type: Client-side regression/bug
Reproduction Steps
Working Flow (Mobile Claude.ai ✅)
- Connect to MCP server → Success
- Disconnect service → Actually disconnects with visual feedback
- Attempt reconnect → Properly initiates OAuth flow
- Complete authentication → Back to working state
Broken Flow (Web UI ❌)
- Connect to MCP server → Success (initial connection works)
- Try to disconnect/remove service → No visual feedback, unclear if action processed
- Attempt to reconnect → Gets 401 responses but OAuth flow never starts
- Result: Permanently stuck, cannot reauthenticate
Technical Analysis
Server Implementation (Confirmed Working)
- ✅ RFC-compliant 401 responses with proper WWW-Authenticate headers
- ✅ Valid OAuth 2.1 + PKCE implementation
- ✅ Correct OAuth metadata endpoints
- ✅ Same server works perfectly on mobile (proves server implementation is correct)
Client-Side Hypothesis
The web UI appears to have a state management bug where:
- Disconnect action doesn't properly clear authentication state
- Subsequent 401 responses don't trigger OAuth initiation
- Client remains in a "half-connected" state that blocks reauthentication
Evidence Supporting Web UI Bug
Platform | Initial Connect | Disconnect | Reconnect | OAuth Flow -- | -- | -- | -- | -- Mobile | ✅ Works | ✅ Works | ✅ Works | ✅ Triggers Web UI | ✅ Works | ❌ Silent failure | ❌ Fails | ❌ Never triggers
Key Evidence: Identical server behavior produces different client results across platforms.
Root Cause Analysis
Likely Web UI Issues:
- Incomplete state reset during disconnect operation
- Missing OAuth trigger logic when receiving 401 after failed disconnect
- Client-side authentication cache not being cleared
- Event handler registration issues preventing proper reconnection flow
Not Server Issues:
- Mobile success proves server OAuth implementation is correct
- Same 401 responses handled differently by different clients
- Server-side logs likely show proper authentication challenges being sent
Immediate Impact
- User Experience: Permanent lockout from MCP services on primary web platform
- Developer Impact: Users blame MCP server developers for client-side bugs
- Adoption Risk: Hesitancy to use MCP services due to unreliable connection management
Requested Actions
For Anthropic Engineering Team:
- Investigate web UI disconnect/remove functionality - appears to be silently failing
- Review OAuth flow initiation logic in web UI after 401 responses
- Compare authentication state management between mobile and web implementations
- Add proper visual feedback for disconnect operations
- Implement state cleanup to ensure reauthentication is possible
For MCP Server Developers (Interim):
- Document the web UI limitation in user guides
- Recommend mobile app usage for connections requiring frequent reconnection
- Consider implementing connection health checks to detect stuck states
- Provide clear troubleshooting steps for affected users
Testing Recommendations
To Reproduce:
- Set up any MCP server with OAuth authentication
- Connect via Claude.ai web UI
- Attempt to disconnect/remove the service
- Try to reconnect
- Observe: No OAuth flow initiated, permanent 401 responses
To Verify Fix:
- Ensure disconnect provides visual feedback
- Confirm authentication state is properly cleared
- Verify 401 responses trigger OAuth flow initiation
- Test complete reconnection cycle works
Workaround for Users
Current Solution: Use Claude.ai mobile app for any MCP connections that might need to be disconnected and reconnected.
Why This Works: Mobile client properly handles authentication state management and OAuth flow initiation.
Priority Justification
This issue should be high priority because:
- It affects the primary user platform (web)
- It creates permanent service unavailability (not recoverable)
- It impacts MCP ecosystem adoption
- The fix likely involves client-side state management (contained scope)
Contact Information
For technical follow-up regarding server-side implementation details or additional testing, please contact the MCP server development team.