Aedile
This server exposes one MCP tool, aedile_consult, for pre-implementation codebase consultation and architectural verification.
Describe a proposed feature plan and receive matching codebase symbols, stdlib alternatives, and dependency reuse options.
Optionally supply planned file changes with paths, actions (
add/modify), and imports.Check proposed imports for circular dependencies and layering violations before code is written.
Use the results to encourage reuse of existing code and prevent architecture regressions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Aedile check for existing date formatting utility before writing new code"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
flowchart TD
A(["Coding Agent<br/><i>Claude Code · Cursor · Codex · Windsurf</i>"]) -->|"Proposed plan: Build auth helper"| B{"Aedile MCP<br/><i>12 local tools</i>"}
B --> C["BM25 + AST Symbol Reuse<br/><i>aedile_consult · aedile_map</i>"]
B --> D["Stdlib & Declared Deps<br/><i>tomllib · pyproject.toml</i>"]
B --> E["Tarjan Cycle & Layer Gate<br/><i>PEP 810 lazy · add / modify / delete</i>"]
B --> F["Output Compression & Hotspots<br/><i>aedile_compress · recall · cProfile</i>"]
C --> G(["Verified, Minimal Implementation"])
D --> G
E --> G
F --> GWhy Aedile?
Modern coding assistants know how to write code. They usually don't know your architecture.
Static prompt rules drift as the context window fills, and regex-only maps miss nested definitions, import graphs, and layer boundaries. That leads to:
duplicated utilities (15–30 lines rewritten when 1–5 lines would reuse existing code)
unnecessary third-party dependencies
circular imports and broken layer boundaries
dangling imports when modules are deleted
Aedile verifies the repository deterministically before code is generated, giving coding assistants real AST and graph facts instead of relying on prompts alone.
Related MCP server: Manifold Engine MCP Server
Quick Example
Without Aedile
AI: "I'll write a custom TOML dependency parser and a new cache class."
↓
Repository already has tomllib and ScanCache.
↓
29 lines of duplicated code.With Aedile
Aedile [Observed: AST/Graph]:
"Reuse ScanCache in src/aedile/infrastructure/cache.py and stdlib tomllib."
"ARCHITECTURAL VIOLATION: importing cli from shared violates layer order."
↓
AI reuses existing abstractions in 9 lines with zero violations.Install & Setup
pip install aedileConfigure MCP servers and SessionStart / SubagentStart hooks automatically (creates .aedile.bak backups):
aedile setupCheck your environment, toolchain, and agent registrations:
aedile doctorSee SUPPORTED_AGENTS.md for manual Claude Code, Cursor, Windsurf, Copilot, and Gemini CLI setup.
Commands & MCP Tools
CLI Command | MCP Tool | What it does |
|
| Consult reuse, stdlib, declared deps, and pre-edit verification |
— |
| Simulate |
|
| Emit token-budgeted AST symbol & layer map |
|
| Export Mermaid, SVG, GraphML, or Cypher graphs + blast radius |
|
| Inspect a module's imports, dependents, instability, and blast radius |
|
| Shortest dependency path with |
|
| Surface |
|
| Caller-aware diff review ranked Must / Should / Nice to have |
|
| Whole-repo ranked audit combining rules, hubs, and debt |
|
| Harvest |
|
|
|
|
| Compress noisy |
| — | Recover full raw failure logs and view cumulative token-savings telemetry |
| — | CI gate ( |
| — | Intensity modes ( |
Benchmarks (Real Measured Runs)
All benchmarks were executed locally with zero fabricated numbers:
10-Task Bloat & LOC Test (
qwen3:4b) — BLOAT_LOC_BENCHMARK.md:Avg generated code dropped from 19.6 LOC (Without Aedile) to 9.9 LOC (With Aedile, -49.5% less code).
Codebase / stdlib reuse rose from 2/10 (20%) to 10/10 (100%).
12-Prompt Reuse & Architecture Suite (
qwen3:4b) — BENCHMARKS.md:Aedile vs. Ponytail (
AGENTS.md+ponytail-map.js): 10/12 (83.3%) vs. 2/12 (16.7%) LLM hit rate, 11/12 (91.7%) vs. 0/12 deterministic tool catches, and lower avg prompt tokens (752.8 vs. 794.6).
10 Production Repositories (50k+ Stars Each) — MEGA_10_REPO_VALIDATION.md:
Validated across
fastapi,flask,requests,yt-dlp,django,express,vite,nest,gin, andripgrep(2,674 files, 5,367 edges): 915/923 (99.1%) checks passed.
100k+ Star Scale Benchmark — SCALE_100K_REPOS_ANALYSIS.md:
Measured across
yt-dlp,ollama,deno, andreactwith 19.5x–91.5x warm-cache speedups (0.113s–1.095swarm scans).
55-Test Token Savings & Pre-Write Gate — TOKEN_SAVINGS_50_TESTS.md:
62,429 / 82,411 (75.8%) CLI output tokens saved across 30 real
pytest/git/ruff/mypy/aedileruns + 807,108 / 807,570 (99.9%) pre-write context tokens saved across 25aedile_consult&verifychecks.
4-Way Real LLM Comparison (
qwen3:4b: Aedile vs. RTK vs. Ponytail vs. Baseline) — FOUR_WAY_BENCHMARK.md:43,860 / 47,278 (92.8%) total tokens saved (169.7 avg prompt tokens vs. 7,479.7 baseline and 6,709.7 RTK) on the playable Tesla Roadster Skyline
.exedemo (0.0268 ms/frameacross 1,000 simulated frames).
Core Test Suite: 1,073 passing tests in
pytest(Python 3.15.2,ruff+mypystrict clean).
FAQ
Does Aedile require internet access or API keys? No. All AST parsing, graph simulation, profiling, caching, and telemetry stay 100% local.
Which languages and Python versions are supported?
Python 3.15 (including PEP 810 lazy import cycle awareness) via stdlib ast, plus zero-dependency structural parsers for TypeScript, JavaScript, Go, and Rust.
How do I adopt Aedile on an existing repo without fixing old violations first?
Run aedile check --update-baseline, then gate CI with aedile check --baseline so only new regressions fail the build.
Documentation
Contributing & License
Contributions are welcome. See CONTRIBUTING.md and CODE_OF_CONDUCT.md.
Aedile is released under the MIT License.
Star History
Available Tools
1 toolaedile_consultA
Consult Aedile before implementing. Returns codebase symbol matches, stdlib alternatives, dependency reuse options, and checks proposed imports for cycles or layering violations.
Inputs: proposed_plan (required), proposed_changes.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no ambiguity. The agent cannot confuse it with other tools.
With a single tool, the naming pattern is perfectly consistent. 'aedile_consult' follows a descriptive noun_verb pattern.
A single tool is too few for effective agent workflow. The server's purpose (code consultation) would benefit from additional tools for actions like implementing suggestions.
The lone tool tries to cover multiple consultation aspects (symbols, stdlib, dependencies, imports), but the absence of any action tools leaves obvious gaps in the implementation workflow.
Maintenance
Related MCP Connectors
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Enforces architectural invariants and code quality rules inside your AI agent's edit loop.
AI code governance and code review for Claude Code, Copilot and Cursor. Checks rules and security.
Related MCP Servers
- AlicenseAqualityBmaintenanceSelf-hosted semantic code search for AI coding agents. Indexes many repositories at once with tree-sitter AST chunking, local llama.cpp embeddings and Qdrant, so Claude Code, Cursor, Codex and any MCP client can find code by meaning, trace usages and callers, and read the git history behind each chunk. No API keys, and your code never leaves your machine.1835MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to perform high-speed structural codebase analysis and dynamic context management by mapping repositories as byte-streams and detecting architectural chaos.MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to analyze a local codebase and answer impact questions like 'what breaks if I change Y?' through local indexing, search, and reverse dependency analysis, with no code leaving the machine.45 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to retrieve precise, real-time architectural context—such as domains, models, routes, and events—from a codebase, avoiding the need to dump entire files into prompts.19 npm1MIT