# auth.md — CookieYes authentication

> For the complete site index, see [llms.txt](/llms.txt). Every page is also available as Markdown: replace the trailing slash with `.md` (`/pricing/` becomes `/pricing.md`), or send `Accept: text/markdown` to the page URL itself.

> Where to log in, what the permissions are, and which host holds them.
> Short version: **nothing on www.cookieyes.com requires authentication.**
> Accounts and API access live on https://app.cookieyes.com.

## This site needs no credentials

Every page, and every machine-readable representation of it, is public:

- Any page as Markdown — replace the trailing slash with `.md`, or send `Accept: text/markdown`
- [/llms.txt](https://www.cookieyes.com/llms.txt) and [/llms-full.txt](https://www.cookieyes.com/llms-full.txt)
- [/agent.md](https://www.cookieyes.com/agent.md) and [/.well-known/agent.json](https://www.cookieyes.com/.well-known/agent.json)
- [/sitemap.xml](https://www.cookieyes.com/sitemap.xml)

There is no login form, no session, and no token to obtain for reading this
site. If something here returns 401 or 403, that is a bug — please report it
via [/.well-known/security.txt](https://www.cookieyes.com/.well-known/security.txt).

## Acting on a user account: MCP over OAuth 2.1

The programmatic surface is a hosted Model Context Protocol server. It is
the only authenticated interface, and it is not on this host.

| Detail | Value |
| --- | --- |
| Endpoint | `https://app.cookieyes.com/mcp` (streamable HTTP) |
| Authorization server | `https://app.cookieyes.com` |
| Flow | OAuth 2.1 — authorization code + PKCE (S256) |
| Client registration | Dynamic (RFC 7591) — no key to request by hand |
| Registration endpoint | `https://app.cookieyes.com/oauth2/register` — as published by the authorization server metadata, which stays authoritative |
| Scopes | `mcp:read`, `mcp:write` |
| MCP protocol revision | `2025-06-18` |

Constraints: Account owner must enable MCP access. Consent logs, cookie values and personal data are never exposed. English only.

## Discovery chain

You do not need to guess any of this, and you should not hardcode it —
every step below is discoverable at runtime:

1. Open a session against `https://app.cookieyes.com/mcp`.
2. Unauthenticated, it answers `401` with an RFC 9728 challenge naming its
   own metadata document:

   ```
   WWW-Authenticate: Bearer resource_metadata="https://app.cookieyes.com/.well-known/oauth-protected-resource"
   ```

3. Fetch that document. It returns the resource identifier and the
   authorization servers that can issue tokens for it.
4. Fetch the authorization server metadata at
   [https://app.cookieyes.com/.well-known/openid-configuration](https://app.cookieyes.com/.well-known/openid-configuration) for the
   authorization, token and registration endpoints.
5. Register, run the authorization code + PKCE flow, and call the server
   with the resulting access token.

## Agent registration

The four things an agent needs before it registers, stated here so this
file stands on its own even if the metadata documents are unreachable.

**Audience.** Autonomous agents and assistant integrations acting for a
signed-in CookieYes account holder. There is no agent-only account type:
an agent acts on the owner's delegated consent, never as its own
principal, and the owner must enable MCP access before it can connect.

**Registration endpoint.** Dynamic client registration (RFC 7591) at
`https://app.cookieyes.com/oauth2/register`. No pre-registration, no key
to request by hand and no approval step. The authorization server
metadata linked below is authoritative if this ever moves.

**Supported methods.** One: OAuth 2.1 authorization code with PKCE
(S256) against the authorization server `https://app.cookieyes.com`.
Grant types `authorization_code` and `refresh_token`; token endpoint auth
methods `none` (public clients) and `client_secret_basic`. There is no
client-credentials flow — every token is tied to a human who consented.

**Credential use.** Send the access token to the MCP endpoint as
`Authorization: Bearer <token>`; `bearer_methods_supported` is `header`
only. Tokens are audience-restricted to the MCP resource. Do not send one
to `www.cookieyes.com` — nothing on this host accepts or needs a
credential, so a token sent here is simply leaked. Refresh with the
refresh token and revoke at the revocation endpoint the authorization
server metadata publishes.

### Agent-identity profiles

None are implemented. The authorization server publishes no `agent_auth`
block, and there is no ID-JAG, verified-email or anonymous agent identity
to assert, claim or revoke. Dynamic client registration plus the account
owner's consent is the whole registration story; ordinary OAuth token
revocation is the whole revocation story.

### The metadata documents

Both are served by the host they describe, which is what makes them
valid — see the next section.

- Protected resource metadata: https://app.cookieyes.com/.well-known/oauth-protected-resource
  — carries `resource`, `authorization_servers`, `scopes_supported` and
  `bearer_methods_supported: ["header"]`.
- Authorization server metadata: https://app.cookieyes.com/.well-known/oauth-authorization-server
  — `issuer` is `https://app.cookieyes.com`, matching the value the
  protected resource metadata advertises.

## Why this domain publishes no OAuth or OIDC metadata

Deliberate, and not a gap. `/.well-known/openid-configuration` carries an
`issuer`, and `/.well-known/oauth-protected-resource` carries a `resource`;
in both cases the client must check that value against the host it fetched
the document from (OpenID Connect Discovery 1.0 §4.3, RFC 9728 §3.3) and
discard the document if they disagree.

Since the authorization server is `app.cookieyes.com`, a copy served here
would either name that host — and be discarded — or name this one, which
would falsely claim the marketing site issues tokens. A redirect fails the
same check. So the metadata is served only by the host it describes, and
this file is the pointer to it.

An agent-readiness scanner pointed at this domain will report OAuth
discovery as missing. That is a false negative.

## Human sign-in

- Log in: https://app.cookieyes.com/login?ref=CYM_authmd
- Create an account: https://app.cookieyes.com/signup?ref=CYM_authmd
- Account owners must enable MCP access before an agent can connect.

## Related

- [MCP server documentation](https://www.cookieyes.com/documentation/mcp-server/)
- [Connecting Claude](https://www.cookieyes.com/documentation/mcp-server-claude/)
- [Server Card](https://www.cookieyes.com/.well-known/mcp/server-card.json) — machine-readable capabilities
- [Agent guide](https://www.cookieyes.com/agent.md) — rules, rate limits and entry points
