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:| Tool | Purpose | Multi-Repo |
|---|---|---|
list_repos | Discover all indexed repositories | — |
query | Process-grouped hybrid search (BM25 + semantic + RRF) | Optional |
context | 360-degree symbol view with categorized refs and process participation | Optional |
impact | Blast radius analysis with depth grouping and confidence scores | Optional |
detect_changes | Git-diff impact — maps changed lines to affected processes | Optional |
rename | Multi-file coordinated rename with graph + text search | Optional |
cypher | Raw Cypher graph queries against the KuzuDB database | Optional |
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:| Resource | Content |
|---|---|
gitnexus://repos | List all indexed repositories (read first) |
gitnexus://repo/{name}/context | Codebase stats, staleness check, available tools |
gitnexus://repo/{name}/clusters | All functional clusters with cohesion scores |
gitnexus://repo/{name}/cluster/{name} | Cluster members and details |
gitnexus://repo/{name}/processes | All execution flows |
gitnexus://repo/{name}/process/{name} | Full process trace with steps |
gitnexus://repo/{name}/schema | Graph schema for Cypher queries |
MCP Prompts
GitNexus provides two guided workflows:| Prompt | Purpose |
|---|---|
detect_impact | Pre-commit change analysis — scope, affected processes, risk level |
generate_map | Architecture documentation from the knowledge graph with mermaid diagrams |
Editor Support
| Editor | MCP | Skills | Hooks (auto-augment) | Support Level |
|---|---|---|---|---|
| Claude Code | ✓ | ✓ | ✓ (PreToolUse) | Full |
| Cursor | ✓ | ✓ | — | MCP + Skills |
| Windsurf | ✓ | — | — | MCP |
| OpenCode | ✓ | ✓ | — | MCP + 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 editorsClaude 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 rungitnexus analyze in a repository:
- Indexes the codebase into a KuzuDB graph database (stored in
.gitnexus/) - Registers the repo in
~/.gitnexus/registry.json(global registry) - Installs agent skills to teach AI agents how to use the tools
- Creates context files (
AGENTS.md,CLAUDE.md) for immediate use
npx gitnexus mcp and serves all indexed repositories from the global registry. Your editor spawns this process automatically when MCP is configured.
Next Steps
Configure MCP
Choose your setup method:
- Run
npx gitnexus setupfor automatic configuration - Or follow the editor-specific guides