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 | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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. Each file
is compared to |
| topos_assess_improvementA | Compare a baseline to a side-by-side proposed variant (read-only).
For normal edit-in-place loops, use |
| topos_assess_snapshotA | Assess the current file against a baseline captured by
topos_begin_refactor.
Loads the stored baseline by |
| topos_assess_worktree_changeA | Assess an in-place edit against a git revision — the common refactor
loop.
Stateless: the baseline is read from git ( |
| 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_calculate_coverageA | Measure how well a test suite exercises its program-under-test, via
structural (UAST) coverage (read-only).
A standalone signal, separate from the four-pillar quality lattice;
for a quality verdict use |
| topos_compare_codeA | 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_depgraph_statusA | Report |
| topos_evaluate_codeA | Score a raw code string on the SIMPLE / SECURE / NAVIGABLE quality
lattice (read-only; never writes or runs the code).
Use for a snippet not yet on disk. SIMPLE, SECURE, and NAVIGABLE are
reachable here (CFG/CPG/UAST); COMPOSABLE needs a module dependency
graph, so for it use |
| topos_evaluate_fileA | Score a file on disk on the SIMPLE / COMPOSABLE / SECURE / NAVIGABLE
lattice — the only evaluate tool that can reach COMPOSABLE
(side-effecting).
Unless |
| topos_evaluate_projectA | Recursively score every supported source file in a directory on the
SIMPLE / COMPOSABLE / SECURE / NAVIGABLE lattice, with a project
rollup (side-effecting).
Autodetects all supported languages (Python, Rust, JavaScript,
TypeScript, C++, Go) in one walk — no language argument — and skips
unsupported files. The rollup takes the project-wide minimum per
dimension (weakest file floors it). Returns page-global named lists
( |
| topos_generate_depgraphA | Generate the |
| topos_generate_graphify_graphA | Generate the Graphify knowledge graph ( |
| topos_get_docA | Return a Topos documentation page as Markdown.
Use when your MCP client does not expose resource fetching to the
agent. Clients that do surface resources should prefer the
equivalent resource URI for efficiency: |
| topos_inspect_codeA | Full metric breakdown for a single code unit (inline string or
file).
Provide exactly one of |
| topos_preference_walkA | 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. Returns a
PreferenceWalkResult: |
| topos_refactorA | Rank structural refactor hotspots for one file (read-only, advisory).
Does not score the four pillars — use |
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 | The 16-element H(G_qual) over {SIMPLE, COMPOSABLE, SECURE, NAVIGABLE}; bottom = SLOP, top = IDEAL (all four). |
| topos_metrics | Every metric key, good ranges, and how they roll up into dimension scores. |
| topos_priority | Priority profiles (simple / composable / secure / navigable) and when to use each. |
| topos_preferences | User preferences over G_qual: induced total order on Ω and the targeted relaxation walk toward the ideal intersection. |
| topos_workflows | The canonical agent refactor loop: review → plan → refactor → re-measure. Read first. |
| topos_build | Which binary is serving you: version + build time, executable path, file root, pid, and whether the binary on disk has been rebuilt since this process started. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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