Skip to content

Static OAuth - Connect To Server shown for MCP servers in Requires OAuth Config status, leading to 400 errors.” #5689

@sangee2004

Description

@sangee2004

Describe the bug
For remote MCP servers created with Static Auth enabled but without Static OAuth credentials configured (status: Requires OAuth Config), the UI incorrectly shows a Connect To Server option in the MCP server detail view (both from the MCP Servers page and from Chat → Add MCP Server). When clicked, it returns a 400 error indicating that an administrator must configure an OAuth client. Expected behavior is that users should not be offered the Connect option until OAuth credentials are configured.

To Reproduce
Steps to reproduce the behavior:

  1. Create a remote MCP server with static auth enabled.
  2. Do not configure Static OAuth credentials so that the entry is in Requires OAuth Config status
  3. Go to the MCP Servers page
  4. Select this entry to open the detail view
    Notice that the Connect To Server option is presented.
Image
  1. Click on the Connect To Server option.
    Notice that the user is presented with 400 /mcp-servers: catalog entry requires OAuth configuration by an administrator before it can be used error
Image

Scenario 2:

  1. Create a remote MCP server with static auth enabled.
  2. Do not configure Static OAuth credentials so that the entry is in Requires OAuth Config status
  3. Go to theChat view.
  4. Use the Add MCP Server option
    Notice that the MCP server in Requires OAuth Config status has the connect to server option disabled with Oauth Configuration Required as expected.
Image
  1. Select this MCP server entry.
    Notice that the Connect To Server option is presented.
Image
  1. Click on the Connect To Server option.
    Notice that the user is presented with 400 /mcp-servers: catalog entry requires OAuth configuration by an administrator before it can be used error
Image

Expected behavior
The user should not be presented with the Connect To Server option in the MCP server detail view in either scenario.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    High

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions