# J0hanz Memory MCP [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/j0hanz/memory-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 338  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/memory-mcp-server

## Description
SQLite-backed MCP server for persistent memory, full-text retrieval, and graph traversal.

## Tools
Capabilities this server exposes over MCP:

- **store_memory** — Store single memory. Returns hash. Idempotent (created: false if exists). Prefer store_memories.
- **get_memory** — Retrieve memory by SHA-256 hash. Returns E_NOT_FOUND if missing.
- **update_memory** — Update content and/or tags (at least one required). Returns old+new hash. Cascade updates relationships.
- **delete_memory** — Delete memory by hash. Cascade deletes relationships. Idempotent.
- **memory_stats** — Get global stats: counts, timestamps, importance.
- **store_memories** — Store 1-50 memories atomically. Idempotent. Rolls back on error.
- **delete_memories** — Delete 1-50 memories atomically. Cascade deletes. Rolls back on error.
- **search_memories** — Full-text search (content+tags). Ranked, paginated. Alphanumeric/underscore only. Implicit AND.
- **create_relationship** — Create directed edge. Idempotent. Errors if endpoints missing.
- **delete_relationship** — Delete edge. Exact match required. Idempotent (deleted: false if missing).
- **get_relationships** — Get relationships for memory. Filter direction. Inlines related memory.
- **recall** — FTS search + BFS traversal (depth hops). Returns memories+edges. Emits progress. Aborts on limit.
- **retrieve_context** — FTS search within token budget. Sorts by relevance/importance/recency. Supports importance and type filters. Returns truncated: true if limit hit.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "j0hanz-memory-mcp": {
    "command": "npx",
    "args": ["-y","@j0hanz/memory-mcp@latest"]
  }
}
```

## Documentation

## What the Memory MCP Server MCP server does

Memory MCP Server provides a local persistence layer for assistants that support MCP. It stores memory records in SQLite, addressing them with SHA-256 hashes derived from their content and tags. Records can include tags, a memory type, and an importance value. Repeating the same content with the same sorted tags does not create a duplicate.

The Memory MCP Server MCP server supports both individual and batch operations. Batch writes and deletes accept between 1 and 50 items and run inside transactions. Updating a record reports both its previous and new hash. Deleting a memory also removes its associated relationships.

Search uses SQLite FTS5 across memory content and tags. Queries can apply importance and type filters and use a cursor for continued retrieval. Relationships form directed edges between memories, allowing linked information to be queried separately from full-text results.

## How it works

The server communicates through stdio, so an MCP client starts it as a command and exchanges protocol messages through standard input and output. No HTTP service is provided. The implementation expects Node.js version 24 or later and checks for SQLite FTS5 support during startup.

The `recall` operation first finds seed memories with FTS5, then follows relationships using breadth-first traversal. Traversal depth is limited to 0 through 3, and the server can report progress for each hop. `retrieve_context` instead selects memories that fit a caller-provided token budget, which is useful when an agent needs bounded context rather than an unbounded search result.

The server also exposes resources: `internal://instructions` provides a Markdown guide, while `memory://memories/{hash}` identifies a memory resource and supports hash auto-completion. Input validation uses Zod, and outputs use typed envelopes.

## Setup and configuration

The simplest setup runs the npm package with `npx`:

```json
{
  "mcpServers": {
    "memory-mcp": {
      "command": "npx",
      "args": ["-y", "@j0hanz/memory-mcp@latest"]
    }
  }
}
```

The same stdio command pattern can be added to Claude Desktop, Claude Code, Cursor, Windsurf, or VS Code. Docker is also supported. A container can use `MEMORY_DB_PATH` to place the database at a selected path, typically alongside a mounted volume for persistence. The Memory MCP Server MCP server does not require an environment variable in its basic `npx` configuration.

## Tools and capabilities

The tool surface contains 13 operations:

- Store, update, retrieve, and delete individual memories.
- Store or delete up to 50 memories in one transaction.
- Search memories with FTS5, type and importance filters, and cursors.
- Create, remove, and inspect directed relationships.
- Recall related memories through bounded breadth-first traversal.
- Retrieve context constrained by a token budget.
- Inspect aggregate memory statistics and type breakdowns.

## Limitations and notes

The Memory MCP Server MCP server is stdio-only; clients must support stdio command servers. It has no HTTP endpoint. Node.js 24 or newer is required, and SQLite must include FTS5. Custom logging must not write to stdout because stdout carries MCP traffic. Batch operations are limited to 50 items, and graph recall cannot traverse beyond depth 3.

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

