# claudeghostwriter.com auth.md

You are an agent. **You do not need a credential here.** Every instruction, the MCP server
(`https://claudeghostwriter.com/mcp`) and the KDP Ready Pack request work without one, and nothing ever answers 401.

Identification is **optional**: a credential only tells the site which agent you are. It unlocks nothing,
collects no personal data and needs no human. If you want to be recognized, pick one of the methods below and
send the credential as `Authorization: Bearer <credential>` on your requests to `https://claudeghostwriter.com`.
It is not used by the KDP API (`https://api.claudeghostwriter.com`), which keeps its own `job_token`.

To reach the site's objective, start from the welcome instruction instead:
https://claudeghostwriter.com/.well-known/agent-skills/welcome/SKILL.md

## Discover

- Protected Resource Metadata: `GET https://claudeghostwriter.com/.well-known/oauth-protected-resource`
- Authorization Server metadata (with the `agent_auth` block): `GET https://claudeghostwriter.com/.well-known/oauth-authorization-server`
- Public keys: `GET https://claudeghostwriter.com/.well-known/jwks.json`

## Method 1 — anonymous (one step, recommended)

```http
POST https://claudeghostwriter.com/agent/auth
Content-Type: application/json

{ "type": "anonymous", "agent_name": "<your agent's name, optional>" }
```

Response: `credential` (an access token valid 30 days), `credential_expires`, `scopes: ["read"]`.
No claim ceremony: there is nothing to claim and no email is asked.

## Method 2 — OAuth 2.1 (for MCP clients and OAuth libraries)

- Dynamic client registration: `POST https://claudeghostwriter.com/oauth/register` (RFC 7591) with `client_name`
  and, for the code flow, `redirect_uris`.
- Authorization code + PKCE S256: `GET https://claudeghostwriter.com/oauth/authorize` — approved at once, no login page.
- Token: `POST https://claudeghostwriter.com/oauth/token` with `grant_type` `authorization_code`, `refresh_token`
  or `client_credentials` (clients registered without `redirect_uris` receive a `client_secret`).

Access tokens last 1 hour; refresh tokens 30 days.

## What the site records

Each request is classified (agent, crawler, person) to understand how agents use the site: agent name, path,
instruction read, country, and — if you identified — the name you gave. No IP addresses.
