# wei9072/aegis [Health: Active]

**Category:** 🔒 Security  
**Repository:** https://github.com/wei9072/aegis  
**GitHub Stars:** 1  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/wei9072-aegis

## Description
AI-agent admission-control MCP server: validates file edits against Ring 0 syntax + Ring 0.5 structural-cost regression + workspace boundary (path / glob / shell-redirect / symlink). Negative-space framing — emits BLOCK / WARN / PASS verdicts, never coaches the agent.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/wei9072/aegis), copied verbatim. Run them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/wei9072/aegis && cd aegis
```

2. Install:

```sh
cargo install --path crates/aegis-mcp
```

## Documentation

## What wei9072/aegis does

wei9072/aegis examines a proposed file write and reports observations that a consuming coding agent can interpret. It does not modify files, decide whether a change is acceptable, retry an operation, or revert code. The current V2 design replaces earlier judgment-oriented behavior with findings that describe detected conditions.

The returned finding categories are Syntax, Signal, Security, and Workspace. Syntax findings identify parser error or missing nodes. Signal findings report structural counters such as fan-out, nesting depth, cyclomatic complexity, unfinished markers, import usage, and lost tests. Security findings identify explicitly implemented anti-patterns, including unsafe evaluation, hardcoded secrets, disabled TLS, shell injection, SQL concatenation, weak cryptography, and SSRF involving a user-controlled URL. Workspace findings cover cross-file conditions such as introduced import cycles, removed public symbols, and inferred file roles.

## How it works

The MCP interface exposes one tool, `validate_file`. Its required inputs are a path and the proposed `new_content`. Supplying `old_content` enables before-and-after values and deltas for applicable structural signals. Supplying `workspace_root` enables workspace analysis.

A shared tree-sitter parse feeds the finding generators for the file. For workspace checks, an index records imports and public symbols across supported files. The first request using a workspace root builds that index; later requests reuse it and reprocess files whose modification times changed. There is no separate scan or initialization operation.

Findings include the file, optional source range and snippet, and a structured context map. Security context may contain a `severity_hint`, but findings do not carry an enforced severity or verdict. An `aegis-allow: <rule_id>` or `aegis-allow: all` marker on the same or preceding source line marks a matching finding as acknowledged without removing it.

## Setup and configuration

Install the Rust-based binary from the repository with Git and Rust 1.74 or newer:

```bash
git clone https://github.com/wei9072/aegis
cd aegis
cargo install --path crates/aegis-mcp
```

Configure the MCP client to launch `aegis-mcp` over stdio. The server takes no command-line flags and requires no documented environment variables. Client configuration syntax depends on the client.

wei9072/aegis supports Python, TypeScript, JavaScript, Go, Java, C#, PHP, Swift, Kotlin, Dart, and Rust through file-extension dispatch. Supported extensions include the common source extensions for each language listed in the project documentation, such as `.py`, `.ts`, `.js`, `.go`, `.java`, `.cs`, `.php`, `.swift`, `.kt`, `.dart`, and `.rs`.

## Tools and capabilities

- Validate one proposed file body through `validate_file`.
- Compare structural signal values when prior content is provided.
- Detect parser errors and missing syntax nodes.
- Check 16 documented security anti-pattern rules.
- Analyze workspace imports and public symbols when a root is supplied.
- Return structured findings with rule IDs, context, and acknowledgement state.

## Limitations and notes

wei9072/aegis is not a general linter, a full SAST platform, or an auto-fixer. Code that does not match an implemented rule is outside its scope, and its security checks are a limited spot check rather than broad coverage comparable to dedicated analysis suites.

The tool is most applicable to agent-driven changes in existing codebases, where accumulated structural drift, dependency cycles, or removed public interfaces may be easy to miss. Findings remain descriptive: the consuming agent or developer must decide whether to ignore, investigate, or change the proposal.

_Full upstream README: https://allmcps.com/mcp/wei9072-aegis/readme_

