[Bug] MCP Server stuck in infinite "Invalid URL protocol" retry loop despite removing all configs

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

Environment:
macOS, Cursor (Latest version)

Steps to Reproduce:

Added an MCP server (Figma Plugin / Custom SSE) but mistakenly entered a URL without the https:// protocol.

The UI threw an Invalid URL protocol error.

Attempted to fix it by: Uninstalling the plugin, deleting the custom MCP from the UI, completely clearing /.cursor/mcp.json, and clearing the global mcp.json (~/Library/Application Support/Cursor/User/globalStorage/pro.antelope.cursor/mcp.json).

Force-quit Cursor (Cmd+Q), killed all related background processes, and restarted the Mac.

Expected Behavior:
Cursor should drop the invalid MCP connection attempt since all configuration files and UI toggles have been cleared and disabled.

Actual Behavior:
Cursor permanently caches the initial invalid URL state in a deeper internal database (likely IndexedDB or workspace storage). Upon restarting, it ignores the empty JSON files and indefinitely retries connecting to the phantom URL, falling back between streamableHttp and SSE, completely locking up the MCP process and spamming the output logs.

Logs:

Plaintext
[info] Creating streamableHttp transport
[error] Client error for command Invalid URL protocol: the URL must start with http: or https:.
[warning] Error connecting to streamableHttp server, falling back to SSE…
[error] Client error for command SSE error: Invalid URL protocol…
[info] Server not yet created, returning empty offerings
(Repeats infinitely every few seconds)

Steps to Reproduce

  1. Add an MCP server (Figma Plugin or Custom SSE) in Cursor Settings, but intentionally enter a URL without the http:// or https:// protocol prefix.
  2. Observe the initial Invalid URL protocol error in the MCP logs.
  3. Attempt to fix the issue by completely removing the faulty MCP server: uninstall the Figma plugin, delete the custom server from the UI, and clear all contents inside both the project-level .cursor/mcp.json and the global mcp.json (at ~/Library/Application Support/Cursor/User/globalStorage/pro.antelope.cursor/mcp.json).
  4. Force quit Cursor (Cmd+Q) and restart the application (or even restart the Mac).
  5. Open the MCP logs again. Observe that Cursor completely ignores the empty JSON files and remains stuck in an infinite retry loop, constantly trying to connect to the deleted/invalid URL and spamming the Invalid URL protocol error every few seconds.

Operating System

MacOS

Version Information

Version: 2.6.21
VSCode Version: 1.105.1
Commit: fea2f546c979a0a4ad1deab23552a43568807590
Date: 2026-03-21T22:09:10.098Z
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report. This is a real bug. When MCP servers are removed from mcp.json, the config stays cached in internal storage globalState, and Cursor keeps trying to connect.

Here’s a workaround that should help:

  1. Fully quit Cursor Cmd+Q
  2. Delete this file and make a backup first
    ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb
    
  3. Launch Cursor again

This will clear the internal cache, including the stuck MCP server config.

I’ve shared this with the team. There’s no timeline for a fix yet, but your report helps us prioritize it. Let me know if the workaround helped.

Sama seperti keluhan saya

same issue , still can’t work , I can’t start work with cursor….
2026-04-08 20:57:57.623 [info] [V2] Handling CreateClient action

2026-04-08 20:57:57.623 [info] [V2 FSM] connection:connect_start: conn=idle,auth=unknown → conn=connecting,auth=unknown

2026-04-08 20:57:57.623 [warning] Transient error connecting to streamableHttp server: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-08 20:57:57.623 [warning] Connection failed: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-08 20:57:57.623 [warning] [V2 FSM] connection:connect_failure: conn=connecting,auth=unknown → conn=failed,auth=unknown

2026-04-08 20:57:57.623 [info] CreateClient completed, connected: false, statusType: error

2026-04-08 20:58:32.673 [info] [V2] Handling DeleteClient action, reason: server_disabled

2026-04-08 20:58:33.606 [info] [V2] Handling CreateClient action

2026-04-08 20:58:33.606 [info] [V2 FSM] connection:connect_start: conn=idle,auth=unknown → conn=connecting,auth=unknown

2026-04-08 20:58:33.623 [warning] Transient error connecting to streamableHttp server: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-08 20:58:33.624 [warning] Connection failed: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-08 20:58:33.624 [warning] [V2 FSM] connection:connect_failure: conn=connecting,auth=unknown → conn=failed,auth=unknown

2026-04-08 20:58:33.624 [info] CreateClient completed, connected: false, statusType: error

2026-04-08 20:58:36.471 [info] [V2] Handling DeleteClient action, reason: server_disabled

2026-04-08 20:58:37.420 [info] [V2] Handling CreateClient action

2026-04-08 20:58:37.420 [info] [V2 FSM] connection:connect_start: conn=idle,auth=unknown → conn=connecting,auth=unknown

2026-04-08 20:58:37.439 [warning] Transient error connecting to streamableHttp server: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-08 20:58:37.441 [warning] Connection failed: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-08 20:58:37.441 [warning] [V2 FSM] connection:connect_failure: conn=connecting,auth=unknown → conn=failed,auth=unknown

2026-04-08 20:58:37.441 [info] CreateClient completed, connected: false, statusType: error

2026-04-08 20:59:01.959 [info] [V2] Handling CreateClient action

2026-04-08 20:59:01.959 [info] [V2 FSM] connection:connect_start: conn=idle,auth=unknown → conn=connecting,auth=unknown

2026-04-08 20:59:01.981 [warning] Transient error connecting to streamableHttp server: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-08 20:59:01.988 [warning] Connection failed: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-08 20:59:01.988 [warning] [V2 FSM] connection:connect_failure: conn=connecting,auth=unknown → conn=failed,auth=unknown

2026-04-08 20:59:01.988 [info] CreateClient completed, connected: false, statusType: error

Hey, based on the logs, it looks like the same issue described in the thread. There’s already a workaround above, but I’ll repeat it here:

  1. Fully close Cursor
  2. Delete the internal cache file, and make a backup first just in case:
    • macOS: ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb
    • Windows: %APPDATA%\Cursor\User\globalStorage\state.vscdb
    • Linux: ~/.config/Cursor/User/globalStorage/state.vscdb
  3. Start Cursor again

This will reset the cached MCP server config that got stuck in a retry loop. The team is aware of the issue, there’s no ETA yet, but reports like this help with prioritization.

Let me know if it worked or not.

thanks for quick reply, I have deleted the cache , and restart the cursor. this time the error output turn out to be this :slight_smile:

[info] Creating streamableHttp transport

2026-04-09 00:36:28.147 [info] Server creation in progress, waiting for completion

2026-04-09 00:36:32.511 [info] Connecting to streamableHttp server

2026-04-09 00:36:38.131 [warning] Pending server creation failed: Aborted

2026-04-09 00:36:38.136 [info] Server creation in progress, waiting for completion

2026-04-09 00:36:48.137 [warning] Pending server creation failed: Aborted

2026-04-09 00:36:50.954 [error] Client error for command Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-09 00:36:50.954 [warning] [V1] initializing → error: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-09 00:36:50.955 [info] Client closed for command

2026-04-09 00:36:50.956 [warning] Error connecting to streamableHttp server, falling back to SSE: Invalid URL protocol: the URL must start with `http:` or `https:`.

2026-04-09 00:36:50.956 [info] Connecting to SSE server

2026-04-09 00:36:52.200 [info] Server creation in progress, waiting for completion

2026-04-09 00:37:01.025 [info] SSE transport error, SDK will reconnect automatically: SSE error: TypeError: fetch failed: Connect Timeout Error (attempted addresses: 3.175.207.119:443, 3.175.207.27:443, 3.175.207.41:443, 3.175.207.49:443, timeout: 10000ms)

2026-04-09 00:37:01.025 [error] Error connecting to SSE server after fallback: SSE error: TypeError: fetch failed: Connect Timeout Error (attempted addresses: 3.175.207.119:443, 3.175.207.27:443, 3.175.207.41:443, 3.175.207.49:443, timeout: 10000ms) SSE error: TypeError: fetch failed: Connect Timeout Error (attempted addresses: 3.175.207.119:443, 3.175.207.27:443, 3.175.207.41:443, 3.175.207.49:443, timeout: 10000ms)

2026-04-09 00:37:01.025 [info] Client closed for command

2026-04-09 00:37:01.026 [warning] Pending server creation failed: SSE error: TypeError: fetch failed: Connect Timeout Error (attempted addresses: 3.175.207.119:443, 3.175.207.27:443, 3.175.207.41:443, 3.175.207.49:443, timeout: 10000ms)

2026-04-09 00:37:01.053 [info] Server not yet created, returning empty offerings

Hey, I can see in the logs that after clearing the cache, the “Invalid URL protocol” error is still showing up. That means the config is being recreated from another source. Also, there are now Connect Timeout errors on the SSE fallback.

A couple questions:

  1. In your mcp.json (project or global), do you still have the Figma MCP set as "url": "https://mcp.figma.com/mcp"? If yes, this is a known issue with remote MCP servers in Cursor 3.x where OAuth discovery builds an incorrect internal URL.

  2. What Cursor version are you on right now? In another thread I see 3.0.12.

If you still need Figma MCP, the best workaround right now is to use the local version instead of the remote URL. I already wrote more details in your other thread Failed to set up figma remote mcp server in cursor - #4 by deanrie, but I’ll paste it here too:

{
  "mcpServers": {
    "Figma": {
      "command": "npx",
      "args": ["-y", "figma-developer-mcp", "--stdio"],
      "env": {
        "FIGMA_API_KEY": "your-figma-api-key"
      }
    }
  }
}

You can generate an API key in Figma: Settings > Security > Personal access tokens.

The team is aware of the issue. There’s no ETA yet, but reports help prioritize it. Let me know if the local setup worked for you.