pi-codebase-memory-mcp
Pi package that bridges the codebase-memory-mcp server into pi as native tools — a tree-sitter knowledge graph for fast structural code search, call-path tracing, architecture overviews, and impact analysis.
Package details
Install pi-codebase-memory-mcp from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-codebase-memory-mcp- Package
pi-codebase-memory-mcp- Version
0.1.2- Published
- Jun 18, 2026
- Downloads
- not available
- Author
- porameht
- License
- MIT
- Types
- extension, skill
- Size
- 12.2 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
],
"skills": [
"./skills"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-codebase-memory-mcp
A pi package that bridges the codebase-memory-mcp server into pi as native tools. Gives your agent a fast, local tree-sitter knowledge graph of your repos — structural code search, call-path tracing, architecture overviews, and change-impact analysis in milliseconds, with far fewer tokens than file-by-file grepping.
- Server:
codebase-memory-mcp(single static binary, MCP over stdio, 100% local, zero dependencies) - Upstream: DeusData/codebase-memory-mcp
Requirements
The codebase-memory-mcp binary installed locally:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
(macOS/Linux; Windows via install.ps1. Also on Homebrew, Scoop, AUR, npm, PyPI.) The binary is resolved from CBM_MCP_BIN, then ~/.local/bin/codebase-memory-mcp, then your PATH.
Install
pi install npm:pi-codebase-memory-mcp
Or try it without installing:
pi -e npm:pi-codebase-memory-mcp
What you get
- Extension — spawns the local
codebase-memory-mcpserver over stdio, discovers its tools dynamically, and registers each as a pi tool with acbm_prefix. cbm_connecttool — always available, so the agent can start (or restart) the server mid-session and pick up newly discovered tools immediately.- Safety gate —
cbm_delete_projectpops a confirmation dialog before wiping a project's graph (disable withCBM_CONFIRM=off). - Skill —
codebase-memory, teaching the agent the index → search → trace → query workflow.
Tools (discovered dynamically)
Indexing: cbm_index_repository, cbm_list_projects, cbm_delete_project, cbm_index_status
Querying: cbm_search_graph, cbm_trace_path, cbm_detect_changes, cbm_query_graph, cbm_get_graph_schema, cbm_get_code_snippet, cbm_get_architecture, cbm_search_code, cbm_manage_adr, cbm_ingest_traces
Example prompts
- "Index this project."
- "What calls
ProcessOrder?" - "Find every function matching
.*Handler.*." - "Give me an architecture overview of this repo."
- "What's the blast radius of my current git changes?"
- "Show the source for the
Searchfunction."
Configuration
| Environment variable | Default | Purpose |
|---|---|---|
CBM_MCP_BIN |
(auto) | Absolute path to the codebase-memory-mcp binary (overrides auto-detection) |
CBM_CONFIRM |
on |
Set to off to skip the confirmation dialog for cbm_delete_project |
Notes
- Tools are discovered at connection time; the set may change between server versions.
- If the binary isn't installed when pi starts, pi still starts normally — install it, then ask the agent to connect (
cbm_connect). - Index with an absolute
repo_path. After the first index, a background watcher keeps the graph fresh.
License
MIT