# codeindex

> codeindex is an MCP server for developer tools. Code indexing server that answers symbol, caller and blast-radius questions for agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, macOS, Linux, Windows
- **Repository:** https://github.com/munhq/codeindex
- **MCP Registry name:** io.github.munhq/codeindex
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

Instead of letting an agent read whole files, codeindex parses the repository once with tree-sitter and keeps a trigram text index, a word index and a dependency graph. Questions such as where a symbol is defined, who calls it or what breaks if a file changes come back in a few hundred tokens.

Sessions on the same repository share one background daemon that parses and watches the tree once, so extra agents attach as thin relays. The README measured a drop from 87 MB to 7 MB per session on a 720-file project, against one shared 77 MB daemon.

A single `plan_change` call bundles definitions, call sites, the file's architectural role, hardcoded literals and the transitive blast radius. An `analyze` tool adds 22 further checks, from security patterns and dead code to circular dependencies and duplicated functions.

## Features

- **Structural queries:** Find symbol definitions, callers, imports and reverse dependencies without reading entire files.
- **Change planning:** One call returns definitions, call sites, file role and the transitive blast radius of an edit.
- **Shared daemon:** All sessions on one repository reuse a single index and file watcher.
- **22 analyses:** Run checks for dead code, cycles, clones, coupling, security patterns and database schema drift.
- **40+ languages:** Parses source with tree-sitter across more than forty languages.
- **Read-only Docker option:** Run in a container with the workspace mounted read-only.

## Good for

- Plan a refactor by listing every caller of a function
- Check what a file change could break before editing
- Cut token use when an agent explores a large repository
- Find dead code or circular dependencies in a codebase
- Give several agent sessions one shared view of a repo

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add codeindex -- npx -y @munhq/codeindex
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "codeindex": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add codeindex -- npx -y @munhq/codeindex
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.codeindex]
command = "npx"
args = ["-y", "@munhq/codeindex"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user codeindex npx -- -y @munhq/codeindex

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "codeindex": {
      "command": "npx",
      "args": [
        "-y",
        "@munhq/codeindex"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 14 of 16 tools read data; 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `status` (name suggests: reads): Index stats: file and symbol counts, indexing state and watcher status.
- `search` (name suggests: reads): Trigram-accelerated full-text search across indexed files.
- `find_symbol` (name suggests: reads): Find symbol definitions by name.
- `find_word` (name suggests: reads): Exact identifier lookup in the word index.
- `find_callers` (name suggests: reads): Call sites of a symbol with the enclosing function.
- `get_outline` (name suggests: reads): Structural outline of a file.
- `get_tree` (name suggests: reads): Directory tree with file metadata.
- `get_imports` (name suggests: reads): Files a given file imports.
- `get_imported_by` (name suggests: reads): Reverse dependencies of a file.
- `get_change_impact` (name suggests: reads): Transitive blast radius of changing a file.
- `plan_change`: Refactor plan for a symbol or file.
- `get_hot_files` (name suggests: reads): Recently changed files by recency.
- `read_file` (name suggests: reads): Read file contents with an optional line range.
- `read_symbol` (name suggests: reads): Read only a symbol's source.
- `index_workspace`: Index or re-index a project directory.
- `analyze` (name suggests: reads): Run one of 22 code analyses.

## FAQ

### How many tools does codeindex expose?

The README lists 16 MCP tools, including status, search, find_symbol, find_callers, get_change_impact, plan_change and analyze.

### Does codeindex need an API key?

No. The README describes it as needing no key or config; with Node 18 or newer, one npx command registers it.

### Which directory does codeindex index?

By default the enclosing project root where the client starts it. Set CODEINDEX_WORKSPACE to point it elsewhere.

### Can I run codeindex in Docker?

Yes. The README gives a docker run command that mounts the workspace read-only.

### How do I add codeindex to Claude Code?

Run this command in your terminal: claude mcp add codeindex -- npx -y @munhq/codeindex

### What are the best alternatives to codeindex?

The closest alternatives to codeindex are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/codeindex
