Cloudflare has put WriteGuard into private beta: a policy, attribution, and audit layer that sits between its MCP server portal and every connected tool, classifying each call by risk tier and intercepting writes before they execute. The problem it solves is concrete. Cloudflare's own engineering blog describes an internal incident in which a background agent running under an engineer's OAuth identity closed thousands of Jira tickets in an afternoon — at a pace no human could sustain — before anyone caught it. The system logged every action under the engineer's name with no way to separate human from agent.

WriteGuard intercepts all incoming MCP requests at the portal layer, loads the policy bound to the targeted tool, and decides: pass unchanged, enrich with attribution and emit an audit event, or block before execution. Policy is defined in TypeScript alongside the tool configuration—no changes to the MCP server itself. That matters at scale. Cloudflare's internal portal grew from 13 connected servers in April 2026 to 27 today, spanning GitLab, Jira, an internal wiki, Google Workspace, and operational systems. Building the same controls into each server independently would produce inconsistent behavior across every new server added.

WriteGuard intercept flow: every MCP request is classified by risk tier before reaching the tool.
FIG. 02 WriteGuard intercept flow: every MCP request is classified by risk tier before reaching the tool. — blog.cloudflare.com/mcp-portal-writeguard-private-beta

Risk tiers drive the routing logic. Read-only calls (searching issues, reading a merge request, viewing pipeline status) pass through unchanged. Minimal-impact calls (adding a reaction, marking a notification as read) are logged. Contained writes (creating a merge request, adding a comment, updating an issue field) get agent attribution injected into the downstream application in the format that application accepts, plus an async audit event. Critical operations (merging to main, triggering a production deployment, bulk-deleting records) are blocked outright before execution. Tiers are configurable per tool; a merge_mr tool classified as Critical will never execute without an explicit policy allowing it.

Risk TierExample OperationsWriteGuard Action
Read-onlySearch issues, read a merge request, view pipeline statusPass unchanged — no logging overhead
Minimal-impactAdd a reaction, mark a notification as readPass + emit async audit event
Contained writeCreate a merge request, add a comment, update an issue fieldInject agent attribution into downstream app + emit async audit event
CriticalMerge to main, trigger production deployment, bulk-delete recordsBlocked before execution — policy must explicitly allow
FIG. 03 WriteGuard risk tiers: classification, example operations, and enforced action — blog.cloudflare.com/mcp-portal-writeguard-private-beta

Identity threading is the hard part. WriteGuard does not introduce standalone agent accounts. Internal MCP servers already use Cloudflare Access and OAuth to identify users, so agents inherit the human's permissions—if the engineer cannot close a particular issue, the agent cannot either. But inheritance alone does not solve attribution. The audit trail appends MCP client and session context to the human identity, so the log distinguishes "Joe, Claude Code, session abc123" from "Joe, browser." Audit events are sent asynchronously—adding zero latency to the tool call path—and are scrubbed of secret-bearing key values. Each event records: server, tool, risk tier, outcome, user, client, and duration.

Audit FieldWhat It Captures
serverWhich MCP server handled the call
toolThe specific tool invoked (e.g. merge_mr, create_comment)
risk tierTier classification applied to the call
outcomeResult: passed, enriched, or blocked
userHuman identity (OAuth), e.g. "Joe"
clientMCP client in use, e.g. "Claude Code, session abc123"
durationHow long the tool call took to complete
FIG. 04 Fields recorded in every WriteGuard audit event (sent asynchronously, secret values scrubbed) — blog.cloudflare.com/mcp-portal-writeguard-private-beta

The timing reflects broader pressure. Security researchers have found over 21,000 internet-facing MCP server instances, with approximately 92% lacking basic OAuth authentication. The MCP 2026-07-28 specification shifted to stateless architecture and introduced mandatory HTTP headers (Mcp-Protocol-Version, Mcp-Method, Mcp-Name) that let Cloudflare Gateway detect shadow MCP traffic—employees connecting local agents directly to unapproved external servers—at the network layer. WriteGuard is the server-side complement: because the control lives at the server, an end user cannot bypass it by switching clients or disabling a local hook.

Metric / HeaderValue / Purpose
Internet-facing MCP server instances (researchers)> 21,000
Instances lacking basic OAuth authentication~92%
Cloudflare internal MCP portal servers — April 202613
Cloudflare internal MCP portal servers — current27
Mcp-Protocol-Version (new header)Identifies MCP traffic version at the network layer
Mcp-Method (new header)Identifies the MCP method being called
Mcp-Name (new header)Identifies the tool or resource name being invoked
FIG. 05 MCP ecosystem security snapshot and new MCP 2026-07-28 spec headers used by Cloudflare Gateway — blog.cloudflare.com/mcp-security-updates; infoq.com/news/2026/08/cloudflare-writeguard-mcp-safety

Private beta is live; GA timeline is unspecified. Cloudflare wants to validate how the risk model maps to customer tools, which downstream applications need specific attribution formats, and what audit delivery guarantees production customers require before broad rollout.

For architects shipping internal tool-calling agents, the implicit security model—"the agent has the user's permissions, so it's fine"—breaks the moment an agent acts at machine speed on a too-broad prompt. WriteGuard is table stakes. Build the risk tier classification into your tool definitions before you wire write access into any agent pipeline.