topos-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TOPOS_MCP_FILE_ROOT | No | Absolute path to the repository root. If not set, Topos auto-detects by walking up for .git or pyproject.toml. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| topos_assess_improvementA | Compare a baseline to a side-by-side proposed variant (read-only). For normal edit-in-place loops, use |
| topos_assess_worktree_change | Assess an in-place edit against a git revision — the common refactor loop. Stateless: the baseline is read from git ( For untracked/new files or an uncommitted pre-edit baseline (which git
cannot serve), use |
| topos_assess_changesetA | Assess a multi-file changeset against a git baseline and roll the per-file verdicts into a project before/after (read-only). Use for a module split or any edit spanning several files; for a single
file use |
| topos_begin_refactorA | Persist the file's current source as a baseline snapshot before you edit it (writes a snapshot record — its only side effect). Returns a |
| topos_assess_snapshot | Assess the current file against a baseline captured by topos_begin_refactor. Loads the stored baseline by |
| topos_compare_code | Compute the AST (tree-edit) distance between two source-code strings. Read-only and idempotent; parses both snippets in memory, never writes or
scores. Use for clone detection or to measure refactor impact; the
|
| topos_compare_filesA | Compute the AST (tree-edit) distance between two source files on disk. Read-only; parses both files, never writes or scores. Use for clone
detection or refactor impact; use |
| topos_calculate_coverage | Measure how well a test suite exercises its program-under-test, via structural (UAST) coverage (read-only). A standalone signal, separate from the SIMPLE/COMPOSABLE/SECURE lattice; for
a quality verdict use |
| topos_depgraph_statusA | Report Distinguishes a missing graph from a stale one and from a load/schema failure, so an agent knows whether COMPOSABLE can be trusted and what to do next. Never shells out and never mutates state. |
| topos_generate_depgraphA | Generate the Ensures the graph by default: no-ops when current, otherwise runs
|
| topos_get_docA | Return a Topos documentation page as Markdown. Use when your MCP client does not expose resource fetching to the agent
(e.g. Gemini CLI). Clients that do surface resources should prefer the
equivalent resource URI for efficiency: Topics:
|
| topos_evaluate_codeA | Score a raw code string on the SIMPLE / COMPOSABLE / SECURE quality lattice (read-only; never writes or runs the code). Use for a snippet not yet on disk. Only SIMPLE and SECURE are reachable
here (scored from the source's CFG/CPG); COMPOSABLE needs a module
dependency graph, so for it use |
| topos_evaluate_fileA | Score a file on disk on the SIMPLE / COMPOSABLE / SECURE lattice — the only evaluate tool that can reach COMPOSABLE (read-only). Use for one file on disk. A ModuleDependencyGraph is attached when
|
| topos_evaluate_projectA | Recursively score every supported source file in a directory on the SIMPLE / COMPOSABLE / SECURE lattice, with a project rollup (read-only). Use for a whole tree; for a single file use |
| topos_inspect_codeA | Full metric breakdown for a single code unit (inline string or file). Read-only; provide exactly one of |
| topos_preference_walk | Turn a generator ranking into a preference-ordered relaxation walk. Pure and read-only (lattice math only; no files, no scoring). Call after an
evaluation to pick the next verdict to aim for, or to relax the goal
gracefully under a token/time budget; pair with |
| topos_refactorB | Refactor hotspots (read-only). See topos_get_doc(topic="workflows"). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| topos_refactor_until_ideal | Scaffolds the canonical Topos refactor loop (review → plan → refactor → re-measure) with a concrete target, tool call sequence, and termination criteria. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| topos_agent_contract | Compact outcome-first contract for agent loops: targets, gates, risks, and next-tool fields. |
| topos_lattice_reference | The 8-element 3-cube H(G_qual) over {SIMPLE, COMPOSABLE, SECURE}; bottom = SLOP, top = IDEAL. |
| topos_metrics_reference | Every metric key, good ranges, and how they roll up into dimension scores. |
| topos_priority_reference | Priority profiles (simple / composable / secure) and when to use each. |
| topos_preferences_reference | User preferences over G_qual: induced total order on Ω and the targeted relaxation walk toward the ideal intersection. |
| topos_workflow_guide | The canonical agent refactor loop: review → plan → refactor → re-measure. Read first. |
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Krv-Labs/topos'
If you have feedback or need assistance with the MCP directory API, please join our Discord server