Aegis logo

Aegis

by wei9072

Inspects proposed file changes for syntax, structural, security, and workspace findings through one MCP validation tool.

Install Aegis

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

Setup steps from the project

wei9072/aegis installs with its own commands rather than a config we can generate, so these are copied as-is. Run them in order in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/wei9072/aegis && cd aegis
    
  2. 2. Install
    cargo install --path crates/aegis-mcp
    

Overview

wei9072/aegis MCP server analyzes proposed file contents and returns structured findings for syntax, code signals, security patterns, and workspace relationships. Its single `validate_file` tool accepts new content, optional previous content for deltas, and an optional workspace root for cross-file analysis. It uses tree-sitter parsing and an mtime-cached workspace index. Reach for it when an agent needs factual change analysis for brownfield code, not automatic fixes, verdicts, or enforcement.

Use cases

  • Inspect proposed edits for parser errors
  • Compare structural signals before and after a change
  • Identify security anti-patterns in supported source files
  • Check workspace changes for import cycles
  • Detect removed public symbols during refactoring

Key features

  • Single `validate_file` MCP tool
  • Tree-sitter syntax analysis
  • Structural signal deltas
  • Rule-based security findings
  • Mtime-cached workspace indexing
  • Python, TypeScript, JavaScript, Go, Java, C#, PHP, Swift, Kotlin, Dart, and Rust support

Security & health

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

ActiveLast checked Today

Recent health check succeeded.

8/9 checks healthy over the last 90d

Adoption & maintenance

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

GitHub stars1Stargazers on the source repository.
Last commit6mo agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Aegis works

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.

Reviews

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

Frequently Asked Questions about Aegis

wei9072/aegis is an MCP server that connects an AI coding workflow to file-change analysis for supported source languages. Its main tool, `validate_file`, reports syntax, structural signal, security, and optional workspace findings for proposed content, without editing files or enforcing a verdict.

Install it by cloning the repository and running `cargo install --path crates/aegis-mcp` with Git and Rust 1.74 or newer installed. Then configure an MCP client to launch the resulting `aegis-mcp` binary over stdio.

Pass the previous file body in the optional `old_content` argument alongside `new_content`. Applicable signal findings then include values before and after the proposed change and their delta.

Provide a `workspace_root` argument when calling `validate_file`. The first such call builds an index of supported files, imports, and public symbols; later calls reuse the cache and reprocess files whose modification times changed.

Yes. The README names Cursor as an MCP-aware client that can launch `aegis-mcp` over stdio. The exact configuration format is client-specific, while the server itself takes no flags.

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 AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/wei9072-aegis?style=directory)](https://allmcps.com/mcp/wei9072-aegis)
HTML Embed
<a href="https://allmcps.com/mcp/wei9072-aegis"><img src="https://allmcps.com/api/badge/wei9072-aegis?style=directory" alt="Aegis on AllMCPs" /></a>