Skip to main content
When a person lets an AI agent reach one of your MCP servers (see AI agents), Aiveth gives the agent an access token for that one server. The token is a JWT signed with the same keys your apps already use (published at your Aiveth JWKS), so your MCP server can check it without calling Aiveth.

Lifetime and refresh

  • An agent token lasts 10 minutes. A JWT can’t be called back, so its life is kept short.
  • The agent keeps going with its refresh token, which rotates on every use.
  • Suspending the person, ending their sessions, an admin blocking the agent, or the person disconnecting it all stop the agent at its next refresh, so within 10 minutes.
  • Every token, first or refreshed, passes the organization’s controls first.
To stop an agent even sooner, ask Aiveth with introspection on each call.

Claims

Example payload:

The audience rule

A token is for one MCP server. Your server must refuse any token whose aud is not its own address. The SDK does this for you:
The SDK checks the signature, iss, aud, expiry, that the token is an agent token, and the permissions you name. When the agent asks for a token at /oauth/token, it must send resource with your server’s address. A code or refresh token for one server can’t be used to get a token for another (invalid_target).

Introspection

Your MCP server can ask whether a token is still good right now:
The answer is {"active": false} for anything Aiveth would not issue again now: a bad or expired token, a blocked or removed agent, all agents paused, an owner who left, a passed end date, an unanswered access review, or a person who can no longer use apps. When active, it returns active, token_type and the claims sub, client_id, scope, aud, iss, exp, iat, act, aid, authorization_details and org_id. Introspection counts nothing and records nothing, so you can call it on every request. It is limited to 600 calls a minute per network address.

Enterprise passes (ID-JAG)

Enterprise sign-in for AI agents is available on the Enterprise plan, or as an add-on to Business.
With an enterprise pass, a person who signs in to an AI app with their organization’s identity provider (such as Okta or Microsoft Entra ID) can reach your MCP server without Aiveth’s consent screen. Their IT team approves the AI app centrally in its identity provider, and the provider issues a pass (an Identity Assertion JWT Authorization Grant, or ID-JAG).

Set it up

1

Trust the identity provider

In AI agents → Enterprise sign-in for AI agents, your organization’s own single sign-on is trusted while it’s on. You can add other issuers under Trusted identity providers. This needs Manage sign-in security. With no trusted provider, no pass is accepted.
2

Turn on enterprise passes for the AI app

Under Apps, open the AI app and turn on Enterprise passes.
3

Tell the identity provider's admin

Give them your Authorization server address. It is the pass’s audience.

The request

The AI app sends the pass to /oauth/token, proving itself with its client ID and secret:
Aiveth checks, in order:
  1. The AI app proved itself, and enterprise passes are on for it.
  2. The pass’s header typ is oauth-id-jag+jwt.
  3. Its iss is an issuer your organization trusts, and only then its signature, with that issuer’s keys.
  4. Its aud is your Aiveth address, its client_id is the app that proved itself, and it is in date.
  5. The MCP server named in the pass (and the request, which must agree) is your organization’s.
  6. The person is found by their single sign-on link, or else by the pass’s verified email for a member of your organization. Nobody is ever created.
  7. The permissions are what the pass, the server and the request all allow.
The result is a 10-minute token with gty set to id-jag and no refresh token, because the issuing identity provider could not take one back. The AI app presents the pass again, or gets a new one.

Server-to-server calls

Sometimes one of your MCP servers needs to call another for the same person. Server X exchanges the token it received for a token to server Y (RFC 8693 token exchange).

Allow it

In AI agents, open server X, choose Calls, and choose which servers it may call and with which permissions at most. Make X’s credential there: a server ID and a secret shown once. An admin can renew the secret. Nothing else may call another server.

The exchange

Server X calls /oauth/token with its own credential (HTTP Basic or in the form):
Aiveth checks X’s credential; that the token is Aiveth’s, still good, and addressed to X; that Y is X’s to call and the scope is within what X may use there; that the chain has at most 4 actors; that the person is still a live member; and that the agent at the end of the chain passes its own controls. The new token has sub the person, aud server Y, client_id server X, and a nested act that records the whole chain:
Its scope is narrowed, it ends no later than the token it came from, and it has no refresh token. If the original token came from an approval, its aid travels with it. Removing X’s permission to call Y makes introspection answer inactive for tokens already issued.