Skip to content

feat: support manual entry of OAuth client information #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xiaoyijun
Copy link

Add support for manually entering OAuth client information in the UI

Motivation and Context

This PR addresses issue #167 where users encounter errors when connecting to MCP servers that use OAuth authentication but don't support dynamic client registration. Per MCP spec, servers without dynamic registration need alternative ways for clients to obtain credentials. This implementation adds a UI for users to manually enter OAuth client information, providing graceful degradation when automatic registration isn't available.

How Has This Been Tested?

Tested by connecting to an MCP server requiring OAuth authentication without dynamic client registration capabilities. Verified that:

  • Users can manually enter client ID in the UI
  • The client ID persists between sessions
  • Connections succeed with manually provided OAuth credentials
  • The redirect URL is correctly displayed for reference

Breaking Changes

None. This is a non-breaking addition that enhances functionality without changing existing behavior.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

This implementation directly resolves issue #167 by providing a solution for MCP clients to connect to servers without dynamic client registration. By adding a dedicated UI section for OAuth configuration, users can now manually enter their client ID after registering through the server's interface. The solution maintains the redirect URL in the UI for easy reference during client registration, enabling seamless authentication even with servers that don't support dynamic registration.

image image

@cliffhall
Copy link
Contributor

cliffhall commented Apr 24, 2025

Hi @xiaoyijun! Thanks for this. I haven't done a local test of it yet, but I like what I see in the PR description and it does make sense for use case of servers that don't support dynamic client registration.

Based on the spec I want to think that this complies, but it seems like a mix of options 1 and 2. We're providing a UI for users to enter this information, but it's not actually being registered, just passed to the server as if hardcoded.

Screenshot 2025-04-24 at 4 38 32 PM

Given that this is the inspector and not an actual real-world client, I think this approach is OK. @localden might have a more nuanced view.

@xiaoyijun
Copy link
Author

Hi @cliffhall , thanks for the feedback!
You’re right, this setup is mainly for inspection/debugging purposes, not intended for production clients. Let me know if there’s anything you think I should adjust.

@cliffhall
Copy link
Contributor

Tested by connecting to an MCP server requiring OAuth authentication without dynamic client registration capabilities.

@xiaoyijun can you drop a link to the server you tested with? I'd really like to test this locally.

@cliffhall cliffhall added enhancement New feature or request waiting on submitter Waiting for the submitter to provide more info labels Apr 25, 2025
@gao-sun
Copy link

gao-sun commented Apr 25, 2025

Tested by connecting to an MCP server requiring OAuth authentication without dynamic client registration capabilities.

@xiaoyijun can you drop a link to the server you tested with? I'd really like to test this locally.

Hi @cliffhall! founder of Logto here. our team (primarily @xiaoyijun) is currently working on some MCP projects (primarily auth-related). we're excited about contributing to the MCP community and would love to share more details about what we are doing and server info for testing.

since the project is still in early-stage development, we’re unsure whether we can share everything publicly. what’s the best way to get in touch with you? it'll be great to have a direct channel for team-to-team communication (e.g., Slack or Teams) to help things move more efficiently.

looking forward to your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting on submitter Waiting for the submitter to provide more info
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants