Local memory MCP server backed by mnestic — hybrid BM25+vector+graph recall with per-leg attribution and time travel, all on your machine.
Project description
mnestic-mcp
A local memory MCP server backed by mnestic — an embedded graph + vector + full-text database (a maintained fork of CozoDB). One process, one file, fully local: your agent's memory never leaves the machine.
mnestic is a maintained fork of CozoDB; it is not the official CozoDB. Original design credit belongs to Ziyang Hu and the Cozo Project Authors.
Install
Add to any MCP client (Claude Desktop, Claude Code, Cursor, ...):
{ "command": "uvx", "args": ["mnestic-mcp"] }
That's it. The database lives in your platform data dir (override with
--db PATH or MNESTIC_MCP_DB); embeddings run locally via
fastembed (default
BAAI/bge-small-en-v1.5, a one-time ~67 MB download that happens in the
background — keyword search works immediately, before the model arrives).
Pre-provision with uvx mnestic-mcp --download-model.
Tools
store, store_batch, search, find_related, list_recent, update,
delete, link, recall_as_of, stats — plus the two things no other local
memory server has:
search(explain=true)— per-leg attribution: exactly how much the keyword (BM25), vector (HNSW), and graph-proximity legs each contributed to every result, straight from the engine's fused three-way retrieval. Ask your agent "why did you recall that?" and get a real answer.recall_as_of(t)— time travel. Updates and deletes are never destructive (valid-time history in the engine's bitemporal storage): "what did you know about this before last Tuesday?" just works.
search is keyword-first with an automatic hybrid fallback; link builds a
typed, weighted memory graph that both find_related (budget-bounded
traversal) and the hybrid graph leg exploit.
Configuration
| Flag / env | Default | Meaning |
|---|---|---|
--db / MNESTIC_MCP_DB |
per-OS data dir | database file |
--engine / MNESTIC_MCP_ENGINE |
sqlite |
sqlite | rocksdb (single-instance) | mem |
--model / MNESTIC_MCP_MODEL |
BAAI/bge-small-en-v1.5 |
any fastembed model |
MNESTIC_MCP_CACHE |
data dir /models |
model cache location |
A database pins the embedding model it was built with — mixing embedding spaces is refused with an actionable error, never a silent quality collapse.
Notes
- Requires Python ≥ 3.10. Storage engines ship in the
mnesticwheel (sqlite/memalso in the sdist;rocksdbwheel-only). - Several MCP clients may share one sqlite database; writes serialize on the
file.
rocksdbis strictly single-instance. - Deleting memories under heavy churn can slowly degrade vector recall (a known engine-side HNSW defect, tracked upstream); updates are safe.
License
Mozilla Public License 2.0.
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 mnestic_mcp-0.1.0.tar.gz.
File metadata
- Download URL: mnestic_mcp-0.1.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d097c82c393b64f72cb483cc0a6b3bbb9296160085a0adc038172e19479ce36f
|
|
| MD5 |
38e0688e9efc2e4703c07355850ee663
|
|
| BLAKE2b-256 |
2aa53a14273d1584d736ae513eda7ddaa19beae01f586594644e6c3e8f08b59d
|
Provenance
The following attestation bundles were made for mnestic_mcp-0.1.0.tar.gz:
Publisher:
python-publish.yml on shuruheel/mnestic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mnestic_mcp-0.1.0.tar.gz -
Subject digest:
d097c82c393b64f72cb483cc0a6b3bbb9296160085a0adc038172e19479ce36f - Sigstore transparency entry: 2194910995
- Sigstore integration time:
-
Permalink:
shuruheel/mnestic@aecfd1fcf4aecf09675ebba5d78fc61f6c69da6d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/shuruheel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@aecfd1fcf4aecf09675ebba5d78fc61f6c69da6d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mnestic_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mnestic_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.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 |
aa06514ca39c37c016f44755dca10fc8b4034e629f217d92ea93d9a89a1252ae
|
|
| MD5 |
5eac5364bd5355d5f1efa668290b11bb
|
|
| BLAKE2b-256 |
5985b39978fa71cafa40c6eeda307d0abd3d2f3d9c20db35eb1759357e86670c
|
Provenance
The following attestation bundles were made for mnestic_mcp-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on shuruheel/mnestic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mnestic_mcp-0.1.0-py3-none-any.whl -
Subject digest:
aa06514ca39c37c016f44755dca10fc8b4034e629f217d92ea93d9a89a1252ae - Sigstore transparency entry: 2194911001
- Sigstore integration time:
-
Permalink:
shuruheel/mnestic@aecfd1fcf4aecf09675ebba5d78fc61f6c69da6d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/shuruheel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@aecfd1fcf4aecf09675ebba5d78fc61f6c69da6d -
Trigger Event:
workflow_dispatch
-
Statement type: