# Aegis MCP

> Deploy a zero-trust firewall for MCP servers with RBAC policies, tool poisoning scans, and immutable audit logging.

Aegis MCP is a free AI agent skill on Agensi by Alejandro Casa Rodríguez, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Alejandro Casa Rodríguez](https://www.agensi.io/creators/alejandro-casa)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 0.2.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/aegis-mcp
- Tags: llm-ops, security, api, devops

## About this skill

Unrestricted MCP server access introduces critical risks like tool poisoning, prompt injection, and sensitive data leakage. This skill implements a zero-trust firewall to govern every tool call between your host and its servers.

### What it does
- **Enforces zero-trust policies** using YAML-defined RBAC and ABAC rules to restrict tool usage, filesystem paths, and egress domains.
- **Validates tool integrity** with scanners that detect poisoning or cross-server shadowing before servers are approved for use.
- **Protects sensitive data** through DLP redaction, taint-tracking of untrusted content, and egress sink constraints.
- **Records immutable audits** via a hash-chained, tamper-evident ledger with signed Merkle checkpoints for compliance.
- **Gates risky actions** behind Human-in-the-Loop (HITL) approvals for destructive commands or sensitive repository changes.

### How it works
1. **Selection**: Choose between the `stdio` wrapper for local hosts like Claude Desktop or the Streamable HTTP gateway for networked environments.
2. **Configuration**: Define environment variables for signing keys and point to your YAML policy files.
3. **Deployment**: Wrap existing MCP server commands in the host configuration or route requests through the gateway.
4. **Governance**: Monitor violations in `monitor` mode before switching to `enforce` for production blocking.

### Frameworks & tools
This skill utilizes Python 3.12+, `uv`, and Docker. It integrates with any MCP-compliant host including Claude Desktop, Cursor, and Windsurf, while leveraging YAML for policy definitions and SHA-256 for versioning and audit integrity.

### Why this beats prompting it yourself
Relying on system prompts to limit tool access is easily bypassed by injection attacks. This skill moves enforcement to the transport layer, ensuring that even if the agent is compromised, the firewall blocks unauthorized execution and data exfiltration at the binary level.

### Use cases
- Restricting filesystem access to specific project directories for AI coding assistants.
- Requiring manager approval before an agent can merge code or delete production resources.
- Scanning third-party MCP servers for malicious tool definitions before activation.
- Ensuring read-only SQL execution for agents querying internal databases.

### Known limitations
Requires Python 3.12+ and specific package managers like `uv` for source builds. Security policies and DLP redaction reduce risk but do not guarantee detection of all novel attack vectors.

## Requires

- Python
- Git

## Known limitations

- Defense-in-depth only: Threat detection, tool-poisoning scans, and DLP redaction are deterministic (canonicalization, pattern/entropy rules, ABAC, and taint tracking) and do not guarantee 100% detection of novel semantic attacks.
- Single-writer audit ledger: The embedded SQLite hash-chained ledger (WAL mode) is designed for local stdio wrappers or single-replica gateways; multi-replica horizontal scaling requires a shared database backend (on the roadmap).
- Host placeholder handling: Claude Desktop does not expand ${VAR} placeholders in claude_desktop_config.json—replace them with absolute paths.
- Fail-closed production defaults: In AEGIS_ENVIRONMENT=prod, startup intentionally fails closed if AEGIS_POLICY_PATH or AEGIS_SIGNING_KEY_PATH is missing. Validate policies in AEGIS_POLICY_MODE=monitor in dev/staging before enforcing in production.

## 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 Aegis MCP 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

### What specific security risks does this skill address for AI agents?

This skill acts as a zero trust firewall for MCP servers, preventing risks like tool poisoning, prompt injection, and data leakage by enforcing strict RBAC/ABAC policies and monitoring every tool call between a host and its servers.

### What software requirements are necessary to run the firewall provided by this skill?

You will need Python 3.12 or higher with the uv package manager, or Docker, along with an MCP compliant host such as Claude Desktop, Cursor, or Windsurf to deploy the firewall.

### What kind of audit logs and reports does this skill generate?

The skill generates YAML based policy versions, a hash chained audit ledger for compliance, and real time monitoring data that can be viewed in monitor mode before being enforced in production.

### Can I require manual approval for certain actions taken by my AI agent?

Yes, the skill allows you to gate destructive commands, sensitive repository changes, or specific tool calls behind Human In The Loop approvals, requiring manual authorization before execution.

### Are there any security scenarios that this skill is not guaranteed to catch?

While the skill significantly reduces risk through DLP redaction and poisoning scans, it does not guarantee the detection of all novel attack vectors and requires users to validate policies in monitor mode first.

### How do I instruct my AI agent to start protecting its server connections with this skill?

You can ask your agent to install the firewall using the provided stdio wrapper for local hosts or to route requests through the Streamable HTTP gateway to begin governing tool calls.

---

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.
