MCP Memory-mesh
About
An MCP server that gives Claude Code persistent memory across sessions (open source, SQLite)
Details
- Author
- kilhubprojects
- Categories
- AI, Other
Jump to
Setup
Install MCP Memory-mesh in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/kilhubprojects/memory-mesh
Follow the installation instructions in the repository README, then restart your MCP client.
SQLite for AI memory.Persistent memory layer for MCP agents and coding copilots — local-first, zero cloud, works in 5 minutes.
See it in action:Claude Code remembering project decisions across sessions.
pip install memorymesh-mcp cp config.example.yaml ~/.memorymesh/config.yaml # edit config.yaml — point at your folders memorymesh index ~/Documents memorymesh search "how did I configure the debounce"
Wire it into Claude Desktop. Find the config file at:
- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%APPDATA%\Claude\claude_desktop_config.json
- Linux:~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "memorymesh": { "command": "uv", "args": [ "run", "--directory", "/absolute/path/to/memory-mesh", "memorymesh", "start" ] } } }
Restart Claude Desktop. The 15 tools appear automatically.
Every AI conversation starts from zero. Claude doesn't know which architecture decision you made last week. Cursor doesn't remember the bug you fixed yesterday. The context dies when the session ends.
Mem0 requires a cloud account. Zep needs a running server and a database. LangMem ties you to the LangChain ecosystem. None of them speak MCP natively.
MemoryMesh runs entirely on your machine. It indexes your files into a local SQLite + ChromaDB store and exposes them through 15 MCP tools. It never touches the network unless you configure a connector. Any MCP client — Claude Desktop, Cursor, your own agent — gets persistent memory with one config change.
The indexer watches your files, chunks them with format-aware parsers, and stores embeddings locally. The search engine fuses dense and sparse results, then a cross-encoder reranker scores the candidates.
┌──────────────────────────────┐ MCP clients ───▶ │ MemoryMesh │ (Claude Desktop, │ ┌────────────────────────┐ │ Cursor, agents) │ │ MCP Tools (FastMCP): │ │ │ │ search_memory │ │ │ │ list_sources │ │ │ │ get_document │ │ │ │ index_now │ │ │ └──────────┬─────────────┘ │ │ ▼ │ │ Search Engine │ │ dense + BM25 → RRF │ │ │ │ │ ┌─────────┴──────────┐ │ │ ▼ ▼ │ │ ChromaDB BM25 │ │ (embeddings) (sparse) │ │ ▲ ▲ │ │ └──────── Indexer ───┘ │ │ ▲ │ │ Watchdog │ └────────────────┬──────────────┘ ▼ Your filesystem
Indexing:file watcher detects changes → SHA-256 dedup skips unchanged files → parser (txt/md/pdf/docx/code/obsidian/email/calendar/browser) → chunker (tree-sitter for code, by-heading for markdown, recursive for text) →sentence-transformersembeddings → ChromaDB + BM25.
Search:query → query expansion (lexical variants + HyDE) → parallel dense + sparse search → Reciprocal Rank Fusion (k=60) →bge-reranker-v2-m3reranker → top-k results with path, preview, score, and metadata.
RAG (optional):ask_memory→search_memoryretrieval → Ollamagenerate()→ grounded answer with cited sources.
MemoryMesh ships with hybrid search (dense embeddings + BM25 + RRF + cross-encoder reranker), hot/warm/cold memory tiers with configurable forgetting decay, and an episodic event timeline. 47 connectors pull data from Jira, Notion, GitHub, Slack, email, browser history, Spotify, and more. 15 MCP tools expose everything to any MCP-compatible client. A real-time file watcher re-indexes changed files within seconds, without a manual trigger.
Once running, these tools are available to any MCP-compatible client:
All tools are backwards-compatible — new fields are added without changing existing signatures.
How MemoryMesh compares to similar projects:
MCP nativemeans it was built for MCP from day one — not bolted on after. The 15 tools follow additive versioning — new fields are added without removing existing ones.
Per-agent permissionsmeans per-client identity, ACL by source and operation, token-bucket rate limiting, and token revocation are built into the core — not added as middleware.
Everything lives inconfig.yaml. Seeconfig.example.yamlfor a fully commented reference. Key highlights:
sources: - name: documents path: ~/Documents recursive: true extensions: [.txt, .md, .pdf, .docx] - name: projects path: ~/Projects recursive: true extensions: [.py, .js, .ts, .go, .rs, .md] - name: obsidian path: ~/obsidian-vault source_type: obsidian # activates wikilink + frontmatter parser - name: emails path: ~/Mail source_type: email # parses .mbox files embeddings: model: all-MiniLM-L6-v2 # swap to paraphrase-multilingual-MiniLM-L12-v2 for PT/EN search: default_top_k: 10 hybrid: enabled: true reranker: enabled: true # cross-encoder reranker (recommended) model: BAAI/bge-reranker-v2-m3 query_expansion: enabled: true n_lexical_variants: 1 # Optional: local LLM for ask_memory tool + HyDE query expansion ollama: enabled: false # set true after: ollama pull llama3 model: llama3 server: transport: stdio # stdio | streamable-http
Global ignore listprotects sensitive paths by default:.env,.key,id_rsa,secrets/,.ssh/,.aws/,.git/,node_modules/.
Benchmark results will be published here. Scripts are already inbenchmarks/and runnable locally — contributions with reproducible numbers are welcome.
- bench_indexing.py— indexing throughput (chunks/s, MB/s) on a synthetic corpus
- bench_search_latency.py— p50/p95/p99 search latency across hybrid/dense/sparse modes
- bench_embedding_models.py— speed vs. quality comparison across three embedding models
Three commitments that do not change across versions:
- No data leaves your machine.No telemetry. No external API calls unless you explicitly opt in — and even then, there is aWARNINGin the log.
- HTTP listener binds to127.0.0.1onlyby default. Exposing to other interfaces requires an explicit config override.
- Logs never contain document content or queries in cleartext.The audit log records queryhashes, not queries.
Encryption at rest is available as of v0.8.0. Runmemorymesh keygento generate a key, then enableencryption.enabled: trueinconfig.yaml. The SQLite metadata store can be exported as an encrypted backup withmemorymesh backup.
- UnicodeDecodeErroron a text file— MemoryMesh tries UTF-8, UTF-8 BOM, cp1252, latin-1 in order. If a file still fails, it is logged and skipped.
- Watcher doesn't fire on a network drive / WSL mount— setwatcher.use_polling: trueinconfig.yaml.
- Tesseract not found— install it system-wide and ensure it is inPATH. Windows:UB-Mannheim installer.
- Embedding model mismatch after changing config— runmemorymesh reindex --all. The CLI refuses to start if the model ID stored in ChromaDB does not match the config.
Contributions are welcome — bug reports, new connectors, integration examples, and documentation improvements all help. Open an issue to discuss before submitting a large PR.
Architecture informed by studyingLlamaIndex,LangChain,PrivateGPT,AnythingLLM,MemGPT, andHaystack— understanding what each does well and what it does not. And tochroma-mcpand theMCP Python SDKfor showing what MCP-native looks like in practice.
Persistent memory for AI assistants and coding agents across ChatGPT, Claude, Cursor, and other MCP-compatible tools.
Governed persistent memory for AI agents.
Long-term memory for AI assistants. Your AI remembers everything, forever.
One shared, versioned memory for your AI agents across Claude Code, Cursor, Kiro and Grok, with a source on every answer and full history.
Operational memory for AI agents that persists across sessions and tools.
MCP (Model Context Protocol) server that exposes 70 tools spanning cognitive memory, working memory, sessions, agents, the L0–L3 knowledge hierarchy, orchestration tasks, and training pipelines. The server speaks stdio and is consumed by Claude Desktop, Claude Code, OpenCodex, and any MCP-aware client.
Fully local memory for AI agents: zero LLM calls in the write path, runs air-gapped, accuracy parity with Mem0 on published benchmarks.
MEMANTO is a memory agent. It remembers, recalls, and answers — so your agents can achieve long-term goals and avoid confusion.
A local-first, LLM-agnostic memory layer for AI assistants
Hosted MCP memory across Claude Code, Cursor, ChatGPT and any MCP client. Community-hosted instance of the MIT-licensed MemPalace engine. EU-hosted, GDPR-compliant. Free tier with 200 memories.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




