Authorization: Bearer <MCP_ACCESS_TOKEN> on every /mcp request. The
GraphQL API key and Firebase ID token flows have separate credential boundaries.
Discover endpoints
The production MCP resource URL ishttps://backend.apob.ai/mcp. Its
protected-resource metadata
and authorization-server metadata
provide the resource and OAuth endpoints. Set APOB_MCP_URL to the resource URL.
An unauthenticated MCP request returns a Bearer WWW-Authenticate challenge
with resource_metadata and the required mcp:access scope. Fetch that metadata
URL to obtain the exact resource URI and authorization-server issuer.
Use the endpoint URLs returned by discovery rather than constructing them from
the GraphQL URL. These paths are available only in an MCP-enabled environment.
Discovery follows the
MCP authorization specification.
Supported client and token policy
CIMD support is advertised in authorization-server metadata. A CIMD document
must identify the same client URL and define permitted redirect URIs. Deployment
policy can restrict which CIMD clients are accepted. There is no dynamic client
registration endpoint; do not assume an arbitrary opaque client ID is registered.
When a CIMD document includes
token_endpoint_auth_methods_supported, its
supported methods must include none. The legacy token_endpoint_auth_method
is used only when that list is absent. APOB retains public-client PKCE even when
the document also supports other authentication methods.
Tool descriptors declare OAuth2 mcp:access in securitySchemes and its _meta
compatibility mirror. Missing-identity tool errors include
_meta["mcp/www_authenticate"] for clients that support OAuth linking.
Authorization code flow
1
Create the authorization request
Generate a verifier and its S256 challenge, plus a state value bound to your
client interaction. Open the discovered authorization endpoint in a browser
with the parameters below.
2
Sign in and consent
Follow the APOB sign-in and consent pages. Verify the account and client.
Keep the browser’s authorization session through the redirect flow.
3
Validate the callback
Check the returned state against the original interaction. On approval,
exchange the returned code once using the original redirect URI and verifier.
4
Use the access token
Store the returned token securely and send it in the Bearer header. Follow
the HTTP and JSON-RPC reference to initialize and discover tools.
Redirect matching is constrained to registered callbacks. For an explicitly
registered portless HTTP
localhost callback, a canonical port from 1 to 65535
is accepted while the scheme, host, path, and raw query remain exact. Fixed-port
localhost and HTTPS callbacks match exactly. Token exchange must use the
original authorization request’s redirect URI, including its port.
Exchange example, with values obtained from discovery and the callback:
Complete sign-in and consent
Open the authorization URL in a browser and follow APOB’s hosted sign-in and consent screens. After approval, APOB redirects to the registered callback with the authorization code. Checkstate, then exchange the code as shown above.
Use the resulting MCP access token for tool requests. Browser session cookies
and Firebase sign-in tokens do not authenticate calls to /mcp.
Inspect or revoke a connection
The GraphQL connected-app API provides:listMcpClientInstructionsfor setup metadata.listPersonalMcpConnectionsfor the authenticated account’s connected clients.revokeMcpConnectionto remove that account’s consent and invalidate the client’s stored access tokens and authorization codes.