codebase-memory-mcp-pro-knowledge-graph

Indexes codebases into a persistent knowledge graph queryable with Cypher via MCP.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill codebase-memory-mcp-pro-knowledge-graph-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-memory-mcp-pro-knowledge-graph
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/codebase-memory-mcp-pro-knowledge-graph
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill codebase-memory-mcp-pro-knowledge-graph-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Understanding large codebases—finding callers, tracing call chains, and assessing the blast radius of a change—normally requires slow manual searching. This Skill builds a persistent knowledge graph of functions, classes, and cross-file references so AI agents can answer structural code questions instantly. ## Core Features & Use Cases - Knowledge Graph Indexing: Parses code with tree-sitter across 158 languages and stores functions, classes, call edges, and imports in a queryable graph. - Cypher Graph Queries: Run Cypher to find callers, detect dead code, trace call paths, and map module dependencies. - Blast-Radius Analysis: The enhanced explore and detect_changes tools return transitive caller impact with hop depth for safe refactoring decisions. - Use Case: Before renaming a shared validateUser function, query the graph for all transitive callers up to 3 hops to see every file affected, then re-index incrementally after the edit without losing cross-file call edges. ## Quick Start Ask the agent to index this repository with codebase-memory and then show all callers of a specific function.

Frequently Asked Questions about codebase-memory-mcp-pro-knowledge-graph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find all callers of a function in a large codebase?▼

Index the repository with the index_repository tool, then run a Cypher query via query_graph matching CALLS edges into the target function. The explore tool also returns attributed callers with fan-in hotspot flags in a single call.

How to analyze the blast radius of a code change before refactoring?▼

Use the detect_changes tool with a depth parameter to get transitive caller impact, where each impacted symbol is tagged with its hop distance from the changed file. Alternatively, query CALLS edges with variable-length paths in Cypher.

What is the difference between codebase-memory-mcp and the pro fork?▼

The pro fork fixes incremental re-indexing so inbound cross-file CALLS edges survive file edits, corrects Cypher aggregation grouping, adds distinct Swift struct/enum/actor labels with EnumCase nodes, and enhances explore with one-call blast-radius analysis.

Does codebase-memory-mcp support Swift code analysis?▼

Yes, the fork emits distinct Struct, Enum, and Actor graph labels instead of lumping them as Class, and extracts enum cases as EnumCase nodes, including multi-name case declarations. Static methods on enums are no longer duplicated.

Why does incremental re-indexing lose call edges?▼

That is an upstream bug where editing a file orphans inbound calls to its symbols. The fork fixes it, so rebuild from the fork source with ./scripts/build.sh and verify with a WITH-aggregation Cypher query returning non-empty file paths.

Can I use codebase-memory-mcp without an AI agent?▼

Yes, the binary supports direct CLI invocation with the form codebase-memory-mcp cli <tool_name> '<json_args>', so you can index repositories and run graph queries from shell scripts without MCP stdio mode.