The Zero-Server Code Intelligence Engine that indexes any codebase into a knowledge graph, providing AI Agents with deep architectural insights and call-chain tracing via MCP protocol.
Project Positioning#
GitNexus is a zero-server code intelligence engine designed to provide AI Agents with deep architectural understanding of codebases. By indexing code into a knowledge graph and leveraging the MCP (Model Context Protocol), it enables AI coding tools to truly "understand" code structure rather than performing superficial matching.
Core Capabilities#
Knowledge Graph Construction#
- Multi-language AST parsing via Tree-sitter (supports TypeScript, JavaScript, Python, Java, C, C++, C#, Go, Rust — 9 languages)
- Cross-file dependency tracking and call-chain analysis
- Functional clustering detection and execution flow tracing (Processes)
MCP Toolset (7 Core Tools)#
| Tool | Function |
|---|---|
list_repos | Discover all indexed repositories |
query | Hybrid search (BM25 + semantic + RRF), grouped by Process |
context | 360° symbol view — categorized references, Process participation |
impact | Impact range analysis (blast radius), grouped by depth |
detect_changes | Git diff impact mapping — changed lines to affected Processes |
rename | Multi-file coordinated renaming (graph + text search) |
cypher | Native Cypher graph queries |
Agent Skills#
Pre-built skills auto-installed to .claude/skills/:
- Exploring — Navigate unfamiliar code using knowledge graph
- Debugging — Trace bugs through call chains
- Impact Analysis — Analyze impact scope before changes
- Refactoring — Plan safe refactoring based on dependency mapping
Resources & Prompts#
- Resources:
gitnexus://repos,gitnexus://repo/{name}/context,gitnexus://repo/{name}/clusters,gitnexus://repo/{name}/processes,gitnexus://repo/{name}/schema - Prompts:
detect_impact(pre-commit change analysis),generate_map(architecture doc generation with Mermaid diagrams)
Operation Modes#
- CLI Mode: Run locally via npx, supports indexing, MCP service, Wiki generation
- Web UI Mode: Online version with zero installation (drag & drop ZIP), or local run with Bridge Mode connecting to CLI indexes
- Bridge Mode:
gitnexus servestarts local HTTP server connecting CLI and Web UI, reusing index data
Installation & Quick Start#
# Index repository (run in repo root)
npx gitnexus analyze
# Configure MCP (one-time setup)
npx gitnexus setup
gitnexus analyze completes in one step: index codebase, install Agent Skills, register Claude Code Hooks, create AGENTS.md / CLAUDE.md context files.
MCP Configuration Examples#
Claude Code (full support):
claude mcp add gitnexus -- npx -y gitnexus@latest mcp
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"gitnexus": {
"command": "npx",
"args": ["-y", "gitnexus@latest", "mcp"]
}
}
}
Typical Use Cases#
| Scenario | Value |
|---|---|
| AI-Assisted Coding | Provide complete codebase context to Claude Code, Cursor, Windsurf, etc. |
| Impact Analysis | Predict impact scope before changes (e.g., modifying UserService.validate() affects 47 dependent functions) |
| Code Exploration | Rapidly understand unfamiliar codebases via visualized knowledge graph |
| Refactoring Planning | Plan safe refactoring paths based on dependency graphs |
| Documentation Generation | Auto-generate LLM-driven architecture docs with Mermaid diagrams |
| Change Detection | Analyze Git diff impact on Processes at pre-commit stage |
Architecture Highlights#
- Graph Database: KuzuDB (embedded, supports native & WASM)
- AST Parsing: Tree-sitter (multi-language support)
- Vector Embeddings: HuggingFace transformers.js (GPU/CPU & WebGPU/WASM support)
- Search Algorithm: BM25 + semantic vectors + RRF fusion ranking
- Visualization: Sigma.js + Graphology (WebGL rendering)
- Frontend Framework: React 18, TypeScript, Vite, Tailwind v4
Multi-Repository Architecture#
- Each repo stores index in
.gitnexus/ - Global registry at
~/.gitnexus/registry.json - Single MCP server serves all indexed repositories
- KuzuDB connections lazy-loaded, evicted after 5 min inactivity (max 5 concurrent)