Warden: Governed MCP Gateway

    by Aqsa Siddiqui

    1

    Wrap any MCP server in a provenance-aware policy gateway that blocks data exfiltration and gates destructive calls, with an audit log written before every call runs.

    Free

    Security scanned

    Works with the AI Agents you already use

    Warden: Governed MCP Gateway

    Example session with this skill installed

    My support agent uses an MCP server with search_docs, get_customer, create_ticket, send_email and delete_customer. Put Warden in front of it so a poisoned doc or customer record can't get it to email data out.

    • Read your context and instructions
    • Compiled the warden

    Installed Warden in ~/.warden/venv and wrote ~/.warden/policies/support.yaml. Here's how I classified your tools. Please confirm:

    ToolSide effectRiskRetrieval?
    search_docsREAD_ONLYLOWyes
    get_customerREAD_ONLYMEDIUMno
    create_ticketLOCAL_WRITEMEDIUMno
    send_emailEXTERNAL_COMMSHIGHno
    delete_customerDESTRUCTIVECRITICALno

    What the policy will do

    • send_email after anything was read from a tool or doc: denied. From your own input only: asks you first.
    • delete_customer: always asks you first.
    • create_ticket, search_docs, get_customer: allowed.
    • Any tool not in the table: denied.

    Policy validated (policy OK). I replaced your server entry with:

    "support-governed": {
      "command": "/home/you/.warden/venv/bin/python",
      "args": ["-m", "warden.gateway",
        "--db", "/home/you/.warden/support.db",
        "--policy", "/home/you/.warden/policies/support.yaml",
        "--server-name", "support",
        "--", "python", "-m", "your_support_server"],
      "env": { "DEMO_EMAIL_API_KEY": "unused" }
    }
    

    Test run, then warden calls --db ~/.warden/support.db:

    TOOL         POLICY  RULE_ID                   EXEC     MATCHED_TAINT
    search_docs  ALLOW   read-only-allow           OK       []
    send_email   DENY    exfil-via-external-comms  NOT_RUN  [RETRIEVED, TOOL_OUTPUT:search_docs]
    

    The email was blocked because the session had read documents first. The agent only sees "This tool call was not permitted." Want to start in log-only mode (--variant UNGOVERNED) for a few days before enforcing?

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

    About this skill

    Agents get tricked less by clever instructions than by poisoned data they already trust: an attacker's address in a customer's "email on file" field, a tampered document the agent cites. This skill sets up Warden, a gateway that sits between your agent and an MCP server and stops content that came from tools or documents from flowing into tools that act on the outside world.

    What it does

    • Provenance tracking labels content entering the session as user input, tool output or retrieved documents.
    • Policy enforcement checks every tool call against a YAML policy before it is forwarded. Anything no rule allows is denied.
    • Human approval asks for a y/N on your terminal before destructive, code-execution or outbound tools run.
    • Audit log writes every call, decision, matching rule and provenance label to a local database before the call runs.
    • Schema drift check denies tools whose definition changed silently after approval.
    • Log-only mode records what the policy would block without blocking, so you can tune it first.

    How it works

    1. Installs Warden into its own Python 3.12 environment.
    2. Lists your MCP server's tools and helps you classify each one by risk and side effect (read-only, local write, external comms, code exec, credential access, destructive). You review the table.
    3. Writes the policy from an included template and validates it.
    4. Swaps the server entry in your Claude Code, Claude Desktop or Cursor config for the Warden-wrapped command.
    5. Shows you how to read the audit log and adjust.

    Why this beats prompting it yourself

    Safety instructions in a system prompt live inside the same context an attacker writes into. Warden enforces policy outside the model, in a proxy the model cannot talk its way past, and the dangerous attacks it targets contain no instruction to detect in the first place.

    Use cases

    • Stop an agent from emailing or posting data it read from a poisoned document or record.
    • Require confirmation before shell commands, deletions or secret access.
    • Keep a local log of what your agent did and why each call was allowed or blocked.
    • Trial a policy in log-only mode before enforcing it.

    Known limitations

    Stdio MCP servers only (no HTTP/SSE yet). Each wrapped server has its own gateway, so a read through one server does not taint calls to another. It is a chokepoint, not a sandbox: a direct route to the server bypasses it. Approval prompts need a terminal; without one (some GUI clients, Windows) those calls are denied. Version 0.1.0 research software.

    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 buying a skill.

    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

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 14 days ago

    • Free with an Agensi account

    Software
    Python 3.12A stdio MCP server to protectWarden-MCP

    Permissions

    Terminal / Shell
    Read Files
    Network Access
    Write Files
    Listed14 days ago

    What's inside

    Frequently Asked Questions

    Warden sits between your agent and an MCP server and tracks where content came from. Once the session has read tool output or retrieved documents, the policy denies tools that send anything outside, such as email or HTTP posts, and sends destructive or code-execution calls to you for approval. It doesn't try to spot malicious instructions; it blocks untrusted data from reaching consequential tools.

    This skill is compatible with any stdio-based MCP client, including Claude Desktop, Claude Code, and Cursor, provided you are running a Python 3.12 environment.

    Yes. In the YAML policy you assign each tool a risk level (LOW to CRITICAL) and a side effect (read-only, local write, external comms, code exec, credential access, destructive). The rules then decide by those labels whether a call is allowed, denied or needs your y/N. You can also edit the rules themselves.

    Yes. It needs Python 3.12 exactly and works with stdio MCP servers only (no HTTP/SSE yet). Approval prompts need a terminal, so in some GUI clients and on Windows those calls are denied. Each wrapped server gets its own gateway, and anything with a direct route to the server bypasses Warden.

    Installation involves a simple Python-based setup that initializes a local policy directory, after which you simply update your agent's configuration to route tool calls through the Warden proxy command.

    New in Security

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Free