Atoti Intelligence SDK
This is part of the Atoti Intelligence SDK offer.What this enables
When this feature is enabled, the MCP server:- Publishes an RFC 9728
Protected Resource Metadata document at
/.well-known/oauth-protected-resource. The document tells clients which authorization server(s) to talk to and which scopes to request. - Returns
WWW-Authenticate: Bearer realm="mcp", resource_metadata="..."on 401 responses from/mcp/**and/sse, so clients can discover the metadata document on first contact.
Prerequisites
- The Atoti MCP server is already running. See Atoti MCP server setup guide.
- An OAuth 2.0 authorization server (Okta, Entra ID, Auth0, Keycloak, Cognito, …) is configured to issue access tokens for users who should be able to call MCP endpoints.
- The Atoti Spring Security stack is already configured to validate the IdP’s JWTs (this is the same setup used by other Bearer-secured Atoti endpoints — no extra steps).
Enable the feature
Add the following to yourapplication.yml:
authorization-servers is the only required setting when enabled=true. Startup fails with a
clear error if it is left empty.
Property reference
IdP setup
Concrete steps vary by IdP, but the broad shape is:- Configure your IdP to issue access tokens for the MCP client (Claude Desktop, Claude Code, Cursor, etc.). Most enterprise IdPs require the client to be pre-registered; some support Dynamic Client Registration (RFC 7591).
- Set the resource/audience claim on the issued tokens to match
atoti.server.endpoint.mcp.oauth2.resource. Atoti’s JWT validator must already trust this audience. - Allow the redirect URI used by your client. Most MCP clients use a random loopback URI such
as
http://127.0.0.1:<random-port>/callback.
Per-client UX
- Claude Code, Claude Desktop, Cursor, Cline, VS Code MCP, Gemini CLI: detect the
WWW-Authenticateheader automatically, open the system browser for the PKCE flow, store the resulting access and refresh tokens in the OS keychain, and refresh silently. - Older or stdio-only MCP clients: use the
mcp-remotebridge — it performs the PKCE dance locally and proxies SSE to the remote MCP server.
Reverse-proxy caveats
If the Atoti server sits behind a reverse proxy that rewrites the host or scheme:- Either set
atoti.server.endpoint.mcp.oauth2.resourceexplicitly to the public URL of the server, or - Enable Spring Boot’s
ForwardedHeaderFilter(viaserver.forward-headers-strategy=framework) so the request-derived URL honoursX-Forwarded-*.
resource field and the resource_metadata= URL in the challenge
header will reflect the internal hostname instead of the public one.
Limitations and out-of-scope features
Inexternal mode the MCP server is only a resource server — it advertises discovery metadata and
validates Bearer tokens, but it does not issue them. The following are therefore out of scope for
external mode (they are the IdP’s responsibility):
- Dynamic Client Registration (RFC 7591). Customers pre-register MCP clients in their IdP, or rely on the IdP’s own DCR support.
/.well-known/oauth-authorization-server. That endpoint is served by the IdP.
- Token Exchange (RFC 8693). The MCP server does not exchange tokens for downstream services.
- Per-error-code
WWW-Authenticateparameters (error=invalid_token, etc., per RFC 6750). The v1 challenge contains onlyrealmandresource_metadata.