Problem
toolcraft/http can protect an MCP resource with oauth, publish RFC 9728 metadata, and verify access tokens, but Toolcraft currently does not provide a production OAuth 2.1 authorization-server adapter for applications that need to authorize their own users.
A multi-user Baby Daybook MCP deployment needs each MCP caller to authorize a separate upstream account. A shared server credential or static bearer token is not acceptable. The MCP client must be able to discover and complete a standards-based authorization-code flow, and Toolcraft's verified context.auth.subject must then select the caller's request-scoped service.
The bundled mcp-oauth package is client-focused. tiny-http-mcp-server accepts an external authorization server/verifier but does not create the authorization server.
Requested capability
Please add a supported production authorization-server package/adapter that composes with createHTTPMCPServer / runHTTPMCP, including:
- OAuth 2.1 authorization code with PKCE
- authorization-server metadata
- dynamic client registration for MCP clients
- exact redirect URI validation
- resource indicators / audience-bound access tokens
- short-lived signed access tokens and JWKS publication
- refresh-token rotation and replay detection
- revocation
- durable storage interfaces for clients, grants, codes, tokens, and user authorization transactions
- hooks for application-owned browser authorization UI
- CSRF/state/nonce helpers and secure cookie defaults
- request-scoped subject propagation compatible with Toolcraft
requestServices
- production security documentation and conformance/interoperability tests
Application hook required
The authorization interaction must support an application-defined, one-time credential completion step. For Baby Daybook Apple accounts, Apple redirects through Baby Daybook's registered endpoint and returns an Android intent://callback?... credential. The hosted authorization page needs to let the user paste that one-time callback, validate its state against the pending OAuth transaction, exchange it immediately, and never log or persist the callback itself.
Email/password users can authenticate through the same application hook; the password is exchanged and discarded, while only an encrypted upstream refresh token is retained per OAuth subject.
Security invariant
Two OAuth subjects must never be able to load, refresh, invoke tools with, revoke, or otherwise access each other's upstream sessions. There must be no fallback to a shared environment credential.
Problem
toolcraft/httpcan protect an MCP resource withoauth, publish RFC 9728 metadata, and verify access tokens, but Toolcraft currently does not provide a production OAuth 2.1 authorization-server adapter for applications that need to authorize their own users.A multi-user Baby Daybook MCP deployment needs each MCP caller to authorize a separate upstream account. A shared server credential or static bearer token is not acceptable. The MCP client must be able to discover and complete a standards-based authorization-code flow, and Toolcraft's verified
context.auth.subjectmust then select the caller's request-scoped service.The bundled
mcp-oauthpackage is client-focused.tiny-http-mcp-serveraccepts an external authorization server/verifier but does not create the authorization server.Requested capability
Please add a supported production authorization-server package/adapter that composes with
createHTTPMCPServer/runHTTPMCP, including:requestServicesApplication hook required
The authorization interaction must support an application-defined, one-time credential completion step. For Baby Daybook Apple accounts, Apple redirects through Baby Daybook's registered endpoint and returns an Android
intent://callback?...credential. The hosted authorization page needs to let the user paste that one-time callback, validate its state against the pending OAuth transaction, exchange it immediately, and never log or persist the callback itself.Email/password users can authenticate through the same application hook; the password is exchanged and discarded, while only an encrypted upstream refresh token is retained per OAuth subject.
Security invariant
Two OAuth subjects must never be able to load, refresh, invoke tools with, revoke, or otherwise access each other's upstream sessions. There must be no fallback to a shared environment credential.