Skip to content

"Connect button" OAuth flow does not honor scopes_supported like Auth Settings does #748

Closed

Description

@kentcdodds

Describe the bug

When clicking the "Connect" button, I get directed to the following URL:

http://localhost:7788/authorize?response_type=code&client_id=Rij0zh4k25bDqoEK&code_challenge=BsNpWG9XLzR5yzX3oUh8gjgO2njve1ZBujPl_u7LxHk&code_challenge_method=S256&redirect_uri=http%3A%2F%2Flocalhost%3A8079%2Foauth%2Fcallback&resource=http%3A%2F%2Flocalhost%3A60079%2Fmcp

When clicking the "Quick Auth Flow" button, I get directed to the following URL:

http://localhost:7788/authorize?response_type=code&client_id=M7zNX0l9922ofiCL&code_challenge=yGWrmL0UFvSYLTgP-gba5aoenaMJmAfXie-3EGMGQh8&code_challenge_method=S256&redirect_uri=http%3A%2F%2Flocalhost%3A8079%2Foauth%2Fcallback%2Fdebug&scope=read+write&resource=http%3A%2F%2Flocalhost%3A60079%2Fmcp

Here's a more clear diff view of those URLs:

http://localhost:7788/authorize?
  response_type=code
  client_id=M7zNX0l9922ofiCL
  code_challenge=yGWrmL0UFvSYLTgP-gba5aoenaMJmAfXie-3EGMGQh8
  code_challenge_method=S256
  redirect_uri=http%3A%2F%2Flocalhost%3A8079%2Foauth%2Fcallback%2Fdebug
+ scope=read+write
  resource=http%3A%2F%2Flocalhost%3A60079%2Fmcp

(note, the client_id, code_challenge, and redirect_uri are also different, but I don't see that as being an issue).

The particular bother for me is the lack of scope when clicking "Connect"

To Reproduce
Steps to reproduce the behavior:

  1. Have an MCP server that includes scope as part of the WWW-Authenticated header, scopes_supported in the resource server metadata (e.g. /.well-known/oauth-protected-resource/mcp), and scopes_supported in the authorization server metadata (e.g. /.well-known/oauth-authorization-server).
  2. Click "Connect" and notice the lack of scope
  3. Click "Quick Auth Flow" (or go through it manually) and notice the presence of scope.

Expected behavior

I expect them to be the same (and prefer them to use the scope specified).

Activity

  1. cliffhall commented on Sep 5, 2025

    @cliffhall
    Member

    @kentcdodds Which version of the Inspector are you using?

  2. kentcdodds commented on Sep 5, 2025

    @kentcdodds
    ContributorAuthor

    The latest at the time of the post. Let me check again with the latest now.

  3. kentcdodds commented on Sep 5, 2025

    @kentcdodds
    ContributorAuthor

    Seems to be working as expected now. Not certain what changed, but I'm good! Thanks!

  4. cliffhall commented on Sep 5, 2025

    @cliffhall
    Member

    Seems to be working as expected now. Not certain what changed, but I'm good! Thanks!

    @kentcdodds I did a bunch of work on that for 0.16.5, and I thought that it might have addressed it, but I just wanted to be sure. Thanks for retesting and confirming it's good.

  5. kentcdodds commented on Sep 5, 2025

    @kentcdodds
    ContributorAuthor

    Thanks!

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 working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions