Skip to content

kilianpaquier/codegraph

v0.4.0MIT

Pre-indexed code knowledge graph, auto syncs on code changes, fewer tokens, fewer tool calls, 100% local.

codegraph

Pre-indexed code knowledge graph, auto syncs on code changes, fewer tokens, fewer tool calls, 100% local.

MCP server

This plugin registers the codegraph server with direct binary call codegraph serve --mcp.

It indexes a repository into a knowledge graph and exposes tools to explore related symbols, read one symbol with its callers and callees, and measure the impact of a change.

Hooks

EventOutputAgent Runtimes
PreToolUse, before grep or globa reminder to use the codegraph-mcp skillClaude Code, Codex
PostToolUse, after grep or globthe same, where PreToolUse carries no context backCopilot, Cursor
SessionStartwhether the repo is indexed, and to search the graph before grepClaude Code, Codex, Copilot, Cursor
SubagentStartthe same, for every subagent spawnedClaude Code, Codex, Copilot

Skills

SkillDescription
codegraph-mcpActivated on structural code questions to explore related symbols, call paths and blast radius through the codegraph_explore MCP tool rather than a blind grep.
codegraph-cliFallback for querying the knowledge graph through the codegraph CLI when the codegraph MCP is unavailable or blocked.

Installation

[!warning] The codegraph binary and Nodejs are needed in PATH environment variable to work, see the installation methods.

Native plugin (recommended):

my-agent plugin install codegraph@one-for-all

APM package:

apm install kilianpaquier/ai-integration/plugins/codegraph -g

APM plugin:

apm marketplace add kilianpaquier/ai-integration
apm install codegraph@one-for-all -g

Compatibility table

Agent RuntimeManifestMCP configurationHook configuration
APMapm.ymlapm.yml.apm/hooks/hooks.json
Antigravityplugin.jsonmcp_config.json-
Claude Code.claude-plugin/plugin.jsonmcp.jsonhooks/claude.json
Codex.claude-plugin/plugin.jsonmcp.jsonhooks/claude.json
Copilotplugin.jsonmcp.jsoncom.github.copilot/hooks/hooks.json
Cursor.cursor-plugin/plugin.jsonmcp.jsonhooks/cursor.json
Devin.claude-plugin/plugin.jsonmcp.json-