Add recommended security policies for MCP server#352
Open
L1AD wants to merge 1 commit intostripe:mainfrom
Open
Add recommended security policies for MCP server#352L1AD wants to merge 1 commit intostripe:mainfrom
L1AD wants to merge 1 commit intostripe:mainfrom
Conversation
Three YAML policy presets for use with PolicyLayer Intercept, an open-source MCP proxy that enforces rate limits, spend caps, and access control on tool calls.
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, spend caps, and access control on tool calls.
The Stripe MCP server exposes 27 tools — including
create_refund,finalize_invoice,cancel_subscription, andcreate_payment_link— which can move money or destroy data. Restricted API Keys control which tools appear, but there's no rate limiting, spend capping, or audit logging on how those tools are used once available.These policies add that layer without any changes to the server itself.
What's included
recommended.yaml — good starting point:
create_refund,finalize_invoice): 3/minute burst + daily capscancel_subscription): 2/minute burst + 10/day capcreate_customer,create_product, etc.): 30/hourstrict.yaml — for production/compliance:
permissive.yaml — for development:
Usage
Wrap the MCP server with Intercept (one line):
npx -y @policylayer/intercept \ --policy policies/recommended.yaml \ -- npx -y @stripe/mcp --api-key=$STRIPE_SECRET_KEYOr in Claude Desktop config:
{ "mcpServers": { "stripe": { "command": "npx", "args": [ "-y", "@policylayer/intercept", "--policy", "policies/recommended.yaml", "--", "npx", "-y", "@stripe/mcp", "--api-key", "sk_..." ] } } }Why this matters
RAKs control access but not behaviour. An agent with
create_refundpermission can issue unlimited refunds with no rate limit, no daily cap, and no audit trail. These policies add deterministic, transport-layer enforcement that complements RAK permissions.About PolicyLayer Intercept
@policylayer/intercept