Skip to content

feat: restore notification scopes; raise MAX_SCOPES to 78 - #143

Merged
mattzcarey merged 1 commit into
mainfrom
feat/restore-notification-scopes
Jun 3, 2026
Merged

feat: restore notification scopes; raise MAX_SCOPES to 78#143
mattzcarey merged 1 commit into
mainfrom
feat/restore-notification-scopes

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Restores notification:read + notification:write (removed in #139) and raises MAX_SCOPES from 76 to 78.

Why restore notifications

#139 removed them on the assumption that logs.read/logs.write covered notifications. On the live bach branch they do not — no scope the client retains carries com.cloudflare.api.account.notification.* perms. So the removal was a real capability loss (users could no longer manage notification policies via MCP). This restores them.

Why raise MAX_SCOPES to 78

Restoring both notification scopes pushes the yolo (full-access) template to 78. The old MAX_SCOPES=76 was a conservative guess at the server-side limit.

Validated on staging: deployed this build to staging.mcp.cloudflare.com and confirmed the OAuth grant and live API calls (GET /zones) succeed with the full 78-scope template — no "Something went wrong!". So 78 is accepted server-side. Raised the constant to match reality.

Changes

  • scopes.tsALL_SCOPES 78→80; yolo 76→78; MAX_SCOPES 76→78 (+ comment updated)
  • scopes.test.tsREGISTERED_SCOPES += notification:read/write
  • workers-oauth-utils.ts — consent-UI notification resource (Networking)

Verification

  • All 188 tests pass (incl. the MAX_SCOPES template-bound test, now 78/78)
  • Staging deploy + OAuth grant + API call verified live

Dependency

Terraform MR !120 (cloudflare/iam) already restores notification:read/notification:write on the OAuth client registration, so the scopes are grantable.

Re-adds notification:read + notification:write to ALL_SCOPES,
REGISTERED_SCOPES, and the consent-UI maps. They were removed in #139 on the
incorrect assumption that logs.* covered notifications — on the live bach
branch nothing else the client retains carries account.notification perms, so
the removal was a real capability loss.

This pushes the yolo (full-access) template to 78 scopes. Verified on staging
(staging.mcp.cloudflare.com) that the OAuth grant + live API calls succeed
with the full 78-scope template — so the previous MAX_SCOPES=76 ceiling was
conservative. Raised MAX_SCOPES to 78 to match the validated server behavior.

- scopes.ts: ALL_SCOPES 78→80; yolo 76→78; MAX_SCOPES 76→78
- scopes.test.ts: REGISTERED_SCOPES += notification:read/write
- workers-oauth-utils.ts: consent-UI notification (Networking)

All 188 tests pass; staging deploy verified.
@mattzcarey
mattzcarey force-pushed the feat/restore-notification-scopes branch from 5d948fc to eeca0e4 Compare June 3, 2026 19:55
@mattzcarey
mattzcarey marked this pull request as ready for review June 3, 2026 19:55
@mattzcarey mattzcarey changed the title feat: restore notification scopes (staging capacity experiment) feat: restore notification scopes; raise MAX_SCOPES to 78 Jun 3, 2026
@mattzcarey
mattzcarey merged commit 2c3a470 into main Jun 3, 2026
5 checks passed
@mattzcarey
mattzcarey deleted the feat/restore-notification-scopes branch June 3, 2026 19:56
danielbodnar pushed a commit to danielbodnar/mcp that referenced this pull request Jun 10, 2026
* feat: add OAuth protected resource metadata (RFC 9728)

Add resourceMetadata config to OAuthProvider for the
/.well-known/oauth-protected-resource endpoint. Bump
workers-oauth-provider to PR cloudflare#136 build which implements
the endpoint.

* chore: upgrade workers-oauth-provider to PR 143 preview

Includes both RFC 9728 changes:
- /.well-known/oauth-protected-resource endpoint (cloudflare#136)
- resource_metadata in WWW-Authenticate headers (cloudflare#143)

* chore: bump workers-oauth-provider to v0.2.4 (released)

Replace pkg.pr.new preview build with the released v0.2.4 which
includes RFC 9728 support (cloudflare#136, cloudflare#143), RFC 8252 loopback port
flexibility for native apps (cloudflare#145), and other fixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant