A company that uses Ferrite or your application through Claude or another assistant usually manages people in one organization directory or identity provider. Enterprise-managed authorization (Auto-connect) lets that trusted issuer decide who may connect: an administrator approves the connection once, and members use the MCP server without completing individual OAuth sign-ins.
The assistant exchanges the person’s sign-in for a short-lived assertion at the trusted issuer (an Identity Assertion JWT Authorization Grant, or ID-JAG, profile urn:ietf:params:oauth:grant-profile:id-jag) and presents it to the MCP authorization server with the urn:ietf:params:oauth:grant-type:jwt-bearer grant. The server verifies the assertion and issues a short-lived access token with no refresh token.
Enterprise-managed authorization is available at two layers on Ferrite:
- For internal company apps on
Ferrite Apps(https://mcp.ferrite.cloud/apps): Built into the Ferrite Dashboard authorization server with 1-click Express Admin Setup (ema_issuer:manage), Claude as a trusted issuer (no external IdP needed), Okta XAA, DNS-verified domain JIT provisioning, and instant revocation. See Internal company apps in Claude. - For your own SaaS applications built on Ferrite: Implemented in
poppy-oauth(server half) andmcp(client half). See Build Claude-enabled apps.
Express Admin Setup on Ferrite Apps
When a Claude Team or Enterprise administrator enables Auto-connect with Claude on Ferrite Apps, Claude runs the Express Admin Setup flow against https://mcp.ferrite.cloud:
- Claude discovers
ema_issuer:managein/.well-known/oauth-authorization-server(scopes_supported) alongsideurn:ietf:params:oauth:grant-type:jwt-bearer,urn:ietf:params:oauth:grant-profile:id-jag,none, andprivate_key_jwt. - Claude initiates an authorization code flow requesting only
ema_issuer:managefrom Claude’s published Client ID Metadata Document (https://claude.ai/oauth/mcp-oauth-client-metadataor/confidential_client) with callbackhttps://claude.ai/api/mcp/auth_callback. Non-Claude clients, mixed scopes, alternate redirect URIs, and trial accounts are refused. - The workspace owner approves the link in the Dashboard, and
POST /tokenreturns a 300-second single-use setup token (fmcs...),ema_setup_endpoint(https://mcp.ferrite.cloud/ema/trusted-issuer), and norefresh_token. - Claude sends
PUT https://mcp.ferrite.cloud/ema/trusted-issuerwith{"ema_issuer": "https://identity.anthropic.com/issuers/<org-id>"}. Ferrite validates the Claude issuer prefix, enforces global uniqueness across workspaces (409 issuer_in_use), burns the setup token atomically, and returns{"aud_tenant": "ftn_..."}.
Every subsequent employee assertion carries aud_tenant pinned to that workspace. Disabling Enterprise Auth or removing an issuer immediately invalidates active Hub tokens on the next /apps request.
Trust a customer’s identity provider in your own app
In your own Ferrite application, configure each trusted issuer (either a customer’s Claude organization issuer https://identity.anthropic.com/issuers/<org-id> or their Okta issuer) with the assistants it may delegate to and the scopes it may grant, then answer your token route with handle_token_with_enterprise:
let cfg = cfg.with_enterprise(vec![
TrustedIdp::new(
"https://login.customer.example",
keys,
vec!["https://claude.ai/oauth/mcp-oauth-client-metadata/confidential_client".to_string()],
vec!["notes:read".to_string()],
)
.with_tenant("tenant-acme"),
]);
let subjects = |grant: &VerifiedIdJag| Ok(account_for_verified_identity(grant));
let reply = handle_token_with_enterprise(
&cfg, body, None, &directory, &store, &subjects, now_ms,
);
keys come from fetch_idp_keys, which reads the provider’s OpenID discovery document over a declared egress destination and requires it to name the exact configured issuer. Cache them, and fetch again when CachedIdpKeys::needs_refresh says an assertion names a key you do not hold. Take the issuer from your configuration and never from the assertion.
An empty client or scope list delegates nothing. A provider that serves several companies from one issuer needs with_tenant, so one company’s assertion cannot open another’s data.
Decide whose account it is
The resolver maps a verified assertion to one of your accounts. Two mappings are safe:
- Store
(iss, aud_tenant, sub)when the person first signs in or is provisioned, and match on that tuple. This works even when an enterprise IdP such as Okta XAA omits theemailclaim. - Match the assertion’s verified
emailagainst an address your application has verified or pre-invited, when the company owns the domain (verified via DNS TXT, never a consumer free-mail provider).
Return None for anyone else. poppy-oauth then refuses the grant, and no account is created.
What each assertion must prove
Both Ferrite Apps and poppy-oauth enforce strict ID-JAG validation before issuing a token:
typheader equalsoauth-id-jag+jwt, signed withRS256orES256by a key published at the configured issuer’sjwks_uri.issmatches an active configured issuer string verbatim;audnames this authorization server only;aud_tenant(when configured) matches verbatim.client_idmatches the authenticated MCP client. When a client publishes a confidentialprivate_key_jwtmetadata document, it must authenticate withprivate_key_jwtand cannot downgrade tonone.resource(normalized for scheme/host case, default port:443, and trailing slash) names an allowed protected resource.- Lifetime (
exp - iat) is at most one hour (3600 seconds) with bounded clock skew, and(iss, jti)is burned atomically so every assertion works once. A store that cannot record thejtirefuses the grant. - The issued access token works only at the named resource and comes with no
refresh_token. When it expires, the assistant presents a fresh assertion, so an offboarded employee loses access at the next exchange.
Metadata advertises the jwt-bearer grant and urn:ietf:params:oauth:grant-profile:id-jag profile only while Enterprise Managed Authorization is enabled.
Use it as a client
An agent inside your application can use the same flow to reach another company’s MCP server on behalf of a person who signed in to you. An agent built with agent-sdk does this with EnterpriseTokens. Directly, exchange their identity token at the identity provider:
let form = oauth::id_jag_exchange_form(&IdJagExchange {
audience: "https://auth.notes.example",
resource: Some("https://notes.example/mcp"),
scopes: &["notes:read".to_string()],
subject_token,
subject_token_type: oauth::TOKEN_TYPE_ID_TOKEN,
});
let request = oauth::authenticated(form, "my-client", &ClientAuth::SecretPost(idp_secret));
Redeem the reply at the MCP server’s authorization server:
let grant = oauth::parse_id_jag_response(&idp_reply)?;
let form = oauth::jwt_bearer_form(&grant.assertion, &["notes:read".to_string()]);
let request = oauth::authenticated(
form, "https://client.example/oauth/client.json", &ClientAuth::None,
);
parse_token_server_metadata(&document, issuer) followed by supports_id_jag() tells you whether that server participates before you try. Declare both servers as egress destinations in ferrite.json.
Next steps
- Internal company apps in Claude for 1-click Auto-connect on
Ferrite Apps. - Build Claude-enabled apps for building customer-facing Claude connectors on Ferrite.
- Authentication to sign people in to your own web pages.
- Interactive MCP tools to protect the MCP endpoint the tokens are for.