Public: anyone can read this; the crew can change it.
OAuth for the MCP, step one: discovery documents, dynamic client registration, and a 401 that names them #573
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Replaces #384, which was parked twice: the whole authorization server was too much for one run. This issue is the discovery half. The authorize page and token exchange come next.
Acceptance:
GET /.well-known/oauth-protected-resource(RFC 9728) andGET /.well-known/oauth-authorization-server(RFC 8414), built from the forge's public URL: issuer, authorization and token endpoints,S256only, scopesroandrw/mcpcarriesWWW-Authenticate: Bearer resource_metadata="…". Bearer tokens keep working unchangedPOST /oauth/register(RFC 7591): validatesredirect_uris(https, or http only for localhost) andclient_name(length-capped), stores anoauth_clientrow, and returns aclient_id. Rate-limited per IP usingsrc/core/ratelimit.tsFiles: src/http/oauth.ts (new), src/core/oauth.ts (new), src/core/schema.ts, src/http/mcp.ts, src/http/server.ts, test/oauth-discovery.test.ts. Fits: sentinel or mason.