# auth.md — Clico > Machine-readable agent authentication and registration guidance for autonomous clients. ## TL;DR **Most agent work on Clico is public.** Catalog HTML/Markdown, `llms.txt`, OpenAPI, and `.well-known` discovery files are readable without login or agent registration. **Protected API routes** on the motor (`api.clico.co/api`) require Better Auth session cookies (browsers), Bearer JWTs (native clico-mobile), or **delegated Agent Auth** JWTs after user approval (Better Auth Agent Auth plugin). ## Audience Autonomous agents, LLM clients, and MCP/A2A tooling that look for `/auth.md` before calling a service. ## Access model | Aspect | Value | | --- | --- | | Public catalog & discovery | **Anonymous** — no registration | | Protected API (browser) | Better Auth session cookie (`.clico.co`) | | Protected API (native mobile) | Bearer JWT from `/api/auth/mobile/login` | | Third-party agent registration | **Delegated only** — user device approval on clico-auth (flag: `CLICO_AGENT_AUTH_ENABLED` on api) | | Supported identity types (metadata) | `delegated` | ## What agents can do without registering - Read public pages and Markdown twins on https://www.clico.co. - Fetch discovery indexes: `/.well-known/agent-index.json`, `/.well-known/api-catalog`, `/.well-known/mcp/server-card.json`, `/llms.txt`. - Read OpenAPI at `https://api.clico.co/api/openapi.json` (www `/openapi.json` is a 307 alias). ## Browser users - Login UI: https://auth.clico.co - Product UI: https://www.clico.co - Session: Better Auth opaque cookie written by clico-api; clico-auth relays login UI. ## Native mobile (clico-mobile) - API origin: https://api.clico.co - Login: `POST /api/auth/mobile/login` → Bearer access + refresh JWTs. - Refresh: `POST /api/auth/mobile/refresh`. - Mobile OpenAPI: https://api.clico.co/api/mobile/openapi.json ## Machine-readable metadata - [Protected Resource Metadata (RFC 9728)](https://www.clico.co/.well-known/oauth-protected-resource) — API resource `https://api.clico.co/api` (`https://api.clico.co/.well-known/oauth-protected-resource/api`). Public brand MCP `https://api.clico.co/mcp` is **anonymous** (no bearer). - [Authorization Server Metadata (RFC 8414)](https://www.clico.co/.well-known/oauth-authorization-server) — issuer `https://auth.clico.co/api/auth`; `agent_auth` for delegated agents. - [Agent Auth configuration](https://api.clico.co/.well-known/agent-configuration) — Agent Auth Protocol discovery (when enabled on api). - [Poppy manifest (website-only)](https://www.clico.co/.well-known/poppy.json) — Personal Agent Protocol discovery; session/API auth uses Agent Auth above. - MCP (public brand): `https://api.clico.co/mcp` and `https://www.clico.co/api/mcp` — Streamable HTTP, **no OAuth token**. Server card `https://www.clico.co/.well-known/mcp/server-card.json`. ## Agent capability matrix (anonymous vs delegated vs forbidden) | Operation | Access | Capability / scope | | --- | --- | --- | | llms.txt, agent skills, OpenAPI, well-known discovery | Anonymous | — | | Brand kit MCP tools (search, colors, fonts, files) | Anonymous | — | | Catalog search / product links (anonymous MCP) | Anonymous | — | | Public product page shell metadata | Delegated Agent Auth (device approval) | `get_product_shell` | | Monthly creative download quota summary | Delegated Agent Auth (device approval) | `get_download_quota` | | Download creative asset (presigned URL, plan quota) | Delegated Agent Auth (device approval) | `download_creative_asset` | | Checkout, payments, wallet top-up, subscriptions | Forbidden | — | | Admin, impersonation, internal mutations | Forbidden | — | ### Registry-first catalog URLs - Resolve catalog products registry-first: a root URL segment is a product only when CatalogShortIdRegistry or GET /api/public/ssr/catalog/product-page?includeProduct=0 confirms the resource. - Never treat caller-supplied resource hints or resource= query alone as proof of a catalog product. - On registry miss, fall through taxonomy → public profile → 404. ## Three access lanes | Lane | Transport | Auth | Typical use | | --- | --- | --- | --- | | Anonymous MCP | `https://api.clico.co/mcp` | None | Brand kits, public discovery | | Delegated Agent Auth | `POST /api/auth/agent/capability/execute` | Device approval + agent JWT | Overlays, downloads on behalf of user | | Mobile Bearer | REST `api…/api/*` | HS256 JWT from mobile login | clico-mobile app | ## Agent registration (delegated) External agents register via `POST https://api.clico.co/api/auth/agent/register` (host JWT) and request capabilities. **Delegated** mode requires a logged-in user to approve on **clico-auth** (`/device/capabilities` with `user_code`). Autonomous / anonymous agent registration is **not supported**. Enable with `CLICO_AGENT_AUTH_ENABLED=1` on clico-api. ## Discovery cross-links - Agent index: https://www.clico.co/.well-known/agent-index.json - API catalog: https://www.clico.co/.well-known/api-catalog - API docs: https://api.clico.co/api/docs