You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow configuring the DCR client_name sent during upstream dynamic client registration #7094
When ToolHive registers with an upstream identity provider via dynamic client registration (DCR, RFC 7591), it always sends client_name: "ToolHive MCP Client" — a hardcoded constant (pkg/oauthproto/dcr.go, ToolHiveMCPClientName). That is the name the upstream shows on its authorization/consent screen, and there is no way to change it.
This matters when several ToolHive instances register against the same IdP (they are indistinguishable on the IdP side) and when an operator wants their own product or team name shown to users on the authorization screen instead of ToolHive's default.
Proposal
Add an optional clientName to the DCR configuration (embedded auth-server run config and the MCPExternalAuthConfig CRD), threaded through to the client_name registration metadata sent by the resolver. When empty, keep the current default ("ToolHive MCP Client"), so existing deployments are unaffected.
Notes for the design:
The name is display-only registration metadata; it is never used as a key, and the resolver's cache key is (Issuer, UpstreamID, RedirectURI, ScopesHash, RotationKey), so changing clientName alone does not rename an already-registered client. The new value applies only the next time ToolHive registers a fresh client (e.g. after rotating via rotationKey, or when the upstream rejects the cached registration).
Cap the length at 256 characters, matching the client_name bound the auth server already enforces on inbound registrations (pkg/authserver/server/registration/dcr.go, MaxClientNameLength).
The CLI DCR flow (pkg/auth/remote/secret_renewal.go, pkg/auth/discovery/discovery.go) keeps the fixed name; this is about the operator / embedded-auth-server path only.
Activity
aponcedeleonch commentedon Nov 12, 2026
Thanks for filing this and for opening #7095 to fix it, @imaxmelnyk. We'll follow up on the PR.