Cursor IDE, mcp oauth redirect stuck

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

We have an MCP which uses oauth, on the /register call cursor sends redirect_uris=[‘Cursor Agent - Turn your ideas into code’, ‘http://localhost:8787/callback’]

We only support the loopback address, but I found no way to make cursor drop the cloud redirect, so whatever we do on the mcp/auth layer, cursor keeps using an invalid redirect.

  1. The only redirect_uri in the response of the /register call is the localhost one, but on the authorize cursor still uses the redirect which is not whitelisted and fails..

  2. Tried to reject the register request if the any of the uri’s present are not valid, but that only moved the error to an earlier stage, cursor does not seem to retry registering without it.

There is a solution, which is more of a hack.. setting an oauth client, skips DCR and the redirect it uses in the /authorize request is the localhost one.

Steps to Reproduce

  1. Cursor IDE
  2. Setup an MCP with DCR oauth, with only loopback domains whitelisted for redirect
  3. Try to authorize
  4. Setup a client-id and it skips DCR and uses the localhost redirect.

Expected Behavior

Not use the cursor cloud redirect from the IDE.
Only use the returned redirect uris from the registration.

Not sure the solution, but setting a fake client-id that skips DCR, just so the redirect that cursor uses is the loopback uri seems wild.

Operating System

MacOS

Version Information

Version: 3.24.18
VS Code Extension API: 1.128.0
Commit: be4c9e5350d77747b42cd467cbd3370a753d4640
Date: 2026-10-13T18:12:58.182Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 42.10.0
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 27.0.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. Everything is laid out really clearly, and that helps a lot.

This is a known issue that we’re already tracking, and I’ve added your case to it. In recent IDE versions, Cursor sends a cursor.com redirect to /authorize even when your server’s /register response only kept the localhost callback. Cursor should really use only the redirect URI that was actually accepted during registration. This shouldn’t happen, and it isn’t caused by anything in your setup.

Your server-side approach of removing the cursor.com callback from the /register response and leaving only the loopback callback, instead of rejecting the whole registration, is the right one. Cursor doesn’t currently retry DCR with a reduced set of URIs, so rejecting /register just moves the error earlier in the flow, like you noticed.

Right now, setting a client ID is a supported workaround, not a hack. If your authorization server has a pre-registered public client with http://localhost:8787/callback as the redirect URI, add it to the server entry in mcp.json:

"auth": { "CLIENT_ID": "your-client-id" }

With a client ID set, Cursor skips dynamic registration and uses the localhost callback directly.

I can’t give an ETA yet, but I’ll reply in the thread when there’s an update.

Hey, following up like I promised: the issue was fixed in Cursor 3.26.13. That’s the current stable version. Your 3.24.18 won’t get this fix, so you’ll need to update.

What changed:

  • The callback on cursor.com is now used only if your server returned it during registration. If the /register response returns only http://localhost:8787/callback, then /authorize will also use the loopback callback. The CLIENT_ID workaround is no longer needed.
  • If the server rejects /register completely, Cursor now retries registration using only the loopback callback.

After updating, try authorizing without CLIENT_ID in mcp.json and let me know if the redirect is still going to the wrong place.