Skip to content

Dynamic Client Registration with 3rd party Auth providers (e.g. Okta) #571

Closed

Description

@KKonstantinov

Describe the bug
Whenever using the MCP inspector to test an OAuth 2.0 flow, a several issues become evident:

  • Dynamic Client registration is enforced in the inspector (can see issue Dynamic client registration should be optional #167 and the PR raised against it already). Private enterprises will not want to expose DCR in all cases, but rather work with clients already registered in another way. (e.g. via API gateways that already handle client registration is one way, and of course it'll vary per organisation)
  • Even with Dynamic Client registration, the inspector sending a request to a 3rd party authorization server (example: Okta) on its DCR endpoint (https://developer.okta.com/docs/api/openapi/okta-oauth/oauth/tag/Client/) will lead to a CORS error. However, testing with something like Claude for example - the DCR request is sent successfully with no CORS errors.

To Reproduce
Steps to reproduce the behavior:

  1. Start the guided OAuth2.0 flow
  2. Have your .well-known/oauth-authorization-server point to a 3rd party auth server (e.g. Okta/Auth0)

Expected behavior
No CORS error.

Logs

Image Image

Activity

  1. symdeb commented on Jul 3, 2025

    @symdeb

    Perhaps related to the another issue reported that MCP inspector sends an empty body in the client registration request ? it gives the same error with my own Oauth2 authentication server.

  2. dr3s commented on Jul 25, 2025

    @dr3s
    Contributor

    I think the issue is that inspector is performing auth as an SPA instead of a backend web api like Claude and others. The latter don't require CORS

  3. added
    authIssues and PRs related to authorization
    on Aug 3, 2025
  4. olaservo commented on Oct 13, 2025

    @olaservo
    Member

    There's been a few updates related to the issues mentioned here since it was last opened - @KKonstantinov @cliffhall do you think we can close this now? Thanks!

  5. cliffhall commented on Oct 18, 2025

    @cliffhall
    Member

    There's been a few updates related to the issues mentioned here since it was last opened - @KKonstantinov @cliffhall do you think we can close this now? Thanks!

    You can supply the Client ID and Client Secret in the sidebar.
    Image

    However, it is a good point that the /token endpoint of the AS may not have CORS open to all origins.

    We have a another similar complaint which suggests using the proxy for the auth flow. This would require what I believe would be a significant refactor, but it does make sense.

    For the ins and outs of what a refactor might require, I suggest we take up the discussion in Discord.

  6. ov-developer commented on Oct 19, 2025

    @ov-developer

    @cliffhall Maybe adding a if (connectionType === "proxy") ... else ... in handleAuthError would already be enough. In case of using the proxy it would call a single oauth endpoint in the proxy, do all the metadata discovery and oauth flow and respond with the access and refresh tokens. For the "OAuth Flow Progress" it is a different story, but it might be enough to just output a warning that no proxy is being used and thus CORS policy applies. Currently it just fails with "Failed to discover OAuth metadata".

  7. added
    v2Issues and PRs for v2
    and removed
    waiting on submitterWaiting for the submitter to provide more info
    on Nov 11, 2025
  8. cliffhall commented on Aug 1, 2026

    @cliffhall
    Member

    Triage: Priority = High

    Scored 9/16 with the priority rubric added to AGENTS.md in #1891, as part of the backlog triage in #1872. Added to project board #28 with Status Incoming — meaning filed and scored but not yet approved for work. A maintainer decides whether it moves to Todo.

    Axis Score Reasoning
    Severity / impact 4/5 Enterprise OAuth testing is unusable: DCR is effectively mandatory, and pointing it at a third-party AS such as Okta fails on CORS. There is no in-product path for an org that registers clients out of band.
    Urgency / staleness 3/5 Open since June 2025, last touched November — stale, and nothing has changed the underlying constraint.
    Signal bonuses +2 bug label (+1), high engagement (5 comments, 8 reactions) (+1)
    Total 9 Lands in the High band (9-11).

    Related issues. These look connected and may be worth reading together:

    Scores are a starting point, not a verdict — the rubric is meant to be overruled when it's plainly wrong, provided the reason is written down.

  9. symdeb commented on Aug 3, 2026

    @symdeb

    My particular issue with CORS were resolved updating to a new version of PHP (From 7 to 8 I believe) and make the related changes for header in php code for the response itself. The OAUTH2 server with DCR and the well-known endpoints now work fine (on a localhost). With PHP 7 even adding the related headers sin .htaccess could not fix the issue.

  10. modified the milestone: v2.3.0 on Aug 5, 2026
  11. added
    closed-v1-deprecatedClosed: v1 is deprecated and accepting security fixes only
    and removed
    v2Issues and PRs for v2
    on Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authIssues and PRs related to authorizationbugSomething isn't workingclosed-v1-deprecatedClosed: v1 is deprecated and accepting security fixes onlyv1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions