MCP sign-in
Let your identity provider grant MCP apps access to Oxagen's MCP server for each person, with no API key to hand out or revoke, and see what Oxagen checks on every trade.
A new engineer joins and needs Cursor and Claude Code connected to Oxagen. Today each person creates an API key, pastes it into each app, and somebody has to find and revoke those keys when the person leaves. With MCP sign-in, your identity provider (IdP) decides who may connect which app. The person signs in to the app with their work account. Removing them in the IdP stops their next grant. Removing them through SCIM also stops a token they already hold, at its next call.
MCP sign-in follows the Enterprise-Managed Authorization extension of MCP 2026-07-28. The app asks your IdP for an ID-JAG, a short JWT made for one person, one app, and Oxagen. The app trades it at Oxagen's token endpoint for an access token that works for 10 minutes. API keys keep working beside it.
Before you start
Your organization needs the Enterprise plan, because MCP sign-in builds on single sign-on.
You need an OIDC provider your people already use to sign in to Oxagen, with its domain verified. The single sign-on guide sets one up. Oxagen checks each grant against the keys that provider publishes at its JWKS endpoint, so a SAML provider cannot grant MCP access.
Your IdP must issue ID-JAGs. Okta does through Cross App Access. Check your IdP's documentation for the draft revision it follows.
How to turn on MCP sign-in
- In your IdP, add Oxagen's MCP server as a resource the app may request access to. Set the audience to
https://mcp.oxagen.shand the resource tohttps://mcp.oxagen.sh/mcp. - Have the IdP put the Oxagen organization and workspace in the grant's
aud_tenantclaim as<organization slug>/<workspace slug>, such asacme/platform. The slugs are the ones in your Oxagen URLs. - Note the
client_idyour IdP puts in the grant for each app, often the URL of the app's client metadata document. - Note the
tenantclaim, if your IdP puts one in each grant. An IdP that serves many companies under one issuer does. - From an account with the Owner or Admin role in the Oxagen organization, email support@oxagen.sh. Name the provider, and the
tenantfrom step 4 if there is one. For each app, give itsclient_idand the harness to record its calls under: Claude Code, Codex, Cursor, Stella, or Claude Desktop. - For an app that holds a private key of its own, add the URL of its public keys, or the keys themselves, to the same email. Oxagen then refuses a trade from that app unless the app sends a client assertion made with one of those keys.
Oxagen turns on MCP sign-in for the provider and adds the apps to your organization's list. MCP sign-in is off for every provider until Oxagen turns it on at your organization's request. An app that is not on the organization's list cannot trade a grant, whatever the IdP allows.
What the app sends
An MCP client finds the server's sign-in details by itself. A call to https://mcp.oxagen.sh/mcp with no credential answers 401 with a WWW-Authenticate header that names the protected resource metadata (RFC 9728) and the scope mcp:tools. That document names https://mcp.oxagen.sh as the authorization server. Its metadata (RFC 8414) lists the JWT bearer grant and the ID-JAG grant profile.
The metadata also names an authorization endpoint, https://mcp.oxagen.sh/oauth/authorize, because the official MCP SDK refuses metadata that has none. That endpoint answers every request with 400 unsupported_response_type and never redirects, and the metadata lists no response type. So the server has no browser sign-in page, and it issues no client secrets.
The server names the extension, io.modelcontextprotocol/enterprise-managed-authorization, in the capabilities it answers to initialize and server/discover, on both MCP versions.
The app then trades the grant:
POST /oauth/token HTTP/1.1
Host: mcp.oxagen.sh
Content-Type: application/x-www-form-urlencoded
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
&assertion=<ID-JAG>
&client_id=https://cursor.example/client.json
&resource=https://mcp.oxagen.sh/mcpresource is optional. When the app sends it, it must name Oxagen's MCP server, or the trade gets invalid_target.
An app registered with its own keys adds a client assertion (private_key_jwt, RFC 7523). That is a JWT the app makes with its private key. Its iss and sub are the app's client_id. Its aud holds one value, https://mcp.oxagen.sh/oauth/token or https://mcp.oxagen.sh, and an assertion whose aud also names another party is refused. Its exp is at most five minutes ahead:
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion=<JWT the app made with its key>A trade answers with access_token, token_type Bearer, expires_in 600, scope mcp:tools, and resource. There is no refresh token. When the token runs out, the app asks the IdP for a new grant.
Oxagen does not check DPoP proofs (RFC 9449). It refuses a request that carries a DPoP header, and a grant your IdP bound to the app's key with a cnf claim. Ask your IdP for grants with no key binding.
What Oxagen checks on a trade
Oxagen checks a trade in two stages, so that nobody outside your company can write into your audit log.
Before anything in the grant is trusted, the grant must carry the typ header oauth-id-jag+jwt. Its aud must be https://mcp.oxagen.sh and nothing else, because a grant your IdP made for another server is that server's to spend, even when its aud_tenant reads like your organization. It must not have expired more than an hour ago. It must name exactly one organization in aud_tenant. Its iss must be the issuer one of that organization's verified OIDC providers is set up with. It must check out against a key that provider publishes. Its tenant must be the one recorded on the provider, or absent when none is. Some IdPs make every company's grants with the same keys, so the issuer and the tenant are what tie a grant to your company.
A grant that fails here gets invalid_grant with the same message every time, and Oxagen logs it without an audit row. When Oxagen cannot read the keys your provider publishes, the trade gets HTTP 503 temporarily_unavailable with Retry-After: 60 instead, and no audit row. The app retries after a minute.
Once the grant passes, a refusal writes one mcp.token_request_denied row to your audit log with its reason:
| Check | Reason |
|---|---|
The grant carries iss, sub, aud, client_id, jti, exp, and iat | missing_claim |
The grant carries no cnf claim | proof_required |
resource, when present, is Oxagen's MCP server, and covers the resource the app asked for | wrong_resource |
The client_id the app sent matches the grant's | wrong_client |
nbf and iat are not in the future, allowing 60 seconds of clock difference | not_yet_valid |
exp has not passed | expired |
scope, when present, asks only for mcp:tools | invalid_scope |
| The organization's plan includes single sign-on | not_entitled |
| MCP sign-in is on for the provider | not_enabled |
The workspace in aud_tenant is one of the organization's | wrong_workspace |
| The person is an active member who can open that workspace | not_a_member |
| The app is on the organization's list | client_not_allowed |
| An app registered with keys sent a client assertion made with one of them, and an app registered with none sent none | client_authentication_failed |
| The grant was never traded before | grant_reused |
Sending a refused grant again gets the same answer. A reused grant writes one grant_reused row however often it comes back. Every other reason writes one row per grant on each Oxagen server that refuses it.
When an app registered with keys sends a client assertion and Oxagen cannot read the app's keys, the trade gets HTTP 503 temporarily_unavailable with Retry-After: 60 and writes no row. The app retries after a minute.
Oxagen finds the person by the account your IdP's sign-in made for the grant's sub. A person who never signed in to Oxagen through this provider is matched by the grant's email, only when it is on the provider's verified domain and the grant does not say the email is unverified (email_verified set to false). A person this provider already signed in under another sub is never matched by email, and the trade is refused as not_a_member. That stops a new hire who was given a former employee's address from acting as the former employee. Browser sign-in through the provider refuses that link too.
A trade writes one mcp.access_token_issued row with the person as the actor. The audit logging page lists what each row holds.
What a token can do
A call made with the token acts as the person, with that person's workspace roles, in the workspace the grant named and no other. A report read with the token covers that workspace, even for an Owner. Listing organizations or workspaces with the token shows only the organization and the workspace the grant named, with the person's own role in each. The audit row of each call names the person as the actor, and the app and its harness.
Oxagen checks the person's membership, the app, and the provider's switch again on every request. When any of them changed, the request gets HTTP 401 with error="invalid_token", and the app must trade a new grant. When Oxagen cannot check a token for a moment, because a call to its key service failed, the request gets HTTP 503 with Retry-After: 2 and no invalid_token challenge, so the app keeps the token and sends the call again. A person removed in the IdP but not through SCIM keeps a token they already hold until it runs out, at most 10 minutes.
A token reaches Oxagen's own tools only. A call made with it belongs to no run and reaches no tool of an outside MCP server.
A token holds no authority over the organization, whatever the person's organization role. It cannot invite people, add or remove members, change a member's role, accept or decline an invitation, change single sign-on or SCIM, or change the organization's settings, teams, model tiers, billing, or workspaces. It cannot move a device to another workspace with connect_workspace either, because the device would enroll there. Those calls answer forbidden with the reason person_required.
A token cannot make a decision only a person makes. That covers an approval, a consent request, a repository question an agent asked, a work decision, approving or merging a steering pull request, deleting equipment, and changing the person's notification email. A token also cannot create, rotate, or revoke an API key, register an agent through register_agent or register a machine, create an enrollment token, or read the person's model credentials, because each of those would outlast the token. Those calls answer forbidden with the reason person_required, operator_session_required, or no_principal. The person does them signed in to Oxagen.
How to check the setup
Check the setup with a test app and a test person in your IdP. Each check below is one request you can send with curl.
Ask for the sign-in details with no credential:
curl -si -X POST https://mcp.oxagen.sh/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'It answers 401, and its WWW-Authenticate header reads Bearer resource_metadata="https://mcp.oxagen.sh/.well-known/oauth-protected-resource/mcp", scope="mcp:tools".
Read both metadata documents:
curl -s https://mcp.oxagen.sh/.well-known/oauth-protected-resource/mcp
curl -s https://mcp.oxagen.sh/.well-known/oauth-authorization-serverThe first names the resource https://mcp.oxagen.sh/mcp and the authorization_servers ["https://mcp.oxagen.sh"]. The second lists urn:ietf:params:oauth:grant-type:jwt-bearer in grant_types_supported and urn:ietf:params:oauth:grant-profile:id-jag in authorization_grant_profiles_supported.
Put a grant your IdP issued for the test person in GRANT, and trade it with the test app's client_id:
curl -s https://mcp.oxagen.sh/oauth/token \
-d grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer \
--data-urlencode "assertion=$GRANT" \
--data-urlencode client_id=https://app.example/client.jsonIt answers 200 with token_type Bearer and expires_in 600. An app registered with keys also sends its client assertion.
Put the access_token in TOKEN, and list Oxagen's tools with it:
curl -s -X POST https://mcp.oxagen.sh/mcp \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2025-06-18' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'The answer lists the tools. Connecting the test app checks the same path from inside the app.
Then check that the token endpoint refuses what it should. Each refusal answers 400 with error invalid_grant, and its error_description says why:
- Trade the same grant again. The description reads "This grant was already traded. Ask your identity provider for a new one.", and your audit log gets one
mcp.token_request_deniedrow with the reasongrant_reused. - Trade a grant that names another organization in
aud_tenant. It is refused, and your audit log gets no row. - Remove the test person through SCIM, ask the IdP for a new grant, and trade it. The description reads "The person the grant names cannot open this workspace in Oxagen." A grant traded before the removal is refused as already traded instead, so this check needs a new grant.