Add recommended security policies for tool-level enforcement#346
Open
L1AD wants to merge 1 commit intocloudflare:mainfrom
Open
Add recommended security policies for tool-level enforcement#346L1AD wants to merge 1 commit intocloudflare:mainfrom
L1AD wants to merge 1 commit intocloudflare:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds three YAML policy files for use with PolicyLayer Intercept, an open-source MCP proxy that enforces rate limits, daily caps, and access control on individual tool calls.
The Cloudflare MCP servers expose tools that can delete D1 databases, R2 storage buckets, KV namespaces, and Hyperdrive configurations — as well as execute arbitrary commands in sandbox containers and run GraphQL queries against your account. Cloudflare OAuth controls which tools an agent can access, but not how aggressively it uses them once access is granted.
These policies add that layer without any changes to the servers themselves.
What's included
recommended.yaml — good starting point:
kv_namespace_delete,r2_bucket_delete,d1_database_delete,hyperdrive_config_delete,container_file_delete): blocked entirely*_create): 3–5/min burst, 10–20/hour capcontainer_exec): 10/min burst, 60/hour capstrict.yaml — read-only mode:
permissive.yaml — for development:
Usage
Wrap the MCP server with Intercept (one line):
Or in your MCP client config:
{ "mcpServers": { "cloudflare-bindings": { "command": "npx", "args": [ "-y", "@policylayer/intercept", "--policy", "policies/recommended.yaml", "--", "npx", "mcp-remote", "https://bindings.mcp.cloudflare.com/mcp" ] } } }Also added a README section under "Tool-level policy enforcement" before the "Paid Features" section.
About PolicyLayer Intercept
@policylayer/intercept