Skip to main content
GitNexus exposes its knowledge graph through the Model Context Protocol (MCP), enabling AI editors to query code intelligence directly during conversations.

What is MCP?

The Model Context Protocol is a standard interface for connecting AI assistants to external data sources and tools. GitNexus implements MCP to provide:
  • 7 code intelligence tools for querying the knowledge graph
  • 7 resources for structured on-demand data
  • 2 prompts for guided workflows (impact analysis, architecture mapping)

Available Tools

Your AI agent gets these tools automatically when connected:
ToolPurposeMulti-Repo
list_reposDiscover all indexed repositories
queryProcess-grouped hybrid search (BM25 + semantic + RRF)Optional
context360-degree symbol view with categorized refs and process participationOptional
impactBlast radius analysis with depth grouping and confidence scoresOptional
detect_changesGit-diff impact — maps changed lines to affected processesOptional
renameMulti-file coordinated rename with graph + text searchOptional
cypherRaw Cypher graph queries against the KuzuDB databaseOptional
Multi-Repo Support: With one indexed repo, the repo parameter is optional. With multiple repos, specify which one: query({query: "auth", repo: "my-app"}).

Available Resources

Lightweight reads (100-500 tokens) for navigation:
ResourceContent
gitnexus://reposList all indexed repositories (read first)
gitnexus://repo/{name}/contextCodebase stats, staleness check, available tools
gitnexus://repo/{name}/clustersAll functional clusters with cohesion scores
gitnexus://repo/{name}/cluster/{name}Cluster members and details
gitnexus://repo/{name}/processesAll execution flows
gitnexus://repo/{name}/process/{name}Full process trace with steps
gitnexus://repo/{name}/schemaGraph schema for Cypher queries

MCP Prompts

GitNexus provides two guided workflows:
PromptPurpose
detect_impactPre-commit change analysis — scope, affected processes, risk level
generate_mapArchitecture documentation from the knowledge graph with mermaid diagrams

Editor Support

EditorMCPSkillsHooks (auto-augment)Support Level
Claude Code✓ (PreToolUse)Full
CursorMCP + Skills
WindsurfMCP
OpenCodeMCP + Skills
Claude Code gets the deepest integration: MCP tools + agent skills + PreToolUse hooks that automatically enrich grep/glob/bash calls with knowledge graph context.

Setup Options

Automatic Setup

Run gitnexus setup to auto-configure all detected editors

Claude Code

Full integration with MCP, skills, and PreToolUse hooks

Cursor

MCP and skills configuration for Cursor

Multi-Repo Usage

Global registry and multi-repo architecture

How It Works

When you run gitnexus analyze in a repository:
  1. Indexes the codebase into a KuzuDB graph database (stored in .gitnexus/)
  2. Registers the repo in ~/.gitnexus/registry.json (global registry)
  3. Installs agent skills to teach AI agents how to use the tools
  4. Creates context files (AGENTS.md, CLAUDE.md) for immediate use
The MCP server runs via npx gitnexus mcp and serves all indexed repositories from the global registry. Your editor spawns this process automatically when MCP is configured.

Next Steps

1

Index your repository

Run npx gitnexus analyze in your repo root
2

Configure MCP

Choose your setup method:
3

Start using tools

Your AI agent now has access to all GitNexus tools and resources

Build docs developers (and LLMs) love