Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
I ran into an issue where failed MCP OAuth/auth attempts caused a lot of repeated MCP reinitialization and extension-host activity.
To be clear: my actual infinite reload loop was caused by a third-party extension, not Cursor. That part is solved. But while debugging it, I noticed that Cursor seemed to keep retrying failed Cloudflare MCP OAuth/auth flows very aggressively.
The Cloudflare MCP plugin had several servers configured. One worked, but the others were failing with 401 invalid_token or fetch timeouts. Each failed attempt seemed to trigger mcp_providers_changed, which then caused MCP to reinitialize again. This created a lot of log noise and made the original issue much harder to debug.
The main problem is not that OAuth failed. That can happen. The problem is that Cursor appeared to keep treating the same failed auth state as something that required repeated provider changes/reinitialization instead of backing off and showing a stable “authentication required” state.
Steps to Reproduce
How to reproduce:
- Enable the Cloudflare MCP plugin in Cursor.
- Configure Cloudflare MCP servers that require OAuth, for example:
- cloudflare-bindings
- cloudflare-builds
- cloudflare-observability
- Do not complete the OAuth flow, or use an expired/invalid token.
- Restart Cursor.
- Check the logs.
Now you should see repeated auth/fetch failures like:
- 401 invalid_token
- fetch failed
- timeout errors
In my case, these failures were followed by repeated mcp_providers_changed events and MCP reinitialization behavior.
Expected Behavior
If an MCP server repeatedly fails because OAuth is missing, expired, invalid, or times out, Cursor should stop retrying aggressively.
I would expect Cursor to:
- apply exponential backoff after repeated OAuth failures
- avoid firing mcp_providers_changed when the MCP config did not actually change
- avoid reinitializing unrelated extension hosts because of the same failed auth state
- show a clear “authentication required” or “OAuth failed” state in the MCP settings UI
- provide a manual “Retry OAuth” button instead of repeatedly retrying in the background
- avoid creating lots of stale OAuth attempt files
Operating System
MacOS
Version Information
Cursor IDE v3.10.20 stable
Does this stop you from using Cursor
No - Cursor works, but with this issue