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.2.tar.gz (44.4 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.2-py3-none-any.whl (80.3 kB view details)

Uploaded Python 3

File details

Details for the file claude_repo_mem-0.1.2.tar.gz.

File metadata

  • Download URL: claude_repo_mem-0.1.2.tar.gz
  • Upload date:
  • Size: 44.4 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.2.tar.gz
Algorithm Hash digest
SHA256 26aa60b6adf140f1e884cf2e9957dbfe46add1f9418ce3b93a4b5eb4b1a182b5
MD5 08c0a8fb2a9f5cbf5f2236764a6ac0da
BLAKE2b-256 c5cfe2d59b3d4eac1e5268a55aad8638d9e429c0ac32663a3c87d3185ad5cc74

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_repo_mem-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: claude_repo_mem-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 80.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 01ec7ae59d95db0fd7f4b6f771a8b0aca039c8d00a001cb8524e01465f9e4441
MD5 3d0115d63e9b1920ca38b8cce9aedcea
BLAKE2b-256 57e66ce5293b523066a29255b7eef05447a1d65de08415ff8fd137c6ff422ab2

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_repo_mem-0.1.2-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