Big Indexer Big Indexer
Published on MCP Registry & PyPI

Architecture-Aware Code Intelligence for Massive Codebases.

Big Indexer (BGI) maps 100,000+ unit repositories by behavioral role, calculates blast-radius seams, and provides deterministic architectural context to AI coding agents via the Model Context Protocol (MCP).

$ pip install bigindexer && bgi mcp

Why Traditional Tools Break on Large Codebases

Vector search treats code like unstructured prose, while raw call-graphs explode into unreadable edge soup. BGI bridges the gap with behavioral tokenization and hard-bounded clustering.

✕

Embeddings & RAG Fail

Chunk-based semantic search retrieves snippets that sound similar but completely misses structural call chains, runtime hierarchies, and cross-subsystem contracts.

Context rot in LLM prompts
No macro-architectural boundary map
⚠

Raw Call-Graphs Explode

Unscoped call graphs scale at O(N²), generating tens of thousands of noisy edges that collapse unrelated modules into unusable giant mega-clusters.

Unmanageable edge soup
Mega-clusters obscure real seams
✓

The BGI Architecture

BGI groups units by behavioral role (COV tokens), uses spectral masks to constrain edge generation, and caps cluster growth while emitting fuse-boundary signals.

Deterministic Key-Lock call resolution
First-class fuse-boundary seam signals

The 3-Gate Deterministic Pipeline

Single-pass AST queries extract functional contracts, scoped spectral masks create behavioral edges, and hard-bounded community detection prevents over-merging.

Gate 1

Fingerprint Roles

Extracts units via Tree-sitter .scm queries. Assigns behavioral COV tokens (e.g. AUTHENTICATE, PERSIST, DISPATCH).

COV.FETCH ↔ COV.PERSIST
Gate 2

Scoped Matching

Forms Key-Lock edges between complementary units. Spectral masks restrict match scope to eliminate cross-file noise.

Key: COV.INIT / Lock: TEARDOWN
Gate 3

Bounded Clustering

DRS clustering merges tightly coupled units under a strict size cap. Refused merges emit explicit fuse-boundary signals.

fuse-graph.json (Seams)
Output

MCP Context Server

Serves SQLite index to AI agents via MCP tools: task_fingerprint, behavioral_twins, and twin_context.

io.github.ahmedxuhri/bigindexer

Head-to-Head Capability Matrix

Capability LSP / SCIP Index Generic Call-Graph / Community Big Indexer (BGI)
Symbol & Definition Lookup Strong Medium Yes (Phase 6 Index)
Behavioral Token Model (COV) No No Yes (Gate 1)
Hard-Bounded Cluster Growth No Rare (over-merges) Yes (Max <2% repo)
First-Class Seam & Boundary Signal No No Yes (fuse-graph.json)
Scope-Constrained Matching File-only No (unbounded O(N²)) Yes (Spectral Masks)
Native Model Context Protocol (MCP) Custom integrations No Yes (Official Registry)

Two Commands to Full Codebase Intelligence

Run static architecture analysis locally or hook BGI directly into Claude Desktop, Cursor, or your CI/CD pipeline.

Terminal CLI Workflow
# 1. Install via pip
pip install bigindexer

# 2. Scan codebase & generate boundary artifacts
bgi scan /path/to/repo \
  --lang auto \
  --out bgi-graph.json \
  --fuse-graph fuse-graph.json \
  --routes routes.json

# 3. Launch MCP context server
bgi mcp --graph bgi-graph.json --fuse-graph fuse-graph.json
Claude / Cursor MCP Client Prompt
// Prompt your AI coding agent
"Use MCP tool twin_context for task:
 'Add rate-limiting middleware that validates tokens and logs latency.'
 Return top behavioral twin, blast radius seam, and rubric checklist."

// BGI MCP returns:
Twin: auth_module.py::TokenValidator
Seam Risk: High (3 inbound links to dispatch_engine.py)
Checklist: [Handle TokenExpired, Assert metric_emit, Keep in Cluster 2]
Open RepoIndex Search Engine GitHub PR Risk Bot Action