# Authentication — Fetchgate

Fetchgate has **no user accounts, no registration, no login, and no OAuth
flow**. There is nothing for an agent to "sign up" for or register on behalf
of a user — every endpoint below is reached with per-request credentials (or
none at all). If you were looking for an OAuth client-registration or
account-creation endpoint, it does not exist; this document describes the
real, current access model instead.

There are three independent ways to access this API, and which ones apply
depends on which endpoint you're calling:

## 1. Reader endpoints — `GET https://fetchgate.dev/v1/read`, `GET https://fetchgate.dev/v1/meta`

These accept any of the following, checked in this order:

- **Bearer API key.** Send `Authorization: Bearer <token>`. Honesty note:
  today this is a **stub**, not a verified key system — the server only
  checks that a non-empty token was supplied, not that it corresponds to a
  real account or plan. Any non-empty bearer token currently bypasses the
  free-tier rate limit. Do not rely on this as an access-control boundary;
  treat it as "reserved for a future real key system," not as proof of
  purchase or identity today.
- **No credential (free tier).** Omit the `Authorization` header entirely.
  Limited to roughly 30 requests/day per source IP, tracked server-side and
  reset daily. No signup, token, or registration step of any kind.
- **x402 micropayment.** Once the free-tier limit is hit (or to skip it
  entirely), call the endpoint with no auth. The server responds
  `402 Payment Required` with an x402 `accepts` array describing the exact
  payment terms (amount in USDC, network, payee address). Sign an EIP-3009
  `transferWithAuthorization` with your wallet, base64-encode the resulting
  x402 payment payload, and retry the identical request with an
  `X-PAYMENT` header. No account or key is created or required — payment is
  wallet-to-wallet per call, verified and settled via the configured x402
  facilitator. See https://fetchgate.dev/llms.txt for the full flow and current prices.

## 2. Storefront — `GET https://fetchgate.dev/v1/buy/:id`

**x402 payment only.** There is no API-key path for the storefront and no
free tier — every purchase requires a wallet-signed x402 payment, following
the same 402-challenge / `X-PAYMENT`-retry flow described above. On success
you get back a signed, time-limited download URL (https://fetchgate.dev/v1/download/:id)
that is itself the proof of purchase — no account, session, or login exists
to "own" a purchase; possession of that URL (valid for 15 minutes) is the
only access control. If you don't hold a wallet capable of x402, use the
product's `humanUrl` from `GET https://fetchgate.dev/v1/products` for a plain,
non-wallet checkout instead (a hosted Gumroad page, not part of this API).

`GET https://fetchgate.dev/v1/products` itself (the catalog listing) requires no
authentication at all — it's public.

## 3. MCP endpoint — `POST https://fetchgate.dev/mcp`

The MCP server exposes ten tools over a single JSON-RPC endpoint. There is
no separate auth layer for MCP: each tool call enforces the *same* rule as
its HTTP-route equivalent, checked per call rather than per connection —

- `read_url`, `get_metadata` — same free-tier IP limit, same Bearer-token
  stub, same x402 challenge as `/v1/read` / `/v1/meta` above.
- `list_products`, `get_purchase_info` — ungated, mirroring the public
  `/v1/products` catalog and the pre-payment leg of `/v1/buy/:id`.

There is no MCP-level API key, session token, or initialize-time credential
exchange — `initialize` itself is unauthenticated, and auth (if any) is
supplied per `tools/call` the same way it would be supplied to the
corresponding HTTP route.

## Summary

| Surface | No credential | Bearer API key (stub) | x402 payment |
| --- | --- | --- | --- |
| `/v1/read`, `/v1/meta` | Free tier, ~30/day/IP | Bypasses free-tier limit (unverified) | Per-call, after free tier or instead of it |
| `/v1/products` | Always public | n/a | n/a |
| `/v1/buy/:id` | Not available | Not available | Required |
| `/mcp` (`read_url`/`get_metadata`) | Same as HTTP reader endpoints | Same as HTTP reader endpoints | Same as HTTP reader endpoints |
| `/mcp` (`list_products`/`get_purchase_info`) | Always ungated | n/a | n/a |

No registration, account creation, or OAuth flow exists anywhere on this
API. Machine-readable references: [`/llms.txt`](https://fetchgate.dev/llms.txt),
[`/openapi.json`](https://fetchgate.dev/openapi.json),
[`/.well-known/api-catalog`](https://fetchgate.dev/.well-known/api-catalog).
