Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    mcp semantic firewall policy generator

    1

    Generate portable, fail-closed security policy files for MCP agents to prevent unauthorized destructive tool calls.

    $14

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    mcp semantic firewall policy generator

    mcp semantic firewall policy generator

    Example session with this skill installed

    Generate a policy for my MCP database server. I want to allow all reads, but any delete affecting more than 5 rows needs human approval via our PagerDuty API. Use AgentFence YAML format.

    • Read your context and instructions
    • Compiled the mcp semantic firewall

    I have inventoried the database tools and mapped them to blast-radius tiers. The resulting policy uses an explicit-deny-wins evaluation order and includes a cumulative session window to prevent threshold bypasses.

    MCP Semantic Firewall Policy

    
    # Generated by MCP Semantic Firewall Policy Generator
    # Schema Version: 2026-08-06
    # Integrity Hash: 5e8f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f
    # Target Enforcer: AgentFence
    
    defaults:
      decision: ask
      evaluation_order: explicit-deny-wins
    
    tools:
      - name_pattern: "read_*"
        decision: allow
        classification: low-sensitivity-read
        wildcard_reinventory_required: true
    
      - name_pattern: "delete_*"
        decision: ask
        classification: destructive-write
        constraints:
          - field: "row_count"
            operator: "gt"
            value: 5
        cumulative_scope: session
        cumulative_limit: 20
        approval_channel: "pagerduty://service/P12345/trigger"
        verification: "empirical_dry_run"
    
      - name_pattern: "*"
        decision: deny
    

    Next steps
    1.

    Pin the Hash: Store the Integrity Hash in your CI/CD secrets or a protected config store. Configure your enforcer to fail if the file's current SHA-256 (canonicalized) does not match this pin.
    2.

    Set Write Permissions: Ensure the filesystem path for this YAML is owned by a root or ops identity and is read-only for the service account running the agent.
    3.

    Wire PagerDuty: Confirm the approval_channel URI is correctly routed in your gateway to trigger the specific escalation policy.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Most MCP tool security relies on agent reasoning, which fails if the agent is compromised or over-confident. This skill generates the technical config layer that agents cannot bypass: a portable, static approve/deny/human-in-the-loop policy file. It treats tool risk as a function of blast radius and reversibility, not just tool names, producing machine-readable artifacts that enforcers like AgentFence or custom proxies can consume.

    What it does

    • Inventory and classification identifies every tool in the stack and maps it to blast-radius categories like single-record, bulk, or cross-system.
    • Fail-closed policy generation emits a neutral JSON schema where unmatched calls default to deny or ask, never allow.
    • Integrity hardening computes canonicalized content hashes (SHA-256) and schema versions to detect unauthorized policy modifications by the agent.
    • Cumulative tracking defines session and window-based limits to prevent "salami slicing" attacks where multiple small calls evade single-call thresholds.
    • Enforcer mapping translates the neutral policy into specific formats for AgentFence, OPA Rego, or custom gateways.

    How it works

    1. Inventory tools by reading their handler signatures to determine what they can do, rather than what they are named.
    2. Draft rules in a human-readable table to define thresholds for auto-approval versus human-in-the-loop escalation.
    3. Generate artifacts by producing the hardened JSON policy file and specific enforcer mappings.
    4. Deploy and verify by following provided guidance to store policies and reference hashes in locations inaccessible to the agent.

    Frameworks & tools

    This skill produces artifacts compatible with the Model Context Protocol (MCP). It supports output formats for AgentFence, Open Policy Agent (OPA/Rego), and standard JSON/YAML enforcers.

    Why this beats prompting it yourself

    Prompt-based constraints are suggestions the agent can ignore when under pressure or compromised. This skill produces a technical config artifact that sits outside the agent's reasoning loop, providing a verifiable "semantic firewall" that works even if the agent is actively trying to bypass it.

    Use cases

    • Restricting destructive database writes to require human approval via a specific Slack channel.
    • Preventing an agent from "salami slicing" a bulk delete into fifty single-row calls.
    • Hardening a production MCP deployment against self-modifying policy attacks.
    • Translating informal company rules into versioned, machine-readable security policies.

    Known limitations

    Does not provide a running proxy or interceptor; you must provide the enforcer. Requires an external human-in-the-loop channel for escalation rules to be effective.

    Does not include a running proxy or middleware service. Buyer must provide the enforcer and an external human-in-the-loop approval channel.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Requires

    Tool Permission Scoper MCP

    Permissions

    Network Access
    Listed1 month ago
    Updated1 month ago

    What's inside

    Frequently Asked Questions

    A system prompt asks the model to behave; a policy file is read by a separate enforcer that approves, denies or escalates each tool call, so it does not depend on the model complying. This skill produces that policy file. It does not run anything: an enforcer (a proxy, gateway or your own code) must load and apply it, and the agent must not be able to edit the policy. The skill includes deployment guidance and a content hash so tampering is detectable.

    The skill produces portable JSON/YAML artifacts compatible with the Model Context Protocol (MCP) and can export specific logic for AgentFence, Open Policy Agent (Rego), or custom proxy gateways.

    The policy defines cumulative limits per session or time window, so a bulk action cannot be split into many small ones in the policy's terms. Your enforcer has to keep the running total and apply the limit. This skill generates the rules; it does not track calls.

    The skill instructions and two dated reference files (a landscape of existing MCP policy tools and policy-as-code precedent). When you use it, your agent writes a policy for your tools, a content hash, deployment guidance, and a mapping to your enforcer's format (AgentFence-style YAML, OPA Rego or generic JSON). There is no bundled engine or template library.

    No, this skill generates the security configuration and logic; you must have an enforcement layer (like a proxy or middleware) in place to read the policy and intercept the agent's tool calls.

    The skill performs a 'handler signature' analysis, looking at what the tools actually do (e.g., database writes vs. reads) rather than relying on potentially misleading tool names.

    New in LLM Ops