# Warden: Governed MCP Gateway

> 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.

Warden: Governed MCP Gateway is a free AI agent skill on Agensi by Aqsa Siddiqui, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Aqsa Siddiqui](https://www.agensi.io/creators/aqsa-siddiqui)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-11-21
- Security: scan passed (2026-11-21); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/warden-governed-mcp-gateway
- Tags: security, ai-agents, prompt-injection, governance, audit, mcp

## 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.

## Requires

- Python 3.12
- A stdio MCP server to protect
- Warden-MCP

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Warden: Governed MCP Gateway skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does Warden MCP Gateway protect my environment from prompt injection?

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.

### Which AI agents and environments are compatible with this gateway?

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.

### Can I customize which tool calls require human approval versus which run automatically?

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.

### Are there any specific technical limitations I should be aware of before installing?

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.

### How difficult is the initial setup and integration process?

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.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
