# diffctx MCP server

> Selects the minimum code an LLM needs to review a git diff by identifying callers, tests, and contracts affected by a change.

- Repository: https://github.com/nikolay-e/diffctx
- Page: https://hostedmcp.org/servers/nikolay-e/diffctx
- Transport: stdio
- Stars: 6
- License: Apache-2.0
- Latest version: 1.20.0

## Install

### Claude Code

```sh
claude mcp add diffctx -- uvx diffctx
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "diffctx": {
      "command": "uvx",
      "args": [
        "diffctx"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "diffctx": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "diffctx"
      ]
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "diffctx": {
      "command": "uvx",
      "args": [
        "diffctx"
      ]
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.diffctx]
command = "uvx"
args = ["diffctx"]
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "diffctx": {
      "command": "uvx",
      "args": [
        "diffctx"
      ]
    }
  }
}
```

## FAQ

### How does diffctx differ from whole-repo packers or code-graph servers?

Unlike whole-repo packers that export everything or code-graph servers that use a maintained index, diffctx is diff-seeded, meaning the input is a specific change and the output is what that change touches.

### Does diffctx require an index or model calls to work?

No, it operates locally and deterministically without requiring an index or making model calls.

### Can I limit the amount of code sent to the LLM?

Yes, you can use the --budget flag to cap the output at a specific token count.
