# mcp-memory-rs [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/DioNanos/mcp-memory-rs  
**GitHub Stars:** 2  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-memory-rs

## Description
Local-first agent memory: versioned JSON categories, BM25 search, per-device ACL, fleet sync.

## Tools
Capabilities this server exposes over MCP:

- **memory_read** — Read a category (optional field filtering).
- **memory_write** — Replace or merge-patch a category; versioned; `expected_hash` precondition.
- **memory_append** — Append a timestamped entry to a bounded append-only **log** category; auto-prunes by `max_entries`/`max_age_days`. For event streams / session journals, so they don't bloat memory categories.
- **memory_delete** — Delete a category (backup created first).
- **memory_list** — All categories with hash/size/last-update metadata.
- **memory_search** — FTS5 full-text search, BM25 ranking, category/date/actor filters, snippets.
- **memory_search_semantic** — Hybrid TF-IDF + FTS5 search.
- **memory_history** — Version history of a category.
- **memory_delta** — Changes since a known hash (cheap polling).
- **memory_context** — Multi-category warmup read, token-budget oriented.
- **memory_compact** — Prune old versions and backups.
- **memory_status** — Local-first status: dirty queue, manifest hash, last sync.
- **memory_doctor** — Diagnostics: paths, database, categories, sync config.
- **sync_manifest** — Merkle-rooted manifest of all categories.
- **sync_diff** — Compare local vs remote manifest: push/pull/conflict sets.
- **sync_push** — Export/import sync envelopes.
- **memory_sync** — One sync step against the configured remote (`push_dirty` / `pull_remote`).

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/DioNanos/mcp-memory-rs), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
cargo build --release   # single static-friendly binary
```

## Documentation

## What mcp-memory-rs does

mcp-memory-rs MCP server gives an MCP client a persistent store for curated agent state. Memory is divided into named JSON categories such as projects, device-specific workflows, or a base profile. The JSON files are the source of truth, while SQLite provides the searchable index.

Writes are versioned and deletes create a backup before removal. A write can replace a category or merge changes at the top level. Supplying an expected content hash lets callers detect a concurrent update instead of silently overwriting it. Append-only log categories support timestamped event or session entries with limits based on entry count or age.

The server is intended for local-first use. Its standard stdio mode can operate without a network connection or cloud account, and the stored files can be read, compared, and backed up using ordinary tools.

## How it works

mcp-memory-rs MCP server exposes memory operations through MCP tools. Read, list, history, delta, context, status, doctor, compact, and delete operations manage the local store. Search uses SQLite FTS5 with BM25 ranking, filters, and snippets; the semantic variant combines TF-IDF with FTS5 and does not require model downloads.

Access rules can distinguish administrators, device namespaces, and agent scopes. All devices can read, while non-administrative writers are restricted to permitted categories. The local device identity is used for these MCP-side checks.

Optional fleet synchronization compares Merkle-rooted manifests and identifies items to push, pull, or resolve. A configured remote can receive dirty categories or provide remote changes. The default conflict strategy is last-write-wins, while expected-hash checks protect direct writes rather than sync envelopes.

## Setup and configuration

Download a platform release where available, build with Cargo, or install from the Git repository. macOS users must build from source because the project does not ship a prebuilt macOS binary. Running the release binary starts the offline stdio server by default.

Configuration uses TOML. The server can discover an XDG-style configuration path, and environment variables can override file settings. Set `MCP_MEMORY_REQUIRE_CONFIG=1` when a managed deployment should fail if configuration is missing. `MCP_DEVICE` identifies the local device; `MCP_MEMORY_MODE` selects the operating mode; and `MCP_MEMORY_DIR` can control the storage location.

HTTP mode is separate from offline stdio operation. It requires `MCP_MEMORY_TOKEN`, and the README recommends binding the service to loopback and tunneling between nodes rather than exposing it publicly. The HTTP surface is an administrative and synchronization plane: its bearer token grants access to every category, so local per-device ACL rules do not apply to HTTP callers.

## Tools and capabilities

- Read, replace, merge, append, delete, list, and inspect category data.
- Search with BM25 or hybrid TF-IDF and FTS5 ranking.
- Review versions, calculate deltas, warm multiple categories within a token budget, and compact old history or backups.
- Inspect local sync state and diagnostics.
- Build manifests, compare remote state, exchange sync envelopes, and perform a configured sync step.

## Limitations and notes

mcp-memory-rs MCP server does not use embeddings or an external model service in its core search implementation. The HTTP endpoint has broader authority than the local MCP interface and must be protected accordingly.

_Full upstream README: https://allmcps.com/mcp/mcp-memory-rs/readme_

