# Local Water & Mold auth.md

You are an agent. You don't need to authenticate to use Local Water & Mold. Every page, the JSON API (https://localwatermold.com/api/v1/) and the MCP server (https://localwatermold.com/mcp) are public and read-only, and requests without credentials are always accepted.

Some agent platforms require OAuth before they'll call a server, so this site runs a small OAuth 2.1 authorization server. A token grants the single scope `public.read`, which is the same access everyone already has. There are no user accounts, and registering shares nothing about you or your user.

## Discover

- Protected resource metadata (RFC 9728): https://localwatermold.com/.well-known/oauth-protected-resource (for the MCP server: https://localwatermold.com/.well-known/oauth-protected-resource/mcp)
- Authorization server metadata (RFC 8414): https://localwatermold.com/.well-known/oauth-authorization-server, with an `agent_auth` block
- Signing keys: https://localwatermold.com/.well-known/jwks.json

## Register (anonymous)

Only anonymous registration is supported. There's no user identity to assert and nothing to claim.

```http
POST https://localwatermold.com/agent/register
Content-Type: application/json

{ "type": "anonymous" }
```

The response has an `identity_assertion` (a JWT, valid for 30 days) and its scopes.

## Exchange it for an access token

```http
POST https://localwatermold.com/oauth/token
Content-Type: application/x-www-form-urlencoded

grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=<identity_assertion>
```

You get `{ "access_token", "token_type": "Bearer", "expires_in": 3600, "scope": "public.read" }`. Repeat this step when it expires; register again when the assertion expires or the token endpoint returns `invalid_grant`.

## Use it

Send `Authorization: Bearer <access_token>` to https://localwatermold.com/mcp or https://localwatermold.com/api/v1/. An invalid or expired token gets a 401 with a `WWW-Authenticate` header pointing to the resource metadata. Leaving the header off always works.

## MCP clients

Standard MCP clients can use dynamic client registration (https://localwatermold.com/oauth/register) and the authorization code flow with PKCE (S256) at https://localwatermold.com/oauth/authorize. The consent page asks a person to allow read-only access; there's no sign-in.

## Claim and revocation

The claim ceremony doesn't apply: there are no accounts to claim an anonymous registration into, so https://localwatermold.com/agent/claim always answers `claim_not_supported`. Tokens can't be revoked individually; access tokens expire after an hour.

Questions: hello@localwatermold.com. Developer guide: https://localwatermold.com/developers/
