arch_scanLABSCO SUMMARY
Best on the codebase you did not write.
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.
What it is
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.
What you get
- 19 tools over one graph model.
arch_scanreturns the whole architecture;arch_focusnarrows to a subdirectory or service - Dependency work —
arch_dependenciesmaps internal, external and infrastructure edges,arch_blast_radiusreturns everything that transitively depends on a target,arch_dataflowtraces endpoints through to data stores - Shape and explanation —
arch_boundariescalls the topology monolith, monorepo or microservices and shows the signals behind the verdict with an ambiguity flag;arch_explainwrites it up with code evidence arch_generaterenders the graph in 9 formats, including Mermaid, PlantUML, C4, Structurizr, draw.io, Excalidraw and a self-contained D3 force-directed page- Drift —
arch_driftcompares two branches, tags or commits,arch_drift_explainreturns a 2-5 sentence narrative you can paste into a PR with no LLM call,arch_diffcompares against a saved baseline andarch_snapshotsaves one - Rules and metrics —
arch_validatefinds circular dependencies, orphans and layering violations with a baseline mode that grandfathers what already exists;arch_metricscomputes coupling, instability and dependency depth;arch_recommendranks improvements with the metric evidence that triggered each - History —
arch_historyshows how the architecture moved over git history - A repo registry so you stop repeating paths:
arch_registry_add,arch_registry_list,arch_registry_remove
Requirements
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.
Setup effort
One command — go install github.com/olgasafonova/ridge/cmd/ridge@latest
USE CASES
Onboarding onto a repository another team owns
Scan the tree and generate a diagram, then read the model instead of tracing imports by hand.
Writing the architecture paragraph of a PR
Compare the branch against main and get a short narrative summary plus the structured diff, ready to paste.
Adopting an architecture check on a legacy codebase
Write the baseline once so existing violations are grandfathered, then fail the build only on new ones.
Sizing a change before making it
Ask what transitively depends on the package you are about to touch, across code and markdown docs alike.
Finding orphan notes in a vault
Scan a markdown tree — wiki-links and relative links become edges in the same graph, so unconnected notes stand out.
19 tools
Listed in project docs. Your client may show a different list.
arch_focusarch_dependenciesarch_blast_radiusarch_dataflowarch_boundariesarch_explainarch_generatearch_diffarch_driftarch_drift_explainarch_validatearch_metricsarch_recommendarch_historyarch_snapshotarch_registry_addarch_registry_listarch_registry_removeBEFORE YOU INSTALL
What to know first
Tools you get
19 tools named in the project's documentation.
Requires
- go on PATH
- Go 1.24+
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
go install github.com/olgasafonova/ridge/cmd/ridge@latestMCP Clients
Claude Code
{
"mcpServers": {
"ridge": {
"command": "<YOUR_PATH_TO_RIDGE>",
"args": []
}
}
}