MemoryMesh
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MemoryMesh find my notes about project architecture"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MemoryMesh
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.
π» Coding copilots | π€ MCP agents | π Research assistants |
Remember architecture decisions, bugs, and preferences across sessions | Persistent memory across any MCP-compatible client | Semantic recall over your notes, papers, and docs |
Up and running in 5 minutes
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.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.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.
Related MCP server: NOUZ MCP Server
Why it exists
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.
How it works
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 filesystemIndexing: 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-transformers embeddings β ChromaDB + BM25.
Search: query β query expansion (lexical variants + HyDE) β parallel dense + sparse search β Reciprocal Rank Fusion (k=60) β bge-reranker-v2-m3 reranker β top-k results with path, preview, score, and metadata.
RAG (optional): ask_memory β search_memory retrieval β Ollama generate() β grounded answer with cited sources.
What's included
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.
Feature | Status |
Local file indexing (txt, md, code, pdf, docx) | β |
Obsidian vault parser (frontmatter + wikilinks) | β |
Notion HTML export parser | β |
AI conversation exports (Claude, ChatGPT JSON) | β |
Email indexing ( | β |
Calendar indexing ( | β |
Browser history (Chrome / Firefox / Brave SQLite) | β |
Hybrid search β dense + BM25 + RRF | β |
Cross-encoder reranker ( | β |
Query expansion β lexical variants + HyDE | β |
RAG with local LLM via Ollama ( | β |
Multi-vector summary indexing for abstract recall | β |
MCP server β 15 tools, stdio + streamable-http | β |
Real-time incremental indexing (watchdog + debounce) | β |
Tree-sitter code chunking (Python, JS, TS, Go, Rustβ¦) | β |
Parent Document Retriever ( | β |
Cross-platform β Windows / Linux / macOS | β |
Post-crash reconciliation | β |
Optional OCR for scanned PDFs (Tesseract / EasyOCR) | β |
Privacy audit log (query hashes only, no cleartext) | β |
GitHub Actions CI (Ubuntu / Windows / macOS) | β |
Docker + docker-compose | β |
Per-agent permission layer (ACL + rate limiting + revocation) | β |
Hierarchical memory (hot / warm / cold tiers + forgetting policy) | β |
Episodic memory timeline ( | β |
Memory control tools ( | β |
Embedding LRU cache ( | β |
Health endpoint ( | β |
Real CLIP image embeddings ( | β |
Real Whisper audio transcription ( | β |
Knowledge Graph β entity co-occurrence ( | β |
Encryption at rest (Fernet AES-128, | β |
REST API (11 endpoints at | β |
VS Code extension ( | β |
Browser extension β Manifest V3 ( | β |
47 data source connectors (Jira, Notion, GitHub, Slack, Spotifyβ¦) | β |
Unit + integration test suite | β |
MCP Tools
Once running, these tools are available to any MCP-compatible client:
Tool | Description |
| Hybrid search over all indexed content. Returns path, preview, score, file type, source, and optional |
| List all configured sources with file counts and index status. |
| Read the full content of an indexed file (up to 1 MB by default). |
| Force immediate re-index of a file or directory, bypassing the watcher. |
| RAG: retrieves relevant passages and sends them to a local Ollama model for a grounded answer. Requires Ollama running locally. |
| Pin a chunk to the hot tier β never demoted, never score-decayed. |
| Suppress a chunk from future search results without deleting the source file. |
| Query the episodic event log: what was retrieved / indexed in the last N days? |
| Pull and index documents from a configured external connector (Jira, Notion, GitHubβ¦). |
| Look up a named entity (person, project, concept) and its associated chunk IDs. |
| Find documents semantically similar to the given file path. |
| Search indexed chunks by last-modified date range. |
| Remove all indexed data for a named source from the index. |
| Generate a brief summary of the most recent content in a source (requires Ollama). |
| Return the entity co-occurrence knowledge graph as nodes and edges. |
All tools are backwards-compatible β new fields are added without changing existing signatures.
How MemoryMesh compares
How MemoryMesh compares to similar projects:
Feature | MemoryMesh | LangChain | LlamaIndex | PrivateGPT | AnythingLLM | MemGPT | Haystack |
MCP native | β | β | β | β | β | β | β |
Hybrid search (dense + BM25 + RRF) | β | Partial | Partial | β | β | β | β |
Real-time watcher + SHA-256 dedup | β | β | β | β | β | β | β |
Post-crash reconciliation | β | β | β | β | β | β | β |
100% local, zero telemetry | β | β | β | β | β | β | β |
Cross-platform (Win/Linux/Mac) | β | β | β | Partial | Partial | β | β |
No framework dependency | β | β | β | β | β | β | β |
Per-agent permissions | β | β | β | β | β | β | β |
MCP native means 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 permissions means per-client identity, ACL by source and operation, token-bucket rate limiting, and token revocation are built into the core β not added as middleware.
Configuration
Everything lives in config.yaml. See config.example.yaml for 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-httpGlobal ignore list protects sensitive paths by default: .env, *.key, id_rsa*, secrets/, .ssh/, .aws/, .git/, node_modules/.
Benchmarks
Benchmark results will be published here. Scripts are already in
benchmarks/and runnable locally β contributions with reproducible numbers are welcome.
bench_indexing.pyβ indexing throughput (chunks/s, MB/s) on a synthetic corpusbench_search_latency.pyβ p50/p95/p99 search latency across hybrid/dense/sparse modesbench_embedding_models.pyβ speed vs. quality comparison across three embedding models
Privacy & security
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 a
WARNINGin the log.HTTP listener binds to
127.0.0.1only by default. Exposing to other interfaces requires an explicit config override.Logs never contain document content or queries in cleartext. The audit log records query hashes, not queries.
Encryption at rest is available as of v0.8.0. Run memorymesh keygen to generate a key, then enable encryption.enabled: true in config.yaml. The SQLite metadata store can be exported as an encrypted backup with memorymesh backup.
Roadmap
Version | Focus | Status |
v0.1 | Core: hybrid search, 4 MCP tools, stdio transport, indexer | β shipped |
v0.2 | CI/CD, Parent Document Retriever, Docker, security hardening | β shipped |
v0.3 | Reranker, query expansion + HyDE, RAG (Ollama), 6 new parsers, eval framework | β shipped |
v0.5 | Per-agent permissions (ACL/rate-limit/revocation), hot/warm/cold tiers, episodic timeline, memory control tools, embedding cache, health endpoint, CLIP/Whisper stubs | β shipped |
v0.8 | Real CLIP+Whisper, Knowledge Graph, Encryption at rest, REST API (11 endpoints), VS Code + browser extensions, 47 connectors, 15 MCP tools | β shipped |
v1.0 | Agent OS integration β memory layer for multi-agent systems | ~6 months |
v2.0 | Hardware agents β ESP32/Arduino querying the hub over BLE/WiFi | ~12 months |
Full details in ROADMAP.md.
Troubleshooting
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 β set
watcher.use_polling: trueinconfig.yaml.Tesseract not found β install it system-wide and ensure it is in
PATH. Windows: UB-Mannheim installer.Embedding model mismatch after changing config β run
memorymesh reindex --all. The CLI refuses to start if the model ID stored in ChromaDB does not match the config.
Contributing
Contributions are welcome β bug reports, new connectors, integration examples, and documentation improvements all help. Open an issue to discuss before submitting a large PR.
Acknowledgements
Architecture informed by studying LlamaIndex, LangChain, PrivateGPT, AnythingLLM, MemGPT, and Haystack β understanding what each does well and what it does not. And to chroma-mcp and the MCP Python SDK for showing what MCP-native looks like in practice.
MIT. See LICENSE.
Available Tools
17 toolsask_memoryA
Search the knowledge base and generate an answer using a local LLM.
Retrieves the top-k most relevant passages via hybrid search, builds a
RAG prompt, and calls the local Ollama LLM to generate an answer.
When Ollama is unavailable the ``answer`` field is ``null`` and a
``hint`` field explains how to install Ollama and pull a model.
Args:
question: The question to answer.
top_k: How many passages to retrieve (clamped to 1-20).
model: Optional model override.
Returns:
Dict with keys ``answer``, ``sources``, ``model``, ``ollama_available``.
Inputs: question (required), top_k, model.
forget_memoryA
Forget a chunk from memory using either instant suppression or gradual decay.
Two modes are available:
- **suppress** (default): chunk is added to the suppression list and
immediately hidden from all search results. Use when you never want
to see this chunk again.
- **cold**: chunk is demoted to the cold memory tier so its relevance
score decays over time. The chunk stays visible but becomes less
prominent on each query. Use when you prefer gradual fading.
Use ``pin_memory`` to reverse a cold demotion and restore full relevance.
A suppressed chunk can only be unsuppressed by direct database access
(intentionally β suppression is permanent).
Args:
chunk_id: Stable chunk identifier ``<path>:<chunk_index>``.
mode: ``"suppress"`` or ``"cold"``. Defaults to ``"suppress"``.
Returns:
Confirmation dict with ``chunk_id``, ``mode``, and result fields.
Inputs: chunk_id (required), mode.
forget_sourceA
Remove all indexed content from a named source.
Deletes every document belonging to *source* from the vector store,
BM25 index, and SQLite metadata. This is irreversible unless the
source is re-synced.
Args:
source: Source name as it appears in the index (e.g. ``"jira"``).
dry_run: Preview without deleting.
Inputs: source (required), dry_run.
get_documentA
Read and return the contents of an indexed file.
The file must currently exist on disk and must have been indexed by
MemoryMesh (i.e. its path must be present in the metadata store).
Args:
path: Absolute file path.
max_bytes: Content is truncated to this many bytes when the file
is large (``truncated: true`` is set in the response).
Inputs: path (required), max_bytes.
get_entityA
Retrieve a named entity and its associated document chunks.
Returns the entity's name, type, and the IDs of all chunks that
mention it. Requires entity extraction to have been enabled when
the documents were indexed (``indexing.entity_extraction.enabled``).
Args:
name: Entity name (case-insensitive).
entity_type: Optional type constraint.
Inputs: name (required), entity_type.
graph_memoryA
Return the entity co-occurrence knowledge graph.
Nodes are named entities extracted from the indexed corpus. An edge
between two entities means they were mentioned in the same document
chunk; the edge weight is the number of shared chunks.
Args:
min_mentions: Minimum mention count for a node to appear.
entity_type: Optional entity type filter (e.g. ``"PERSON"``).
Returns:
Dict with ``"nodes"`` (id, label, type, mentions) and ``"edges"``
(source, target, weight, shared_chunks) lists.
Inputs: min_mentions, entity_type.
index_nowA
Trigger an immediate (re-)index of a file, directory, or all sources.
Args:
path: Target path. When ``None``, all :attr:`AppContext.config.sources`
are scanned.
force: Skip hash comparison and always re-index.
Inputs: path, force.
list_sourcesA
List all configured source directories with indexing statistics.
Returns a summary for each source: file counts by status, total chunk
count, and aggregate disk size.
Inputs: no named parameters.
pin_memoryA
Pin a specific chunk to the hot memory tier.
Pinned chunks are never demoted during maintenance runs and always
receive full relevance scores (no decay) regardless of how long ago
they were last accessed.
Args:
chunk_id: Stable chunk identifier ``<path>:<chunk_index>``.
Returns:
Confirmation dict with ``chunk_id``, ``tier``, and ``pinned`` fields.
Inputs: chunk_id (required).
query_timelineA
Query the episodic memory timeline for recent activity.
Returns a chronological log of retrieval and indexing events, allowing
an agent to reconstruct what the user was working on during a given
period.
Args:
since_days: How many days back to look.
event_type: Optional category filter.
limit: Maximum results.
Returns:
Dict with ``events`` list (each event has ``event_id``, ``timestamp``,
``event_type``, ``source``, ``chunk_ids``, ``client_id``,
``metadata``), ``total`` count, and ``since_ts`` / ``until_ts`` bounds.
Inputs: since_days, event_type, limit.
record_eventA
Record a custom episodic event in the memory timeline.
Useful for agents to annotate significant moments (e.g. "user reviewed
this document", "agent summarised this file") without triggering a
search.
Args:
event_type: Category string for the event.
source: Associated file path or source name.
note: Free-text annotation stored in ``metadata.note``.
chunk_ids: Chunk identifiers involved.
Returns:
The persisted event dict with its generated ``event_id``.
Inputs: event_type (required), source, note, chunk_ids.
search_by_dateB
List indexed documents within a date range.
Returns file records matching the given date window. Useful for
discovering recently indexed content or auditing what was indexed in
a specific period.
Args:
after: Only include documents indexed/modified after this date.
before: Only include documents indexed/modified before this date.
source: Restrict to this source name.
file_type: Restrict to this file type (e.g. ``".pdf"``).
limit: Maximum records to return.
Inputs: after, before, source, file_type, +1 more.
search_memoryB
Search the personal knowledge base for passages relevant to query.
Returns a ranked list of matching text passages with file paths,
relevance scores, and short previews. When ``search.parent_window_chars``
is configured, each hit also includes an ``extended_preview`` with wider
context around the matched chunk.
Args:
query: Natural-language question or phrase.
top_k: Number of results (clamped to 1-50).
mode: ``hybrid`` | ``dense`` | ``sparse``.
source: Optional source name filter.
modality: ``all`` | ``text`` | ``image``.
Inputs: query (required), top_k, mode, source, +1 more.
summarize_sourceB
Return indexing statistics for one or all named sources.
Reports the number of indexed documents, total chunks, file type
breakdown, and most recent indexed-at timestamp for each source.
Args:
source: Source name, or ``null`` for all sources.
Inputs: source.
sync_sourceB
Fetch documents from one or all configured external connectors.
Runs the enabled connectors defined in ``config.yaml`` and indexes
each fetched document into the search index.
Args:
source_type: Connector type key to run, or ``null`` for all.
dry_run: Fetch without indexing.
Inputs: source_type, dry_run.
unpin_memoryA
Remove the manual pin from a chunk, allowing normal tiering.
The chunk stays in the hot tier until the next maintenance run, after
which it will be promoted or demoted based on its access history.
Args:
chunk_id: Stable chunk identifier ``<path>:<chunk_index>``.
Returns:
Confirmation dict with ``chunk_id`` and ``pinned`` fields.
Inputs: chunk_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 17 tools
All 17 tools serve distinct purposes: ask/generate, search passages, manage memory chunks/sources, retrieve documents/entities, graph, index, list, pin, timeline events, etc. No overlapping functionality.
Predominantly verb_noun snake_case (e.g., ask_memory, forget_source, list_sources). Minor deviations like 'related_documents' (adjective+noun) and 'index_now' (adverb) slightly break the pattern, but overall clear.
17 tools is slightly above the typical 3-15 range for a coherent set, but the memory management domain warrants many operations (indexing, search, forgetting, pinning, timeline, etc.). Still reasonable.
Covers indexing, search (various modes), memory manipulation (forget, pin), source management, entity/graph, document retrieval, timeline/event logging. Missing operations like editing memory chunks, but the surface is largely complete.
Maintenance
Related MCP Connectors
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Private, multimodal knowledge store for agents: hybrid search with cited, provenance-backed results.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Related MCP Servers
- AlicenseAqualityFmaintenanceA custom Memory MCP Server that acts as a cache for Infrastructure-as-Code information, allowing users to store, summarize, and manage notes with a custom URI scheme and simple resource handling.231MIT
- AlicenseAqualityBmaintenanceMCP Server for local knowledge management. Semantic + keywords + tags824MIT
- AlicenseAqualityDmaintenanceRecord development decisions as structured JSON, embed them as vectors via Gemini, and search semantically over MCP. Works with Claude Code, Cursor, Windsurf, and any MCP client.914 npm82MIT
- AlicenseAqualityDmaintenanceMemento is a local-first MCP server that gives AI coding agents durable project memory β facts, decisions, patterns, and architecture notes β so they stop re-learning the same context every session. Runs locally on Node.js 18+ with SQLite storage and optional cloud embeddings; works with Claude Code, Cursor, Windsurf, and any MCP client.1924 npm2MIT