Live
Local Artifacts Support Lets Workers Test Repo Workflows Before DeployCo‑Packaged Optics Cut Power Use and Latency in Lambda’s 10k‑GPU AI ClusterScaling AI Agents on Kubernetes: New CNCF Projects and Operational ImplicationsGitHub Copilot model deprecation forces updates to AI‑assisted development pipelinesGitHub Copilot expands Enterprise Server access and adds new AI models – practical impact for engineersArchitecting Agentic Customer Engagement with Amazon Bedrock AgentCoreBuilding Multi‑Tenant Memory‑Aware Agents with Bedrock Agentic Retrieve and Managed Knowledge BaseBulk‑Start AI Scan for Up to 20 GitHub Repos: What Engineers Need to KnowLocal Artifacts Support Lets Workers Test Repo Workflows Before DeployCo‑Packaged Optics Cut Power Use and Latency in Lambda’s 10k‑GPU AI ClusterScaling AI Agents on Kubernetes: New CNCF Projects and Operational ImplicationsGitHub Copilot model deprecation forces updates to AI‑assisted development pipelinesGitHub Copilot expands Enterprise Server access and adds new AI models – practical impact for engineersArchitecting Agentic Customer Engagement with Amazon Bedrock AgentCoreBuilding Multi‑Tenant Memory‑Aware Agents with Bedrock Agentic Retrieve and Managed Knowledge BaseBulk‑Start AI Scan for Up to 20 GitHub Repos: What Engineers Need to Know
Cloudflare

Workers OAuth split API reaches v1: separate auth and resource Workers with Service Binding

AI SummaryPowered by AI

The Workers OAuth provider has reached v1 and now separates the authorization server and resource server into distinct Workers communicating via Service Binding. This architecture reduces external exposure, aligns with MCP 2026‑07‑28, and gives engineers finer control over security and operational policies.

The @cloudflare/workers-oauth-provider package has been promoted to version 1 and now exposes a split API: one Worker functions as the OAuth authorization server, while a separate Worker (or your existing MCP server) acts as the resource server. This change lets the two roles communicate over a Service Binding, keeping token validation off the public Internet and aligning with the MCP 2026‑07‑28 authorization specification.

Split API Overview

The new model separates concerns:

  • Authorization server Worker handles user sign‑in, token issuance, and supports client‑ID metadata documents and issuer identification as defined by MCP 2026‑07‑28.
  • Resource server (your MCP endpoint) validates incoming tokens by calling the authorization server via a Service Binding, eliminating external network hops.

Both workers can be deployed independently, each with its own WAF and rate‑limiting policies.

Implementation Considerations

Switching to the split API requires updating import statements to use OAuthAuthorizationServer and OAuthResourceServer from the package. The provided migration skill in the npm distribution can automate most code changes. Existing clients that rely on dynamic client registration or older token flows continue to work, so a full rewrite is not mandatory.

import { OAuthAuthorizationServer, OAuthResourceServer, insufficientScope } from "@cloudflare/workers-oauth-provider";

const authServer = new OAuthAuthorizationServer({
  issuer: "https://auth.example.com",
  resources: ["https://calendar.example.com/mcp"]
});

The insufficientScope() helper now returns a step‑up authorization response in a single call, simplifying scope escalation logic.

Operational and Security Implications

Running the two roles in separate Workers allows you to apply distinct security policies. For example, you might enforce stricter rate limits on the authorization endpoint while keeping the resource server more permissive for internal traffic. Because token validation occurs over a Service Binding, the traffic never leaves the edge network, reducing exposure to external attacks.

One authorization server can issue tokens for multiple MCP servers, which centralizes credential management but also creates a single point of trust. Monitoring should therefore focus on the health and security posture of the auth Worker, and you may want to implement health checks that verify token issuance and validation paths.

Related CloudNinjas coverage: security.

What This Means For Practitioners

Adopt the split API to isolate authentication logic, gain tighter control over edge security policies, and stay compliant with the latest MCP spec. Use the migration skill to upgrade existing deployments, verify that your Service Binding is correctly configured, and update any custom scope‑handling code to use insufficientScope(). Keep an eye on the upcoming releases of the Workers runtime for any enhancements to Service Bindings that could further reduce latency or improve observability.

Originally published atCloudflare Developer Platform