# Octocode

Indexes codebases using AST parsing and semantic search to map file dependencies, symbol calls, and project structure for AI agents.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 513
- Author: Muvon
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Muvon/octocode
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/octocode

## What it does

Octocode is written in Rust. It parses project files via tree-sitter AST syntax trees. Instead of treating code as flat text chunks, it maps relationships directly. It extracts imports, function calls, and interface implementations. The server exposes `semantic_search`, `graphrag`, `structural_search`, and `view_signatures` over MCP.

AST graph navigation runs on the fly without an external LLM or precomputed embeddings. The graph builds directly from source. Hybrid search combines dense vectors with BM25 keyword matching. Exact identifier searches stay intact. An optional persistent GraphRAG index adds high-level module descriptions.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add octocode -- npx -y @muvon/octocode
```

### Codex

**Platform CLI**
```bash
codex mcp add octocode -- npx -y @muvon/octocode
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "octocode": {
            "command": "npx",
            "args": [
                "-y",
                "@muvon/octocode"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "octocode": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@muvon/octocode"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add octocode npx -y @muvon/octocode
```

## When to use it
- find all call sites of a function across files
- trace imports and downstream dependencies for a module
- inspect code signatures without reading whole files
- locate functions by intent using hybrid vector and keyword search

## Example prompts
- Locate every caller of `process_payment` in the repository
- Which files import the authentication middleware and what functions do they run?
- Run a semantic search for JWT token verification logic

## 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
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
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
