mcp.allternit.com without signing in to Allternit. The edge runs a small authorization server for this, following the MCP extension Enterprise-Managed Authorization.
Admin API
Clerk session JWT; changes need the Clerk roleorg:admin in that org. Other members may read; non-members get 403.
The managed configs for the other direction live at
GET|PUT|DELETE /api/v1/orgs/:org/managed-auth[/:connector_id]. PUT takes { as_issuer, token_endpoint, resource, client_id, client_secret?, roles, scopes, enabled }; GET never returns the secret (has_secret) and the list includes the org’s issuer_url.
The edge authorization server
POST /oauth2/edge/token takes the RFC 7523 JWT-bearer grant (assertion = the ID-JAG). It has its own AS metadata and JWKS. An assertion is accepted only when all of these hold:
issis a trusted issuer of some org (mcp_trusted_issuers, not revoked);- the signature checks against that issuer’s JWKS (cached, a new
kidtriggers a refetch); audis the edge AS issuer andresourceis an edge resource (<MCP_PUBLIC_URL>/connectors, the agents server);expandiatare sane and thejtihas not been seen (edge_jti_seen, kept untilexp);emailis present and verified.
iss. Zero matches, or more than one, is invalid_grant: the edge never guesses. Issuer-specific claim mapping lives in one function, so a new issuer kind is one change.
The edge then issues its own access token (ES256, aud = the resource, scope, sub = the Clerk user id, at most one hour). The edge accepts both these tokens and Clerk tokens. Protected resource metadata lists Clerk first, then the edge AS.
Consent
Adding a trusted issuer is the org’s consent:client_id = issuer:<iss> counts as approved for that org’s members on the targets the admin picked (connectors, agents). Members see no per-app approval screen on this path. Bots are never reachable this way; they stay per person.