The scan-plus-generate pair gives you a current architecture model of an unfamiliar tree in minutes, which is the step that disappears when an agent writes the change instead of you. Drift is the other half: comparing two refs catches a new database dependency or a bypassed gateway that reads as a small diff in code review. Repeat scans reuse cached analysis for unchanged files, so the second pass is fast.
An MCP server that reverse-engineers architecture from a directory tree by static analysis. Go is parsed with `go/ast`, TypeScript and Python with tree-sitter, and markdown vaults through their wiki-links — all producing the same node-and-edge model, with a confidence score on every edge so you can filter heuristic matches out.
- 19 tools over one graph model. `arch_scan` returns the whole architecture; `arch_focus` narrows to a subdirectory or service
- Dependency work — `arch_dependencies` maps internal, external and infrastructure edges, `arch_blast_radius` returns everything that transitively depends on a target, `arch_dataflow` traces endpoints through to data stores
- Shape and explanation — `arch_boundaries` calls the topology monolith, monorepo or microservices and shows the signals behind the verdict with an ambiguity flag; `arch_explain` writes it up with code evidence
- `arch_generate` renders the graph in 9 formats, including Mermaid, PlantUML, C4, Structurizr, draw.io, Excalidraw and a self-contained D3 force-directed page
- Drift — `arch_drift` compares two branches, tags or commits, `arch_drift_explain` returns a 2-5 sentence narrative you can paste into a PR with no LLM call, `arch_diff` compares against a saved baseline and `arch_snapshot` saves one
- Rules and metrics — `arch_validate` finds circular dependencies, orphans and layering violations with a baseline mode that grandfathers what already exists; `arch_metrics` computes coupling, instability and dependency depth; `arch_recommend` ranks improvements with the metric evidence that triggered each
- History — `arch_history` shows how the architecture moved over git history
- A repo registry so you stop repeating paths: `arch_registry_add`, `arch_registry_list`, `arch_registry_remove`
No account and no key — it reads local directories. `go install github.com/olgasafonova/ridge/cmd/ridge@latest` puts the binary in `$GOPATH/bin`; you also need a C compiler for the tree-sitter CGo bindings, which is standard on macOS and Linux. Point your client's config at the binary path. Set `RIDGE_ALLOWED_DIRS` to a colon-separated list of absolute paths if you want scanning restricted to them — without it, ridge will read any directory except a built-in denylist covering `/etc`, `/proc`, `/sys`, `/dev` and home dotfiles like `.ssh` and `.aws`. Scan caches live in `~/.mcp-context/ridge/`. MIT.
One command — go install github.com/olgasafonova/ridge/cmd/ridge@latest
