# Topos

Topos examines code complexity, coupling, and risky data flows, then gives an agent a concrete structural issue to investigate and improve.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 29
- Author: Krv-Labs
- License: BSD-3-Clause · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Krv-Labs/topos
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/topos

## What it does

Topos analyzes program structure and points an agent toward a specific area to improve. Its checks cover complexity, coupling, risky data flows, and how difficult the code is for an agent to reason about. Run the evaluation again after edits to review the result.

The server supports Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, and Gemini CLI. For Claude Code, setup uses `uvx topos-mcp`. The CLI detects Python, Rust, JavaScript, TypeScript, C++, and Go projects; `--language` narrows an evaluation. Topos checks structure rather than test behavior, so it does not replace running the project’s tests.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add topos -- uvx topos-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from topos-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add topos -- uvx topos-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from topos-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "topos": {
            "command": "uvx",
            "args": [
                "topos-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from topos-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "topos": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "topos-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from topos-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add topos uvx topos-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from topos-mcp <command>

## When to use it
- locate a repository’s most serious structural issue
- identify excessive code complexity and coupling
- inspect risky data flows
- reassess code structure after a refactor

## Example prompts
- Find the main structural issue in this repository and suggest one focused change.
- Check the code for complexity and coupling, then point out the problem areas.
- Evaluate the structure again after my edits and compare the result.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
