For some time now, I’ve been running into a persistent bug: whenever the agent generates SQL code, Cursor automatically redirects me to Settings → Tools & MCP. Once there, I’m unable to return to the code editor — it feels like I’m stuck in a loop.
I don’t have Supabase MCP configured at all. I used to have it enabled, but I removed it after this bug started. Despite that, Cursor still forces me into this behavior every time I work with databases, making the app almost unusable for any database-related tasks.
Steps to Reproduce
Every time I start writing SQL code, the error appears again. This has been happening consistently for at least 2 weeks now. I even stopped working with the database for a while, but the issue still persists.
Expected Behavior
I simply cannot use Cursor anymore, because this bug triggers every single time I try to work with anything database-related.
As soon as I open any file that contains database code (SQL, queries, etc.), I get thrown into the same loop and cannot escape it. Even if I click the Back button, it immediately redirects me back to Settings → Tools & MCP.
This is a known bug caused by MCP server configurations persisting in Cursor’s internal storage even after you remove them from your config files. When the agent generates SQL code, it triggers a check for database-related MCP servers, and the phantom Supabase entry redirects you to settings. The Glass layout’s back-button behavior compounds the issue by not properly returning you to your workspace.
Here’s a workaround:
Fully quit Cursor (Cmd+Q)
Before deleting, back up this file to a safe location (e.g., your Desktop). This file stores your chat/conversation history, workspace state, and extension data. Deleting it will permanently clear all of these, including your previous Composer and Chat sessions:
This clears the internal cache, including the stuck MCP server config. You’ll need to re-add any MCP servers you still want, but the phantom entry causing the redirect loop will be gone. Your code and project files are not affected.
Our team is aware of both the persistence bug and the navigation issue in the agents window. No timeline for a fix yet, but your report (and the video) help us prioritize.