Mnemotree
Integrates with LangChain to provide memory capabilities for LangChain agents via MCP.
Provides Neo4j as a memory store for graph-based memory storage and retrieval.
Uses OpenAI API for embedding generation and LLM-powered memory analysis.
Integrates with spaCy for named entity recognition in memory contents.
Provides SQLite with sqlite-vec as a memory store for lightweight vector search.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
🌳 Mnemotree
Local, source-first memory for LLM agents: SQLite, FTS5 and sqlite-vec.
Mnemotree keeps every message exactly as written and recalls attributed source spans instead of rewritten summaries.
Durable: sources, chunks, both indexes and an idempotency receipt commit in one transaction.
Hybrid: FTS5 BM25 and sqlite-vec cosine search, fused with RRF, with optional reranking.
Bounded: evidence is packed into an exact token budget, with a trace of every candidate, rank and packing loss.
Isolated: every read and write is scoped to one namespace.
The default install needs only Pydantic, sqlite-vec and tiktoken. This repository does not yet publish reproducible retrieval-quality benchmarks.
Install
pip install mnemotreeThis README describes the 0.5 API. When using it before the 0.5 release, install the development version instead:
pip install "mnemotree @ git+https://github.com/kurcontko/mnemotree.git@main"Python's sqlite3 must support loadable extensions and FTS5. Tiktoken downloads its
vocabulary once; see the guide to run offline.
Extra | Adds |
| OpenAI-compatible HTTP embedder and extractor |
| Local SentenceTransformer embedder |
| AML Add/Search HTTP service |
| All of the above |
Related MCP server: knowledgeplane
Quickstart
import asyncio
from mnemotree import Memory
async def main():
with Memory("memory.sqlite", namespace="alice") as memory: # lexical without an embedder
await memory.remember("I grow orchids on my balcony.", role="user")
recall = await memory.recall("orchids")
print(recall.context) # packed, attributed evidence
print([item.id for item in recall.items], recall.trace.packed_tokens)
asyncio.run(main())Memory binds one namespace and offers remember, remember_many, recall, get
and forget. Pass an embedder for hybrid retrieval.
MCP server
mnemotree-mcp gives Claude Code, Claude Desktop, Codex and other MCP clients the
same five tools over stdio. It needs no extra.
claude mcp add mnemotree -- mnemotree-mcp --db ~/.mnemotree/memory.sqlite \
--namespace "$USER" --lexical # or --config with an embeddingSessions pointed at the same --db share one memory.
Command line
# Retrieval evaluation on the bundled plumbing example (needs a fresh database).
mnemotree-evidence --db demo.sqlite --config examples/evidence/lexical.json \
evaluate examples/evidence/corpus.jsonl examples/evidence/queries.jsonl \
--output demo-results.json
# AML Add/Search service with a bearer key (the serve extra).
export MNEMOTREE_API_KEY='replace-with-your-service-key'
mnemotree-evidence --db service.sqlite servemnemotree-evidence also runs add, search, and the ablate, ablate-context and
ablate-retrieval comparisons.
Documentation
docs/GUIDE.md covers the API contract, MCP configuration, embeddings, storage and retrieval behavior, atomic projections, the AML service, evaluation and limits.
Releases up to 0.4.0 shipped MemoryCore, pluggable vector/graph backends and an
older MCP server. They have been removed, and Memory does not read their databases.
See the 0.5 release notes for API and compatibility changes.
Development
git clone https://github.com/kurcontko/mnemotree.git
cd mnemotree
uv sync --extra dev --extra serve
make lint typecheck test
make build
make precommit-installSee CONTRIBUTING.md.
License
MIT, see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
An MCP memory server. One memory your agents share — across models, devices and apps.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Persistent, portable memory for AI assistants — your private memory graph, from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceOpen-source MCP server that gives any LLM long-term memory using a knowledge graph and vector search hybrid. It stores entities, observations, and relationships, enabling semantic recall across sessions with automatic clustering and fail-loud infrastructure.51MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that gives AI agents and teams persistent, shared memory using a knowledge graph with vector embeddings, automatic consolidation of related facts, and hybrid search.3-
- AlicenseNot gradedqualityCmaintenanceA universal MCP server providing persistent, structured memory through a knowledge graph with graph storage, semantic vector search, and multi-hop traversal for AI agents and IDEs.24 PyPI1MIT
- AlicenseNot gradedqualityAmaintenanceMCP server providing persistent AI memory with four-tier retrieval (SQLite FTS5, graph, vector, LLM agent) to give AI assistants structured, long-term memory without RAG.1Apache 2.0