Home / Integrations / Claude Code

Use Intercept with Claude Code

Add policy enforcement to Claude Code in one line.

Config file: .mcp.json at project root. User-level: ~/.claude.json

A standard MCP server in your Claude Code config -- no controls.

.mcp.json
{
  "mcpServers": {
    "stripe": {
      "command": "npx",
      "args": ["-y", "@stripe/mcp-server"],
      "env": {
        "STRIPE_SECRET_KEY": "sk_live_..."
      }
    }
  }
}

Wrap the server command with Intercept. Same config structure, policy enforced.

.mcp.json
{
  "mcpServers": {
    "stripe": {
      "command": "npx",
      "args": [
        "-y", "@policylayer/intercept",
        "-c", "policy.yaml",
        "--",
        "npx", "-y", "@stripe/mcp-server"
      ],
      "env": {
        "STRIPE_SECRET_KEY": "sk_live_..."
      }
    }
  }
}

CLI alternative:

TERMINAL
claude mcp add stripe --scope project -- npx -y @policylayer/intercept -c policy.yaml -- npx -y @stripe/mcp-server
Rate limits
Cap tool calls per minute, hour, or day
Access controls
Allow, deny, or conditionally gate any tool
Spend caps
Limit financial operations with daily thresholds
Audit logs
Full trace of every tool call and policy decision
policy.yaml
version: "1"
default: deny

tools:
  list_customers:
    rules:
      - action: allow
        rate_limit: 30/minute

  create_refund:
    rules:
      - name: "daily cap"
        rate_limit: 10/day

  delete_repository:
    rules:
      - action: deny
npx -y @policylayer/intercept
github.com/policylayer/intercept →
// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.