Durable, hierarchical, repo-scoped memory for Claude Code. Local-first MCP server with hybrid lexical + vector retrieval over your codebase, docs, and accumulated decisions.
Project description
claude-repo-mem
Durable, hierarchical, repo-scoped memory for Claude Code. Local-first MCP server.
claude-repo-mem indexes your repository — code, docs, and your own accumulated decisions — into a SQLite database with hybrid lexical + vector retrieval, then exposes it to Claude Code as 11 MCP tools.
Install
pip install claude-repo-mem
Requires Python 3.11+.
Quick start
cd your-repo
claude-repo-mem index # build the index (downloads bge-small on first run, ~90MB)
claude-repo-mem doctor # verify: units, by_layer, T2 coverage, counters
To expose it to Claude Code, drop a .mcp.json in your repo root:
{
"mcpServers": {
"claude-repo-mem": {
"command": "claude-repo-mem",
"args": ["serve", "--watch"]
}
}
}
Claude Code will auto-launch the server on workspace load. The --watch flag runs an incremental file watcher (debounced 750ms) so the index stays current as you edit.
Prefer not to run the watcher? Install a git hook instead:
claude-repo-mem install-hooks # writes .git/hooks/post-commit
CLI
claude-repo-mem index [--embedder NAME] [--no-embed] [--reset]
claude-repo-mem serve [--watch | --no-watch]
claude-repo-mem doctor # layer counts, T2 coverage, counters
claude-repo-mem install-hooks [--force] # git post-commit reindex
claude-repo-mem distill [--yes] [--transcript PATH] # extract durable memories from a transcript
claude-repo-mem bench --fixture queries.yaml [--k 5] [--no-embed]
Languages and synthesizers
| Language | Parser | Notes |
|---|---|---|
| Python | tree-sitter | classes, methods, functions, docstrings |
| JavaScript / TypeScript | tree-sitter | functions, classes, methods, JSX |
| Java | tree-sitter | classes, interfaces, methods, constructors |
| Go | tree-sitter | funcs, methods, structs, interfaces |
| Rust | tree-sitter | fn, impl methods, structs, traits |
| Markdown | markdown-it | sections by heading hierarchy |
Synthesizers add cross-file edges on top of parser output:
- Flask
@app.route(...)→ handler. - Django
path(...)/re_path(...)→ handler (resolves dotted refs againstviews.py). - Express
app.METHOD(url, handler)→ same-file handler. - Python imports → cross-module edges.
- React hooks —
useStatesetter calls emitmutates_state_ofedges on the containing component.
License
MIT. See LICENSE.
Release notes for each version live in CHANGELOG.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_repo_mem-0.1.1.tar.gz.
File metadata
- Download URL: claude_repo_mem-0.1.1.tar.gz
- Upload date:
- Size: 44.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d2d2d9bb4db9bbd964d783414b85ea410528afe0848d52acbeb262f4d9d317e
|
|
| MD5 |
117aaed74b5ec5f725bf240e1b2f0e44
|
|
| BLAKE2b-256 |
fb57c798e9bcc0c067b904ea401f20e60807a0c912f135ebd97cf4190e2ffb4c
|
Provenance
The following attestation bundles were made for claude_repo_mem-0.1.1.tar.gz:
Publisher:
python-publish.yml on amritmalla/claude-repo-mem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_repo_mem-0.1.1.tar.gz -
Subject digest:
2d2d2d9bb4db9bbd964d783414b85ea410528afe0848d52acbeb262f4d9d317e - Sigstore transparency entry: 1639253838
- Sigstore integration time:
-
Permalink:
amritmalla/claude-repo-mem@01dae1a1695d92fec114ffc8b407177c0193f0af -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/amritmalla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@01dae1a1695d92fec114ffc8b407177c0193f0af -
Trigger Event:
release
-
Statement type:
File details
Details for the file claude_repo_mem-0.1.1-py3-none-any.whl.
File metadata
- Download URL: claude_repo_mem-0.1.1-py3-none-any.whl
- Upload date:
- Size: 80.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
add0a4fb4625f30ec3d9952f7bcb57d8f2d55e81c347419c8738b5076378e2bd
|
|
| MD5 |
0af930a0ba584883d085cd2d6a19570c
|
|
| BLAKE2b-256 |
9e4a90b0da0809dd7b21bc9da3d225394aeecc8d268f993bcaa389dbd5a808b9
|
Provenance
The following attestation bundles were made for claude_repo_mem-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on amritmalla/claude-repo-mem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_repo_mem-0.1.1-py3-none-any.whl -
Subject digest:
add0a4fb4625f30ec3d9952f7bcb57d8f2d55e81c347419c8738b5076378e2bd - Sigstore transparency entry: 1639253940
- Sigstore integration time:
-
Permalink:
amritmalla/claude-repo-mem@01dae1a1695d92fec114ffc8b407177c0193f0af -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/amritmalla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@01dae1a1695d92fec114ffc8b407177c0193f0af -
Trigger Event:
release
-
Statement type: