GitNexus Gives AI Coding Agents Full Codebase Vision Before Touching Anything
GitNexus turns any codebase into a precomputed knowledge graph with 17 MCP tools, giving AI coding agents full architectural context so they stop shipping blind edits
ProTakeaways
- What: GitNexus builds a precomputed knowledge graph of your codebase and exposes it to AI coding agents via 17 MCP tools, giving them full architectural context before editing code.
- Core innovation: Precomputes clustering, call chains, and dependency scoring at index time so agents get complete answers in one tool call instead of 4-10 sequential graph queries.
- Two modes: CLI + MCP for daily development (local, private, any repo size) and a zero-install web UI for quick exploration (browser-only, ~5k file limit).
- Editor support: Full integration with Claude Code, Cursor, Codex, and Antigravity; MCP-only for Windsurf, OpenCode, CodeBuddy, and Qoder -- configured in one
gitnexus setupcommand. - 14 languages supported including TypeScript, Python, Java, Go, Rust, and C#; control-flow and taint analysis currently TypeScript/JavaScript only.
- Pricing: Free for non-commercial use (PolyForm license); enterprise SaaS/self-hosted via Akon Labs with PR review automation and auto-reindexing.
AI coding agents are powerful but architecturally blind. You ask Cursor or Claude Code to refactor a service, and it edits the function without knowing 47 other functions depend on its return type. Breaking changes ship. GitNexus is an open-source tool that fixes this by building a complete knowledge graph of your codebase and exposing it to your AI agent through a set of smart MCP tools, so the model always has the full picture before it touches anything.
The project has picked up over 45,000 GitHub stars and 5,000 forks, a signal that this is a real pain point for teams shipping with AI agents today.
The problem with how agents read code today
Most AI coding tools retrieve context by doing a similarity search over your files and handing the results to the model. That works for isolated questions but falls apart for anything structural. The model doesn't know your call chains, your dependency graph, or which processes would break if a shared utility changes its signature.
Traditional Graph RAG (retrieval-augmented generation using a graph database) is one step better, but it still hands the raw graph edges to the model and hopes it explores enough of them. That typically means 4 to 10 sequential queries to answer a single structural question, burning tokens and still missing context.
GitNexus takes a different approach: precomputed relational intelligence. Instead of letting the model explore the graph at query time, GitNexus does all the structural analysis upfront at index time, clustering related symbols into functional communities, tracing execution flows from entry points, and scoring confidence on every dependency edge. When an agent asks a question, the tool returns a complete, pre-structured answer in a single call.
Two ways to use it
GitNexus ships in two modes that can work together:
- CLI + MCP (recommended for daily use) -- index your repo locally, connect your editor via MCP, and your agent gets full architectural context on every query. Everything stays on your machine, no network calls.
- Web UI -- a zero-install browser-based graph explorer at gitnexus.vercel.app. Drop in a GitHub URL or ZIP file and get an interactive visual graph with a built-in chat agent. Limited to roughly 5,000 files by browser memory, but works instantly for quick exploration or demos.
A bridge mode connects the two: run gitnexus serve locally and the web UI auto-detects it, giving you the visual interface backed by your full CLI-indexed repos.
Getting started in two commands
# 1. Index your repo (run from repo root)
npx gitnexus analyze
# 2. Connect your editors (one-time, auto-detects Claude Code, Cursor, Codex, ...)
npx gitnexus setupanalyze walks your file tree, parses every symbol using Tree-sitter ASTs, resolves cross-file imports and call chains, clusters related code into functional communities using Leiden community detection (a graph algorithm that finds tightly connected groups), traces execution flows from entry points, and builds a hybrid BM25 + semantic search index. setup writes the MCP config for whatever editors it detects on your machine -- one-time, works globally across all projects.
What the agent actually gets
Once connected, your agent has access to 17 MCP tools. The most important ones:
impact-- blast radius analysis. Ask what depends onUserServiceupstream and get back every caller, grouped by depth, with confidence scores and risk levels. No multi-step exploration needed.context-- 360-degree view of any symbol: all incoming calls, all outgoing calls, which execution flows it participates in, and at what step.detect_changes-- maps your current git diff to affected processes and symbols, with a risk level, before you commit.trace-- finds the shortest directed path between any two symbols through the call graph.query-- hybrid search that groups results by execution flow, so you get LoginFlow and its relevant symbols rather than a flat list of files.rename-- graph-aware multi-file rename that distinguishes high-confidence graph edits from lower-confidence text-search edits.cypher-- raw Cypher queries against the graph for power users who want to write their own traversals.
The agent also gets pre-installed skills under .claude/skills/ and .agents/skills/ for workflows like /gitnexus-plan (graph-backed implementation plans), /gitnexus-work (impact-checked atomic commits), and /gitnexus-review (graph-backed PR review with taint analysis).
How the indexing pipeline works
The pipeline runs in six phases:
- Structure -- walks the file tree and maps folder/file relationships
- Parsing -- extracts functions, classes, methods, and interfaces using Tree-sitter ASTs across 14 languages
- Resolution -- resolves imports, function calls, class inheritance, and
self/thisreceiver types across files with language-aware logic - Clustering -- groups related symbols into functional communities using Leiden community detection
- Processes -- traces execution flows from entry points through call chains
- Search -- builds hybrid BM25 + semantic vector indexes for fast retrieval
The graph is stored in LadybugDB (an embedded graph database, formerly KuzuDB) inside a .gitnexus/ folder in your repo. A global registry at ~/.gitnexus/registry.json lets one MCP server serve all your indexed repos simultaneously, with lazy connection pooling so it doesn't hold open database connections for repos you aren't actively querying.
Language support
GitNexus supports 14 languages with varying depth of analysis. TypeScript, JavaScript, Python, Java, Kotlin, C#, Go, Rust, PHP, Ruby, Swift, C, C++, and Dart are all supported for parsing and entry point detection. Full import resolution, named binding tracking, and heritage (class inheritance/interfaces) are available for most of them. Control-flow graph analysis (needed for taint tracking and data-flow queries) is currently TypeScript and JavaScript only, with other languages planned.
Where it falls short
A few real limitations worth knowing before you commit:
- Browser mode caps at ~5,000 files -- the web UI runs everything in WebAssembly in-memory, so large repos need the CLI + backend mode.
- Incremental indexing is still on the roadmap -- every
gitnexus analyzecurrently re-indexes the full repo. For large codebases this adds up. - Control-flow and taint analysis is JS/TS only -- the
--pdgflag that enables statement-level data-flow queries only works for TypeScript and JavaScript right now. - npm 11 has a known install bug -- the workaround is to use pnpm or install globally before running.
- Self-hosted Render deployment costs ~$35/month -- if you want a persistent hosted instance rather than running locally.
The real shift here
The deeper implication of GitNexus isn't just better context for agents -- it's that the quality of agent output no longer needs to scale with model size. The README makes this explicit: smaller models get full architectural clarity because the tools do the structural reasoning, not the model. That's a meaningful shift in how you think about the cost/quality tradeoff when deploying AI coding agents on large codebases.
It also changes the MCP server model. Instead of per-project configuration, GitNexus uses a global registry so one server instance covers every repo you've indexed. That's a small ergonomic detail that compounds quickly when you're working across many projects.
GitNexus is free for non-commercial use under the PolyForm Noncommercial license. An enterprise tier with automated PR review, auto-reindexing, and multi-repo unified graphs is available through Akon Labs. The npm package is available now at npm install -g gitnexus, and the web UI requires no install at all.