/.well-known/* discovery documents must carry an Authorization: Bearer <token> header. The token is validated by introspection against doola’s IAM service, and the resolved identity (customerId, email, role) is attached to the request.
No tool takes a
customerId argument — identity rides the bearer. The active companyId is resolved on demand from the authenticated customer.Discovery
A request without a valid bearer returns401 with a challenge that points clients at the OAuth metadata, per RFC 9728 and RFC 8414:
OAuth endpoints
Advertised on the configured issuer:- Grants:
authorization_code,client_credentials,refresh_token. - PKCE:
S256supported.
Session lifecycle
The transport layer is stateless, but MCP still uses a per-connection session ID:- The server mints a fresh
Mcp-Session-Id(UUID) on everyinitializeand returns it as a response header. - Clients must echo that header on every subsequent request. A non-
initializerequest without it returnsHTTP 400with JSON-RPC error-32600 "Missing Mcp-Session-Id header". - A new
initializemints a new ID — there is no cross-conversation continuity at the transport layer. Continuity is anchored to the OAuth identity instead.