Skip to main content

Markdown-first memory infrastructure for AI agents with hybrid search

Project description

memtomem

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-m3 embeddings

Installation

# As an MCP server (most common — no install needed, uvx handles it)
ollama pull nomic-embed-text         # one-time embedding model

# Add to Claude Code
claude mcp add memtomem -s user -- uvx --from memtomem memtomem-server

# Or add to .mcp.json for Cursor / Windsurf / Claude Desktop
{
  "mcpServers": {
    "memtomem": {
      "command": "uvx",
      "args": ["--from", "memtomem", "memtomem-server"],
      "env": {
        "MEMTOMEM_INDEXING__MEMORY_DIRS": "/path/to/your/notes"
      }
    }
  }
}

For terminal use, install the CLI separately:

uv tool install memtomem    # or: pipx install memtomem
mm init                     # 7-step interactive wizard

Quick Start

In your AI editor, ask:

"Index my notes folder"   →  mem_index(path="~/notes")
"Search for deployment"   →  mem_search(query="deployment checklist")
"Remember this insight"   →  mem_add(content="...", tags="ops")

That's it. Your agent now has a long-term memory built from plain markdown files.

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 — full-featured SPA dashboard for search, sources, indexing, tags, sessions, health monitoring
  • 🛠️ 72 MCP tools — full feature surface as MCP tools, with mem_do meta-tool routing 64 actions in core mode (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
Hands-On Tutorial Follow-along with example files
User Guide Complete feature walkthrough — all tools and patterns
Configuration All MEMTOMEM_* environment variables
Embeddings Ollama and OpenAI providers, model dimensions, switching models
MCP Client Setup Editor-specific configuration
Agent Memory Guide Sessions, working memory, procedures, multi-agent
Web UI Guide Visual dashboard reference
Hooks Claude Code hooks for automatic indexing and search
memtomem-stm Optional STM proxy for proactive memory surfacing (separate package)

License

Apache License 2.0 — see LICENSE for details.

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

memtomem-0.1.0.post1.tar.gz (238.1 kB view details)

Uploaded Source

Built Distribution

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

memtomem-0.1.0.post1-py3-none-any.whl (314.4 kB view details)

Uploaded Python 3

File details

Details for the file memtomem-0.1.0.post1.tar.gz.

File metadata

  • Download URL: memtomem-0.1.0.post1.tar.gz
  • Upload date:
  • Size: 238.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memtomem-0.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 42c1a660af01b6bf59238731412cb43c762920bc757485b9a752b8e57bb075d0
MD5 71a84392381d5a7fcedbebd8a2423fa2
BLAKE2b-256 9b45a150f1d2f4e6fd6ab9075292bd5ed93d238a20036c2aa1248d3a870f8cad

See more details on using hashes here.

Provenance

The following attestation bundles were made for memtomem-0.1.0.post1.tar.gz:

Publisher: release.yml on memtomem/memtomem

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

File details

Details for the file memtomem-0.1.0.post1-py3-none-any.whl.

File metadata

  • Download URL: memtomem-0.1.0.post1-py3-none-any.whl
  • Upload date:
  • Size: 314.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memtomem-0.1.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 911642fdb4ce86bf664c2542c132c6f281659ffce9cc7e94ef1cc19672a34865
MD5 a1091c35f19aea62c928fc4e387bb82b
BLAKE2b-256 b384728add75de1020d8f41f2af8d4071683f9da5264c0774e704d7de22255c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for memtomem-0.1.0.post1-py3-none-any.whl:

Publisher: release.yml on memtomem/memtomem

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