Aegis MCP logo

Aegis MCP

Enforces Aegis governance policies on agent file, command, role, and quality-gate operations.

Install Aegis MCP

Run the project’s own setup commands, in order.

Setup steps from the project

aegis-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    npm install -g aegis-mcp-server
    

Overview

The aegis-mcp MCP server validates agent actions against project policies stored in `.agentpolicy/` before execution. It keeps governance files in the server process, applies role and path boundaries, scans written content, runs governed commands, and records enforcement decisions. Use it when an agent needs runtime controls for repository access, construction workflows, overrides, or quality gates. It runs through an MCP command configuration and supports universal role selection or a fixed role.

Use cases

  • Enforce role-specific repository boundaries
  • Validate agent file changes before writing
  • Run commands through governed execution
  • Require confirmation for policy overrides
  • Run quality gates before completing construction

Key features

  • Runtime policy enforcement
  • Role selection and fixed-role operation
  • Path and content validation
  • Governed command execution
  • Override and construction-session logging
  • Quality-gate execution

Tools9

What Aegis MCP lets your agent do. Expand a tool for its parameters.

Self-reported~144 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 79d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
Last commit3mo agoMost recent push to the default branch.
Tools exposed9Callable tools this server registers over MCP.

How Aegis MCP works

What aegis-mcp MCP server does

The aegis-mcp MCP server applies the Aegis governance specification at runtime. It reads policy files from a project’s .agentpolicy/ directory and checks agent operations before allowing them to proceed. The agent receives a success result or a blocked response that identifies the policy issue.

Governance can define writable, read-only, and forbidden paths; role-specific access; sensitive content patterns; cross-domain import rules; quality gates; and policies that cannot be overridden. Enforcement decisions and approved overrides are written to an append-only overrides.jsonl file.

The server keeps policy data in its own process memory rather than requiring the agent to load governance files into its context. It also watches for policy changes and reloads them automatically.

How it works

In universal mode, the session starts without a selected role. aegis_policy_summary reports the available roles, including construction and specialist roles found under .agentpolicy/roles/. After the user chooses a role, the agent calls aegis_select_role, and subsequent checks use that role’s boundaries.

A fixed role can instead be supplied when the MCP process starts. In that mode, the role is locked immediately and the policy summary reports its boundaries directly.

Construction mode is intended for initial builds and substantial restructuring. It grants repository-wide read and write access, uses the policy files as an architectural blueprint, and records session start and end timestamps. The agent calls aegis_complete_task to run quality gates and close the mode. Later sessions are expected to use specialist roles.

When a governed action is blocked and the policy allows confirmation, the response includes an override token and the violated rule. After the user confirms, aegis_request_override can perform that one action with a rationale. Immutable policies cannot use this path.

Setup and configuration

Install the package globally with npm:

Terminal
npm install -g aegis-mcp-server

A project initialized by aegis-cli may already contain the .mcp.json connection configuration. The server can also be configured with a command such as:

config.json
{
  "mcpServers": {
    "aegis": {
      "command": "aegis-mcp",
      "args": ["--project", ".", "--role", "backend"]
    }
  }
}

The --role argument is used for fixed mode; omitting it enables universal mode. The material does not specify environment variables for configuration.

Tools and capabilities

The aegis-mcp MCP server exposes these tools:

  • aegis_policy_summary reports governance boundaries or available roles.
  • aegis_select_role locks in a role in universal mode.
  • aegis_check_permissions checks whether an operation is allowed.
  • aegis_write_file, aegis_read_file, and aegis_delete_file perform path-validated file operations, with writes also undergoing content validation.
  • aegis_execute runs commands under governance rules.
  • aegis_complete_task runs configured quality gates and closes construction mode.
  • aegis_request_override performs a blocked action after human confirmation when the policy permits it.

Native agent tools for reading, searching, and exploring are not gated by this server. Write, delete, and execute operations are the intended governed paths.

Limitations and notes

The server does not replace the agent’s native directives; its governance depends on the agent routing applicable operations through the supplied tools and seeking user permission where required. Policy complexity is handled by the server process, but tool results still return operation output and enforcement status to the agent.

Construction mode is not an unrestricted policy bypass: it follows the governance files as its project blueprint and still records the session. Policies marked immutable cannot be overridden through the MCP tools. The package is licensed under MIT.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Aegis MCP

aegis-mcp is an MCP server that connects AI agents to project files and commands under Aegis governance policies. Its main tools summarize and select roles, check permissions, govern reads, writes, deletes, and execution, run quality gates, and handle confirmed overrides while logging enforcement decisions.

Install it globally with `npm install -g aegis-mcp-server`. Projects initialized with `aegis-cli` may already include the `.mcp.json` connection configuration; otherwise, configure the MCP command as `aegis-mcp`.

Pass `--project` and `--role` arguments in the MCP server configuration, such as `--project . --role backend`. The selected role is locked at startup, and universal role selection is skipped.

It can perform a blocked operation only when the policy allows overrides and a user confirms it. The agent supplies the returned override token and the user’s rationale to `aegis_request_override`; immutable policies cannot be overridden.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAegis MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/aegis-mcp?style=directory)](https://allmcps.com/mcp/aegis-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/aegis-mcp"><img src="https://allmcps.com/api/badge/aegis-mcp?style=directory" alt="Aegis MCP on AllMCPs" /></a>