<hub.publicURL>/.well-known/oauth-protected-resource/mcp, naming your issuer (auth.oidc.issuer) as the authorization server, and accepts that issuer’s access tokens on /mcp.
Requires Hub 1.14.1 or newer.
Requirements
hub.publicURLishttps://and reachable by the people running MCP clients.- The access token your IdP issues carries the email claim (
auth.oidc.emailClaim, defaultemail), and the groups claim (auth.oidc.groupsClaim) if clusters bind IdP groups. - The user is the same as their browser sign-in: both are keyed on the IdP’s
sub.
Set up sign-in
In your IdP
If your clusters use user tokens (auth.oidc.clusterAccess: token), Keycloak and other IdPs need an extra step for the token exchange, marked (User tokens only). Entra ID needs none.
- Microsoft Entra ID
- Keycloak
- Other IdPs
MCP clients send
resource=<hub.publicURL>/mcp, and Entra only accepts it when it’s the Application ID URI of the app that owns the requested scope. Use the app registration the hub already signs people in with (why).- Portal
- Azure CLI
-
Manifest → in
api, set"requestedAccessTokenVersion": 2→ Save. Without it, access tokens for this app are v1, issued byhttps://sts.windows.net/<tenant>/: the hub rejects them on/mcp, and API servers that trust the v2 issuer reject the exchanged token. ID tokens are not affected. -
Expose an API:
- Application ID URI → Add →
https://<hub host>/mcp(no trailing slash) → Save. - Add a scope → Scope name
access_as_user, Who can consent Admins and users (or Admins only, then grant admin consent), a display name and description for the consent screen, State Enabled → Add scope.
- Application ID URI → Add →
-
Token configuration → Add optional claim → Access →
email→ Add. If clusters bind IdP groups, edit the groups claim and tick Access. -
Authentication → Add a platform → Mobile and desktop applications → custom redirect URI
http://localhost:8765/callback→ Configure. MCP clients are public clients: they use PKCE and no secret.
In the hub
Save the values for your IdP asradar-hub-mcp.yaml. As written, they work with Hub roles and IdP groups. If your clusters use user tokens, uncomment the tokenExchange lines (what it does).
- Microsoft Entra ID
- Keycloak
- Other IdPs
radar-hub-mcp.yaml
Connect your MCP client
Each user adds the server with the client ID of the app MCP clients sign in through: the Entra app’s Application (client) ID, the Keycloak public client (e.g.radar-mcp), or the client you registered. Entra has no dynamic client registration, so the client ID is required there.
/mcp → radar → Authenticate.
On Entra, every MCP client signs in as the same app, so the Agents page lists one client per person rather than one per tool.
Clusters on user tokens
Withauth.oidc.clusterAccess: token, the hub doesn’t forward the MCP access token to clusters. It exchanges it at your IdP for a token your API servers accept, with the same audience as browser sign-in, and relays that. Without tokenExchange, MCP sign-in works, but clusters refuse live calls from MCP clients.
- The exchanged token is an access token, even when browser sign-in relays the ID token: the email and groups claims must be on access tokens too.
- Entra ID with
clusterToken: access_token: the hub requests the API scope fromauth.oidc.scopes. Ifauth.oidc.scopeshas no API scope or more than one, settokenExchange.scopes.
Why one app and two scopes
On Entra ID:- One app. Entra gives each person a different
subin every app, and the hub keys people onsub: MCP sign-in through a second app would be a different user from the same person’s browser sign-in. On-behalf-of also only exchanges tokens issued to the hub’s own app. - Two scopes.
cluster.accessis the scope your API servers require;access_as_useris the one/mcprequires (requiredScope). As long as both sides check their scope, a token meant for a cluster isn’t accepted on/mcp, and the reverse. The hub refuses to start with the MCP scope intokenExchange.scopes.