AI agents and MCP servers are available on the Business plan and above.
How it works
1
The agent calls your MCP server
Without a token, your server answers
401 with a WWW-Authenticate header that points to its protected resource metadata (RFC 9728). That document names Aiveth as the authorization server.2
The agent sends the person to Aiveth
The agent opens
/oauth/authorize with its client ID, PKCE, the permissions it wants, and resource set to your MCP server’s address.3
The person signs in and agrees
The person signs in as usual, then sees Aiveth’s consent screen and chooses Allow or Deny.
4
The agent gets a token
The agent exchanges the code at
/oauth/token, again naming resource. It receives an access token for your server only, valid for 10 minutes, and a refresh token. See Agent tokens.5
Your server checks every call
Your MCP server verifies the token’s signature, audience and permissions on every request.
Register your MCP server
1
Open AI agents
In the console, go to AI agents and choose Add server. This needs the Manage apps power.
2
Name it and give its address
The Address is exactly where agents reach your MCP server, such as
https://mcp.example.com/mcp. Tokens are issued for this address only, and it can’t be changed later. Use https (plain http only for localhost). Only one organization can hold an address.3
Add permissions
Under Permissions, add what an agent can ask for, such as
files:read, each with a description. People see each description before they agree.offline_access is always allowed: it gives the agent a refresh token.
Protect your server with the SDK
Serve the metadata document, return the challenge when a token is missing or short of a permission, and verify every token.How agents identify themselves
An agent’s client ID takes one of two forms.Client ID metadata documents
This is the MCP default. The client ID is anhttps address with a path, pointing to a JSON document the agent publishes. Aiveth fetches it and checks that its client_id is that same address, and reads the agent’s name and redirect addresses. No registration is needed.
For safety, Aiveth fetches the document only from public addresses, with a 3 second limit, at most 5 KB, and no redirects. It keeps the document for its cache lifetime, between 5 minutes and 1 day (1 hour by default).
Dynamic client registration
Older agents can register themselves withPOST /oauth/register (RFC 7591). The MCP specification replaced this, so it is off by default. To turn it on, go to AI agents → Which agents may connect and turn on Let agents register themselves. Registration is rate limited per network and per day.
One app per agent
The first time an agent reaches one of your MCP servers, Aiveth adds it to your organization as a public app with its redirect addresses. It then has everything an app has: codes with PKCE, rotating refresh tokens, revocation, and a place in each person’s Connected apps. It appears in the agents list under AI agents, where an admin can block or unblock it. A blocked agent gets no code and no new token.Which agents may connect
Under AI agents → Which agents may connect, choose:- Any agent, after the person agrees (the default). Aiveth shows who the agent is, where it comes from and what it asks for.
- Only agents you list. Only the AI apps you choose can connect. Agents turned away by the list are shown so you can add them.
The consent screen
Before an agent gets a code, the person sees:- the agent’s name and where it really comes from: its metadata document’s host, or that it registered itself. A name alone can be copied; the address can’t.
- where the code will be sent (the redirect address’s host). For an address on the person’s own computer (
localhost), a warning that any program there could claim to be that agent. - the MCP server and each permission, in your organization’s words.
Next steps
Agent tokens
What is in the token and how to check it.
Controls and approvals
Owners, hours, rate limits, human approval and alerts.
Aiveth MCP server
Let an AI assistant manage your Aiveth organization.