Infinite loop to MCP Settings when working with Database

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.4.1
VSCode Version: 1.105.1
Commit: 2a298dd06944a9b9ea541d28225b779fcbcc6200
Date: 2026-05-08T16:05:07.818Z
Layout: glass
Build Type: Stable
Release Track: Nightly
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

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:

  1. Fully quit Cursor (Cmd+Q)

  2. 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:

    ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb
    

    Once backed up, delete the original file

  3. Relaunch Cursor

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.

Let me know if the workaround resolves it!