AI coding assistants like Claude Code and Cursor often make changes that break dependencies because they lack full awareness of codebase structure. GitNexus, a new open-source project by an Indian computer science student, solves this by indexing entire repositories into a knowledge graph and exposing it via the Model Context Protocol (MCP).
GitNexus acts as a code intelligence layer, mapping every function call, import, class inheritance, and execution flow. When an AI agent asks "what depends on this function?", GitNexus returns a complete, confidence-scored answer in a single query, eliminating the need for multiple chained queries that can miss critical dependencies.
Running npx gitnexus analyze triggers a multi-phase indexing pipeline. First, it maps file and folder relationships. Then it parses every function, class, and interface using Tree-sitter ASTs, capturing structural details that agents can query in real-time. With over 28,000 GitHub stars and 45 contributors, GitNexus is already proving essential for developers tired of fixing broken changes caused by AI agents that lack context.