Skip to main content

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 against views.py).
  • Express app.METHOD(url, handler) → same-file handler.
  • Python imports → cross-module edges.
  • React hooksuseState setter calls emit mutates_state_of edges on the containing component.

License

MIT. See LICENSE.

Release notes for each version live in CHANGELOG.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_repo_mem-0.1.1.tar.gz (44.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_repo_mem-0.1.1-py3-none-any.whl (80.2 kB view details)

Uploaded Python 3

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

Hashes for claude_repo_mem-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2d2d2d9bb4db9bbd964d783414b85ea410528afe0848d52acbeb262f4d9d317e
MD5 117aaed74b5ec5f725bf240e1b2f0e44
BLAKE2b-256 fb57c798e9bcc0c067b904ea401f20e60807a0c912f135ebd97cf4190e2ffb4c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for claude_repo_mem-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 add0a4fb4625f30ec3d9952f7bcb57d8f2d55e81c347419c8738b5076378e2bd
MD5 0af930a0ba584883d085cd2d6a19570c
BLAKE2b-256 9e4a90b0da0809dd7b21bc9da3d225394aeecc8d268f993bcaa389dbd5a808b9

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page