Skip to main content
MCP clients (Claude Code, Cursor, …) can sign in to a Self-Managed hub with the same OIDC provider people use in the browser, instead of a personal access token. The hub publishes its resource metadata at <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.publicURL is https:// and reachable by the people running MCP clients.
  • The access token your IdP issues carries the email claim (auth.oidc.emailClaim, default email), 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 Radar, Settings → AI & MCP → MCP sign-in → Set up MCP sign-in fills in the steps below with your hub’s own values: a script (or portal checklist) for your IdP, the Helm command for how your clusters are reached, and the command to add the server to your MCP client. Use the steps below if you’d rather configure it by hand.

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.
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).
  1. Manifest → in api, set "requestedAccessTokenVersion": 2 → Save. Without it, access tokens for this app are v1, issued by https://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.
  2. 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.
    If Application ID URI already has a value (e.g. api://<client ID>), don’t edit it: Edit replaces it, and anything that requests scopes through it stops working. The portal has no option to add a second URI. Add it in Manifest instead, then Save:
  3. Token configuration → Add optional claim → Access → email → Add. If clusters bind IdP groups, edit the groups claim and tick Access.
  4. 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 as radar-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).
radar-hub-mcp.yaml
Then apply them:

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.
Then /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

With auth.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 from auth.oidc.scopes. If auth.oidc.scopes has no API scope or more than one, set tokenExchange.scopes.

Why one app and two scopes

On Entra ID:
  • One app. Entra gives each person a different sub in every app, and the hub keys people on sub: 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.access is the scope your API servers require; access_as_user is the one /mcp requires (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 in tokenExchange.scopes.

Troubleshooting