Skip to content

CORS errors when using the "Quick OAuth Flow" auth troubleshooter #817

Closed as not planned

Description

@anthony-c-martin

Inspector Version

0.16.7

Describe the bug

I'm trying to troubleshoot a new remote MCP server, and see this error message:
Image

When I look at the browser logs, I see the following, indicating the web requests aren't actually failing - it's just being blocked by my browser's CORS policy:

Access to fetch at 'https://<redacted>/.well-known/oauth-protected-resource' from origin 'http://localhost:6274' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

To Reproduce
Steps to reproduce the behavior:

  1. Add remote server, click 'Connect'
  2. Click on 'Auth'
  3. Scroll down to 'Quick OAuth Flow'
  4. See error

Expected behavior

  1. The app is able to make requests regardless of CORS policy, or instructions are provided on how to run it in a way to bypass.
  2. The error message is more descriptive of the problem, rather than indicating a generic problem has occurred.

Screenshots
See above

Environment (please complete the following information):

  • OS: macOS (Tahoe 26.0)
  • Browser: Edge

Additional context
N/A

Activity

  1. Xueyao-Huang commented on Sep 25, 2025

    @Xueyao-Huang

    same in 0.16.8

  2. cliffhall commented on Oct 4, 2025

    @cliffhall
    Member

    The app is able to make requests regardless of CORS policy, or instructions are provided on how to run it in a way to bypass.

    @anthony-c-martin when you say "the app" do you mean a browser-based app or an app running as a service? The latter will not have any CORS-related issues, because that is a browser concern.

    Any browser-based app will have a CORS issue connecting to any server that does not allow its origin to connect. It's not up to the Inspector or any browser-based app to set the CORS policy, that's the server's prerogative.

    Have a look at the Everything reference server implementation and how it opens the CORS origin and headers it allows the browser to read.

  3. cliffhall commented on Oct 11, 2025

    @cliffhall
    Member

    Closing this one. It seems as if your .well-known/oauth-protected-resource endpoint needs CORS config to allow all origins. It is a public metadata discovery mechanism.

    Image
  4. anthony-c-martin commented on Oct 12, 2025

    @anthony-c-martin
    Author

    Thanks for the guidance! I'll try out enabling the CORS config for the .well-known/oauth-protected-resource endpoint.

  5. ov-developer commented on Oct 17, 2025

    @ov-developer

    @cliffhall Hi, I'm running into the same problem. CORS policy is blocking the metadata and oauth requests. Would it make sense to use the MCP proxy also for those? From my understanding the whole point of having a proxy is to "circumvent" the CORS policy for development as it is only relevant in browser environment.

  6. cliffhall commented on Oct 18, 2025

    @cliffhall
    Member

    From my understanding the whole point of having a proxy is to "circumvent" the CORS policy for development as it is only relevant in browser environment.

    The original point of the proxy was simply to support STDIO servers. You can't talk to them from a browser, you have to have a proxy.

    I agree that it might be helpful to go through the proxy, and we may look into doing it, but, it would not be a simple change.

  7. sambhav commented on Nov 14, 2025

    @sambhav
    Member

    Happy to implement this change, facing the same issue.

  8. self-assigned this
    on Nov 14, 2025
  9. anthony-c-martin commented on Nov 15, 2025

    @anthony-c-martin
    Author

    Thanks for re-opening! It would definitely be a valuable feature to have.

  10. sdehors-ibm commented on Feb 4, 2026

    @sdehors-ibm

    The browser manages to get the .well-known/oauth-protected-resource as it is allowed through a preflight request but then fails on the token endpoint with a CORS error. Should this token endpoint also allow all origins ? This is also described here : #995

    I can see that it fetches the token fine, but the browser (FF) displays Response body is not available to scripts (Reason: CORS Missing Allow Origin)

  11. cliffhall commented on Aug 1, 2026

    @cliffhall
    Member

    Closing: v1 is deprecated.

    Thank you for reporting this, and apologies for the long wait for a response.

    v1 will receive security fixes only — this issue describes a functionality, compatibility, or usability problem rather than a vulnerability, so it is being closed against v1. This is not a judgment on whether the problem is real — it's a consequence of the v1 line being frozen. This is happening as part of #1872.

    If this still happens in v2, we'd genuinely like to know. v2 is a complete rewrite — three clients over a shared core — so many v1 behaviours no longer exist in the same form. Please open a fresh issue against v2 with steps to reproduce, and we'll look at it. Note that we accept external contributions as issues rather than pull requests; maintainers handle design and implementation through a prompt-driven workflow. See CONTRIBUTING.md.

    Thanks for taking the time to report it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

authIssues and PRs related to authorizationbugSomething isn't workingclosed-v1-deprecatedClosed: v1 is deprecated and accepting security fixes onlyv1waiting on submitterWaiting for the submitter to provide more info

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions