# Ctxo [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/alperhankendi/Ctxo  
**GitHub Stars:** 74  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ctxo

## Description
MCP server for AI coding agents. Instead of reading files one by one, your agent gets dependency graphs, git intent, blast radius, and change health in a single call. Works with any language deep analysis for TypeScript,Java, Go, and C#.

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What Ctxo does

Ctxo gives AI coding agents a repository-level view instead of relying only on text search and manually opened files. It builds a deterministic index containing symbols and relationships such as imports, calls, inheritance, implementations, usage, reads, writes, and execution paths. Git history is included with classified intent, anti-patterns, co-change information, and snapshots used for change analysis.

The resulting data is available through 14 semantic MCP tools, with four additional domain tools supplied by `@ctxo/domain`. Agents can ask for a symbol's blast radius, pull-request impact, architectural context, or historical explanation. The project also includes commands for viewing candidate bounded contexts and generating an interactive dependency graph.

## How it works

Install the CLI, initialize a repository, and build its first index:

```sh
npm install -g @ctxo/cli
ctxo init
ctxo index
```

`ctxo init` detects languages, installs relevant plugins, connects Ctxo to the AI client, adds git hooks, and creates the initial setup. The index is refreshed after commits through a post-commit hook. Incremental commands can re-index the files changed in a commit or a selected list of files. Git history and co-change windows are configurable separately.

The index also supports architectural analysis. Ctxo groups files into candidate bounded contexts using dependency and co-change relationships, reduces the influence of hub files, and records cohesion, terms, crossing edges, and shared SQL tables when `@ctxo/lang-sql` is installed. `ctxo visualize` produces a self-contained HTML dependency graph with PageRank sizing, layer colors, and click-based blast-radius views.

## Setup and configuration

The CLI can install agent rules, model-invoked skills, and the optional safe-edit guard during initialization. Useful selections include:

```sh
ctxo init --only rules,skills,guard
ctxo init --skip git-hooks
ctxo init --no-guard
```

For Claude Code, the guard registers a `PreToolUse` hook that can block the first edit to a high-impact symbol until the agent calls `get_blast_radius`. The guard runs once per symbol per session and fails open when it cannot determine the result. Cursor receives the skills and rules but does not receive blocking pre-edit enforcement.

Guard behavior is configured in `.ctxo/config.yaml`:

```yaml
gate:
  enabled: true
  sensitivity: balanced
```

Available sensitivity values are `strict`, `balanced`, and `lenient`. `ctxo doctor` checks for drift in rules, skills, and hooks; `ctxo doctor --fix` repairs those generated sections. Domain support is opt-in: `ctxo install domain` adds domain commands and a Claude Code guard, while Ctxo leaves domain cards unchanged.

## Tools and capabilities

- Query dependency and data-flow relationships through semantic MCP tools.
- Call `get_blast_radius` before changing a high-impact symbol.
- Use `get_pr_impact` to inspect likely effects of a proposed change or review.
- Retrieve historical context and classified intent for code with the relevant MCP queries.
- Request architectural candidates through `get_architectural_overlay`, including context-level views.
- Inspect contexts from the CLI with `ctxo contexts` or its JSON output.
- Preview guard decisions with `ctxo gate --preview`.
- Export a JSON blast-radius result with `ctxo blast-radius ... --json`.
- Add SQL tables, views, and procedures to the graph with `@ctxo/lang-sql`.

_Full upstream README: https://allmcps.com/mcp/ctxo/readme_

