MCP OAuth callback fails (Cursor)
- Redirect rejected
Check the callback allowed by the identity provider.
- Address unreachable
Check the addresses reachable from your computer.
- App does not open
Check the callback’s desktop application handler.
You can match the symptom to the relevant sign-in correction.
Next: MCP setup
If Cursor fails to complete OAuth when connecting to IdentityScribe’s MCP channel, the problem is usually one of three: redirect URI mismatch, localhost vs remote Scribe, or the callback never launching Cursor. Each one breaks a different step of the sign-in:
Redirect URI mismatch
Section titled “Redirect URI mismatch”Symptom: IdP returns “invalid redirect URI” or “redirect_uri_mismatch” after you sign in.
Cause: Your IdP must allow Cursor’s OAuth callback URI. Cursor uses a custom scheme for callbacks (e.g. cursor:// or similar). The exact URI depends on your Cursor version and configuration.
Steps:
- In your IdP’s OAuth client settings, add Cursor’s callback URI. Check Cursor’s docs or MCP auth UI for the exact value — it typically looks like
cursor://anysphere.cursor-deeplink/oauth/callbackor a variant. - Ensure no trailing slash, exact case, and no extra query params unless your client requires them.
- For public clients (no secret), confirm the client is configured as “public” if Cursor uses PKCE.
Localhost vs remote Scribe
Section titled “Localhost vs remote Scribe”Symptom: OAuth discovery or token requests fail; IdP shows wrong redirect or “connection refused.”
Cause: Cursor learns where to sign in from Scribe. Scribe’s metadata names the identity provider’s issuer, and the provider’s own discovery document lists its sign-in and token addresses. If one of these addresses only works inside the server’s network, such as localhost or an internal host name, Cursor on your machine cannot use it.
Steps:
- In your MCP config, use the URL you reach Scribe at:
http://localhost:8080/mcponly when Scribe runs on your machine. - If clients reach Scribe through a reverse proxy or load balancer, set
auth.resource-metadata-originto Scribe’s public origin (e.g.https://scribe.example.com) so sign-in challenges point to the right metadata address. - If Scribe reaches the identity provider at an internal address, set
auth.providers.<name>.public-issuerto the provider’s externally reachable issuer URL (e.g.https://auth.example.com/application/o/scribe/). It is the provider’s address, not Scribe’s, and replaces only the issuer that clients see. - The sign-in and token addresses come from the provider unchanged. If they name an internal host, set the provider’s public URL in the provider itself.
- Ensure your IdP’s OAuth client has the correct redirect URI for the Cursor you use.
Callback never launches Cursor
Section titled “Callback never launches Cursor”Symptom: Browser completes IdP sign-in, but Cursor doesn’t open or reconnect; no error in Cursor.
Cause: The cursor:// deeplink may not be handled, or the browser blocks custom-scheme redirects.
Steps:
- Confirm Cursor is installed and running before starting the OAuth flow.
- Try the flow in a different browser — some block or prompt for custom-scheme links.
- On macOS, ensure Cursor is set as the handler for
cursor://(System Settings → Apps → Default apps for URLs, or reinstall Cursor). - If using a reverse proxy, ensure it does not rewrite or strip the redirect URL.
Fallback: use Basic auth
Section titled “Fallback: use Basic auth”If OAuth keeps failing, you can bypass it temporarily using ROPC, LDAP bind, or a configured local account. Configure auth.methods to include the selected method, then use username:password in your MCP client. This is less secure than OAuth — use only for local or low-risk environments.
Related
Section titled “Related”- MCP Channel — Setup and authentication
- Authentication — Bearer, ROPC, LDAP, local accounts
- Auth configuration reference —
public-issuerand OAuth settings