Workers OAuth Provider
CloudflareWorkers OAuth Provider is a TypeScript library that makes a Cloudflare Worker an OAuth 2.1 authorization server and resource server for HTTP APIs and remote MCP servers. It registers clients through pre-registration, Client ID Metadata Documents or dynamic registration, issues and validates audience-bound tokens, and supports token exchange for narrower tokens. Cloudflare builds it.
Openness
5 high confidence- license
- MIT (OSI)
- source
- public
- core features withheld
- no — the 85-path tree at dbd149a carries one MIT LICENSE.txt with no ee/, enterprise/, commercial/ or proprietary/ path; Cloudflare Access is offered as a separate sign-in option beside the library
- deployment
- Workers runtime (needs a Workers runtime and a KV namespace; workerd, Cloudflare's Apache-2.0 runtime, self-hosts Workers applications and serves KV namespaces)
The library is MIT licensed, and its repository holds the whole authorization server and resource server. It needs the Workers runtime, which Cloudflare sells as a hosted platform but also publishes as workerd for self-hosting, and Cloudflare Access is a separate paid sign-in option rather than a part withheld from the code.
- https://api.github.com/search/repositories?q=repo:cloudflare/workerd recorded 2026-11-20
cloudflare/workerd: license Apache-2.0, "The JavaScript / Wasm runtime that powers Cloudflare Workers".
- https://api.github.com/search/repositories?q=repo:cloudflare/workers-oauth-provider recorded 2026-11-20
cloudflare/workers-oauth-provider: public, not archived, not a fork, license MIT, pushed 2026-11-17, "OAuth provider library for Cloudflare Workers".
- https://developers.cloudflare.com/agents/model-context-protocol/authorization/ recorded 2026-11-20
"Cloudflare's Workers OAuth Provider implements both sides of MCP authorization on Workers"; separately, "Cloudflare Access can sign users in to your MCP server" if they "match your Access policies".
- https://raw.githubusercontent.com/cloudflare/workerd/main/README.md recorded 2026-11-20
workerd can be used "As an application server, to self-host applications designed for Cloudflare Workers"; with --experimental it accepts kv_namespaces.
- https://raw.githubusercontent.com/cloudflare/workers-oauth-provider/main/LICENSE.txt recorded 2026-11-20
MIT License, "Copyright (c) 2025 Cloudflare, Inc."
- https://raw.githubusercontent.com/cloudflare/workers-oauth-provider/main/package.json recorded 2026-11-20
The package manifest for @cloudflare/workers-oauth-provider declares "license": "MIT".
Adoption
4 medium confidenceAdoption is counted as npm downloads of @cloudflare/workers-oauth-provider over the trailing month, the library's only package. Downloads include build and CI installs and cannot show how many authorization servers run on it.
- https://api.npmjs.org/downloads/point/last-month/@cloudflare/workers-oauth-provider recorded 2026-11-20
"downloads":4713247 for "@cloudflare/workers-oauth-provider" between "2026-10-20" and "2026-11-18".
- https://registry.npmjs.org/@cloudflare/workers-oauth-provider/latest recorded 2026-11-20
@cloudflare/workers-oauth-provider 1.2.4, "license": "MIT", repository "git+https://github.com/cloudflare/workers-oauth-provider.git".
Capability
2 medium confidenceWorkers OAuth Provider gives each MCP client an identity of its own and lets a token be exchanged only for one with narrower scopes or a shorter life. Whether a given request or tool call is allowed is left to the developer's handler, and the library keeps no signed record of its decisions.
- https://raw.githubusercontent.com/cloudflare/workers-oauth-provider/main/docs/advanced-configuration.md recorded 2026-11-20
"Clients can exchange an existing access token for a token with narrower scopes or a shorter lifetime"; "The new token cannot exceed the subject token's scope ceiling or remaining lifetime."
- https://raw.githubusercontent.com/cloudflare/workers-oauth-provider/main/docs/authorization-server.md recorded 2026-11-20
Client registration "defines three ways for a client to obtain a client ID": pre-registration, CIMD and DCR; the provider implements none and private_key_jwt for CIMD clients.
- https://raw.githubusercontent.com/cloudflare/workers-oauth-provider/main/README.md recorded 2026-11-20
The handler "owns authorization beyond that: scopes, ownership, tenancy"; "the library advertises the required scopes but doesn't enforce them".
Verified 2026-11-20, except some scores, still awaiting re-confirmation