Aegis MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install agent-aegis
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add aegis -- node "<FULL_PATH_TO_AEGIS>/dist/index.js"

Replace <FULL_PATH_TO_AEGIS>/dist/index.js with the actual folder you prepared in step 1.

README.md

Policy-based governance for AI agent tool calls.

Aegis

<strong>The simplest way to govern AI agent actions. No infra. No lock-in. Just Python.</strong>


<code>pip install agent-aegis</code> &#8594; YAML policy &#8594; governance in 5 minutes.
<strong>Works with LangChain, CrewAI, OpenAI, Anthropic, MCP, and more.</strong>

Try it Live in Your Browser • Quick Start • How It Works • Documentation • Integrations • Contributing

English • 한국어


The Problem

AI agents are getting real-world access. Without governance, a hallucinating agent can:

  • Bulk-delete your CRM contacts
  • Submit wrong forms to government portals
  • Trigger irreversible API calls at 3am
  • Run up cloud bills with infinite loops

There's no sudo for AI agents. Until now.

The Solution

Aegis is a Python middleware that sits between your AI agent and the actions it takes. It's not a separate server you have to run -- you import it directly into your agent code and it wraps every action with policy checks, approval gates, and audit logging.

Your Agent                    Aegis                         Real World
    |                           |                               |
    |-- "delete all users" ---> |                               |
    |                      [Policy check]                       |
    |                      risk=CRITICAL                        |
    |                      approval=BLOCK                       |
    |                           |--- X (blocked, logged) -----> |
    |                           |                               |
    |-- "read contacts" ------> |                               |
    |                      [Policy check]                       |
    |                      risk=LOW                             |
    |                      approval=AUTO                        |
    |                           |--- execute (logged) --------> |
    |                           |                               |
    |-- "bulk update 500" ----> |                               |
    |                      [Policy check]                       |
    |                      risk=HIGH                            |
    |                      approval=APPROVE                     |
    |                           |--- ask human (Slack/CLI) ---> |
    |                           |<-- "approved" --------------- |
    |                           |--- execute (logged) --------> |

Copy, paste, run — zero config needed:

from aegis import Action, Policy

policy = Policy.from_dict({
    "version": "1",
    "defaults": {"risk_level": "low", "approval": "auto"},
    "rules": [{"name": "block_delete", "match": {"type": "delete_*"},

Tools (1)

check_policyEvaluates an agent action against defined YAML policies to determine risk level and approval requirements.

Configuration

claude_desktop_config.json
{"mcpServers": {"aegis": {"command": "python", "args": ["-m", "aegis.mcp"]}}}

Try it

Check if the proposed action to delete all CRM contacts violates current security policies.
Evaluate the risk level of performing a bulk update on 500 user records.
Set up an approval gate for any agent action that involves external API calls.
Review the audit logs for recent agent tool executions.

Frequently Asked Questions

What are the key features of Aegis?

Policy-based governance for AI agent tool calls. YAML-based policy definition. Automated risk assessment for agent actions. Human-in-the-loop approval gates. Comprehensive audit logging.

What can I use Aegis for?

Preventing AI agents from performing unauthorized bulk deletions in databases. Requiring human approval for high-risk API calls during agent execution. Enforcing security policies across LangChain, OpenAI, and Anthropic agents. Auditing agent behavior to identify and mitigate hallucination risks.

How do I install Aegis?

Install Aegis by running: pip install agent-aegis

What MCP clients work with Aegis?

Aegis works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Aegis docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare