Markdown-first memory infrastructure for AI agents with hybrid search
Project description
memtomem
🚧 Alpha — APIs, defaults, and on-disk config surfaces may still change between
0.1.xreleases. Feedback and issue reports are especially welcome at github.com/memtomem/memtomem/issues.
Markdown-first long-term memory infrastructure for AI agents. Hybrid keyword + semantic search across your notes, docs, and code via the Model Context Protocol.
Core philosophy: .md files are the source of truth and the vector database is a derived cache. Manage memories as plain text files — memtomem makes them instantly searchable.
Built for:
- AI agents (Claude Code, Cursor, Windsurf, Claude Desktop) that need to remember between sessions
- Developers who want a searchable knowledge base built from their existing markdown notes — no proprietary database, no vendor lock-in
- Multilingual content (English, Korean, Japanese, Chinese) via
bge-m3embeddings
Quick Start
# 1. Install memtomem with all features (requires Python 3.12+)
uv tool install 'memtomem[all]' # or: pipx install 'memtomem[all]'
mm --version # verify — if stale, re-run with --refresh
# 2. Run the setup (preset picker → memory_dir + MCP)
mm init # on PATH after `uv tool install` — no `uv run` needed
[all] pulls in ONNX dense embeddings, Korean tokenizer, Ollama / OpenAI SDKs, code chunker, and the Web UI. Skip it (uv tool install memtomem bare) for a BM25-only install (~40 MB); opt in later with uv tool install --reinstall 'memtomem[onnx,web]' or similar.
uvcaches PyPI metadata. Ifmm --versiondoesn't match the latest release right after install, re-run withuv tool install 'memtomem[all]' --refreshor clear the cache:uv cache clean memtomem.
mm: command not found?uvinstalls the shim to~/.local/bin— add it to$PATHwithuv tool update-shell, then open a new shell.
The picker offers three presets and an Advanced fallback:
| Preset | Embedding | Reranker | Tokenizer |
|---|---|---|---|
| Minimal | BM25 only (no download) | — | unicode61 |
| English (Recommended) | ONNX bge-small-en-v1.5 (~33 MB, 384d) |
English (ms-marco-MiniLM-L-6-v2) |
unicode61 |
| Korean-optimized | ONNX bge-m3 (~1.2 GB, 1024d) |
Multilingual (jina-reranker-v2) |
kiwipiepy |
| Advanced | — | — | — (full 10-step wizard, all options) |
Pick a preset interactively, or use mm init -y (minimal), mm init --preset korean -y, or mm init --advanced for scripted runs. See Embeddings for the full model matrix.
Then in your AI editor, ask:
"Call the mem_status tool" → confirms the server is connected
"Index my notes folder" → mem_index(path="~/notes")
"Search for deployment" → mem_search(query="deployment checklist")
"Remember this insight" → mem_add(content="...", tags=["ops"])
Prefer the terminal?
mm statusis a CLI mirror ofmem_status— same output, no editor needed.
That's it. Your agent now has a long-term memory built from plain markdown files.
For full setup, OpenAI configuration, and troubleshooting, see the Getting Started guide.
Prefer no install? (uvx direct, MCP only)
If you'd rather skip the CLI install, uvx will download and run memtomem on demand. ~/.memtomem/memories is always indexed; for AI tool memory folders (Claude Code per-project memory, Claude plans, Codex memories), run mm init once and pick the surfaces you want indexed — nothing is added silently. Set MEMTOMEM_INDEXING__MEMORY_DIRS to add custom paths.
claude mcp add memtomem -s user -- uvx --from memtomem memtomem-server
Or add the following to your MCP client config file — the path depends on
the editor: ~/.cursor/mcp.json (Cursor),
~/.codeium/windsurf/mcp_config.json (Windsurf),
~/Library/Application Support/Claude/claude_desktop_config.json
(Claude Desktop), or ~/.gemini/settings.json (Gemini CLI):
{
"mcpServers": {
"memtomem": {
"command": "uvx",
"args": ["--from", "memtomem", "memtomem-server"],
"env": {
"MEMTOMEM_INDEXING__MEMORY_DIRS": "[\"/path/to/your/notes\"]"
}
}
}
}
Key Features
- 🔍 Hybrid search — BM25 (FTS5) + dense vectors (sqlite-vec) merged via Reciprocal Rank Fusion. Exact terms via keyword, meaning via semantic, both at once.
- 📦 Semantic chunking — heading-aware Markdown, AST-based Python, tree-sitter JS/TS, structure-aware JSON/YAML/TOML
- ♻️ Incremental indexing — chunk-level SHA-256 diff means only changed chunks get re-embedded
- 🏷️ Namespaces — scope memories into groups (work / personal / project) with optional auto-derivation from folder names
- 🧹 Maintenance — near-duplicate detection with merge, time-based score decay, TTL expiration, auto-tagging
- 🔄 Export / import — JSON bundle backup and restore with re-embedding
- 🌐 Web UI — polished SPA dashboard for search, sources, indexing, tags, and timeline (
mm web --devunlocks the full maintainer surface including Sessions, Working Memory, and Health Report) - 🛠️ 74 MCP tools — full feature surface as MCP tools, with
mem_dometa-tool routing all registered actions incoremode (default) for minimal context usage
Documentation
Full documentation lives in the memtomem GitHub repo:
| Guide | Topic |
|---|---|
| Getting Started | Start here — install, setup wizard, first use |
| Reference | Complete feature reference — all tools and patterns |
| Configuration | All MEMTOMEM_* environment variables |
| Embeddings | ONNX, Ollama, and OpenAI providers, model dimensions, switching models |
| MCP Client Setup | Editor-specific configuration |
| memtomem-stm | Optional STM proxy for proactive memory surfacing (separate package) |
License
Apache License 2.0 — see LICENSE for details.
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 memtomem-0.1.32.tar.gz.
File metadata
- Download URL: memtomem-0.1.32.tar.gz
- Upload date:
- Size: 477.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ece2b17ba0c1e88aa412a7bcf34c343b8c7e56eb9fffb93be5f1160d7dcc34e
|
|
| MD5 |
58fb80c80996fac20c89381e7500298f
|
|
| BLAKE2b-256 |
af3cc56100b6e499ed666172202ff4472e3d5cbff50694fab44406e5cdfed0d2
|
Provenance
The following attestation bundles were made for memtomem-0.1.32.tar.gz:
Publisher:
release.yml on memtomem/memtomem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memtomem-0.1.32.tar.gz -
Subject digest:
7ece2b17ba0c1e88aa412a7bcf34c343b8c7e56eb9fffb93be5f1160d7dcc34e - Sigstore transparency entry: 1389258249
- Sigstore integration time:
-
Permalink:
memtomem/memtomem@b0040247e9e13ad754f9989c1e3abeecf1e2fa84 -
Branch / Tag:
refs/tags/v0.1.32 - Owner: https://github.com/memtomem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b0040247e9e13ad754f9989c1e3abeecf1e2fa84 -
Trigger Event:
push
-
Statement type:
File details
Details for the file memtomem-0.1.32-py3-none-any.whl.
File metadata
- Download URL: memtomem-0.1.32-py3-none-any.whl
- Upload date:
- Size: 593.9 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 |
689ba097054f54a51f49641f22f80fcd6e32589687897cebb3d9fab214504a46
|
|
| MD5 |
52956ae050ccb771995f8d5594e68735
|
|
| BLAKE2b-256 |
69c4835363c13d5b18e0c3e61762ec3b46b9bbaf996572f36816b9b7947d76e9
|
Provenance
The following attestation bundles were made for memtomem-0.1.32-py3-none-any.whl:
Publisher:
release.yml on memtomem/memtomem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memtomem-0.1.32-py3-none-any.whl -
Subject digest:
689ba097054f54a51f49641f22f80fcd6e32589687897cebb3d9fab214504a46 - Sigstore transparency entry: 1389258267
- Sigstore integration time:
-
Permalink:
memtomem/memtomem@b0040247e9e13ad754f9989c1e3abeecf1e2fa84 -
Branch / Tag:
refs/tags/v0.1.32 - Owner: https://github.com/memtomem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b0040247e9e13ad754f9989c1e3abeecf1e2fa84 -
Trigger Event:
push
-
Statement type: