Structural code-quality tools for AI coding agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Topos measures complexity, coupling, risky data flows, and agent cognitive load, then gives your agent a concrete targetβfrom SLOP to PLATINUM.
Install Β· What it checks Β· Under the hood Β· Docs Β· Issues
Coding agents produce working code quickly. The harder question is whether the result is still easy to understand, safe to change, and well-fitted to the rest of the repository. Quality is the new currency.
Topos computes that signal from program structureβnot from an LLM review or a style opinionβand returns concrete failure locations and next actions. It is fast enough to sit inside the agent loop: measure, edit, verify, repeat.
Tests check behavior. Topos checks whether the implementation is built to keep changing.
Grounded in category theory, written in Rust.
One binary. Every supported agent harness. A clean way back out.
Use the verified release installer:
Or install with Homebrew:
[!TIP] Prefer an editor-managed install? In VS Code or Cursor, search
@mcp toposin the Extensions view or choose Install MCP server. This is an alternative totopos install: your editor installs and manages the Topos MCP server for you.
topos install detects every supported MCP harness and lets you configure anyβor allβof them from one interactive checklist:
Restart the agents you configured, then ask:
"Use Topos to find this repository's worst structural problem, make one focused improvement, and verify the result."
[!IMPORTANT] Too many tools spray MCP servers across agent JSON files, scatter symlinks around your machine, then leave you to burn half a Claude session untangling the messβor pull your own hair out doing it. Topos does not play that game. We follow a leave-no-trace policy:
topos statusshows every registration, whiletopos uninstallopens the same selector, previews exactly what will change, and removes everything Topos installed. If Topos makes it easy to do, it should be just as easy to undo.
See the agent setup guide for permissions, manual configuration, and troubleshooting.
Topos discovers Python, Rust, JavaScript, TypeScript, C++, and Go automatically. Pass --language only when you want to narrow the run.
See Installation for platform support and alternative install paths.
Every file gets four independent verdicts:
Those verdicts roll up into one memorable quality medal without hiding which pillar failed:
| Medal | Criteria |
|---|---|
| π PLATINUM | Passes all 4 |
| π₯ GOLD | Passes 3 of 4 |
| π₯ SILVER | Passes 2 of 4 |
| π₯ BRONZE | Passes 1 of 4 |
| β SLOP | Passes 0, or fails to parse |
See the full metrics reference. Refactor guidance also surfaces control-flow cycles, load-bearing dependency edges, process bottlenecks, and optional Graphify knowledge-graph findings.
The four pillars are pairwise incomparable and form a sixteen-element evaluation lattice (a 4-cube); PLATINUM is their intersection. Labels below abbreviate the pillars as Simple, Composable, Sc = Secure, Navigable.
Topos is a self-contained Rust CLI and MCP server. Analysis runs locally; your source code is not sent to an external model or hosted analysis service.
| Component | Role |
|---|---|
| tree-sitter | Parses six languages and powers the native AST, CFG, CPG, PDG, and UAST representations. |
| GitNexus | Supplies the repository dependency graph scored by COMPOSABLE (topos depgraph generate). Requires npm install -g gitnexus@1.6.8. |
| Sighthound | Embedded in the MCP server for supplementary security findings; native CPG probes remain the SECURE scoring source. |
| Graphify | Optional advisory orphan and fragile-edge detection via topos graphify / topos_refactor(target="graphify"); does not affect the medal. Requires pip install graphifyy. |
The result is one agent-facing contract over several structural lenses: one score to optimize, explicit evidence for each failure, and a verification loop that can tell a real improvement from cosmetic churn.
openclaw skills install @Krv-Labs/toposhermes skills tap add Krv-Labs/topos then hermes skills install Krv-Labs/topos/toposio.github.Krv-Labs/toposTopos ships four ways:
topos CLI binary (macOS/Linux), via install.sh or a direct release download.topos-mcp, a thin bin-wheel bundling the MCP server binary (pip install topos-mcp / uvx topos-mcp), zero Python runtime.Crate layout and adapter details: docs.krv.ai/topos/architecture.
Topos is used internally at Krv Labs to manage AI-agent code output. We welcome bugs, ideas, and contributions.
Full documentation Β· Measures and metrics Β· Engineering notes
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/topos)<a href="https://allmcps.com/mcp/topos"><img src="https://allmcps.com/api/badge/topos?style=directory" alt="Topos on AllMCPs" /></a>