# dsh-memory-hub [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/zhiwuli0228/dsh-memory-hub  
**GitHub Stars:** 0  
**npm Downloads (last month):** 5993  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/dsh-memory-hub

## Description
Local-first, file-native long-term memory hub: preflight, compact context injection, citations, human-approved commits, temporal validity, dedupe/merge, retrospective reflection, write-risk flags, a derived SQLite index, per-workspace scheduled distillati

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

```json
"mcpServers": {
  "dsh-memory-hub": {
    "command": "npx",
    "args": ["-y","dsh-memory-hub"]
  }
}
```

## Documentation

## What dsh-memory-hub does

dsh-memory-hub provides a persistent memory workflow for agent sessions. Accepted knowledge lives in Markdown files with YAML frontmatter inside a Hub directory. The system can search and read those entries, inject a compact index at the start of a turn, record which entries were actually used, and create proposed additions, updates, or deprecations.

Writes are intentionally separated from retrieval. New or changed knowledge is placed in `pending/`, and `memory_commit` requires the host's native approval flow. The model cannot supply its own approval token. This makes the Hub suitable for teams that need inspectable files and a human-controlled path from evidence to authoritative memory.

Knowledge can be scoped to a project, core workspace, parent core, domain, or global collection. Multiple core workspaces and nested workspaces are routed by the longest matching working-directory prefix. Child workspaces share their core's Hub and can pass distilled knowledge upward through configured workflows.

## How it works

At the beginning of a user turn, the plugin can run a deterministic preflight and inject a compact result containing identifiers, titles, summaries, and scopes. Full content is read only when needed. Search uses keywords, type, scope, and status filters; CJK bigram tokenization is supported, and a vector database is not required.

The lifecycle also includes citation recording, task-close evaluation, candidate proposals, approval, and optional consolidation of project knowledge. Temporal fields such as `valid_from`, `expires_at`, and `last_verified` support aging and validity-aware retrieval. Duplicate inspection, retrospective reflection, and maintenance reports provide additional review points without automatically committing changes.

A derived SQLite index can be created on demand for larger collections. The default `auto` policy creates it at the configured entry threshold; memory-only and SQLite modes are also available. Writer coordination uses leases and fencing tokens so stale writers can be reclaimed and older writers become read-only.

## Setup and configuration

Install the published npm package through the DSH plugin manager or the Desktop profile's plugin manager. A local directory or GitHub package can also be installed; the repository includes built output. Restart DSH after installation, or wait for plugin hot loading.

The default configuration location is `~/.dsh/memory-hub`, or the equivalent path under `DSH_HOME`. The configuration file is `config.yaml`; its `core_workspaces` entries define Hub roots, while `workspaces` entries map working directories to cores. A workspace with no matching root falls back to the configuration Hub. New Hub roots are initialized with directories such as `knowledge/`, `pending/`, `records/`, `history/`, and `reports`, plus a generated directory guide.

Configuration changes are watched and reloaded without a restart. The optional `distill` settings schedule workspace-level sessions through DSH's scheduling service. Maintenance uses an internal timer, can run reports or create pending proposals, and never commits them automatically.

## Tools and capabilities

The MCP tool set includes:

- `memory_search`, `memory_get`, and `memory_status` for retrieval, full reads, and diagnostics.
- `memory_preflight` and `memory_cite` for turn preparation and usage evidence.
- `memory_propose`, `memory_commit`, and `memory_close_task` for the reviewed write lifecycle.
- `memory_consolidate` for administrator-controlled promotion.
- `memory_duplicates` for near-duplicate review.
- `memory_reflect` for digest or source-based session review.
- `memory_maintenance` for reports and optional pending maintenance proposals.

The bundled DSH panel provides overview, configuration, knowledge search, pending-candidate review, activity and policy information, and tool descriptions. It reads and saves through loopback host routes; approval still occurs through DSH's native process.

## Limitations and notes

The panel does not replace DSH approval and cannot bypass it. In headless environments, or when approval is disabled, commits are rejected and candidates remain pending. Automatic maintenance and scheduled distillation produce reports or proposals rather than authoritative writes. Internal maintenance timers do not appear in DSH's official automation list, whereas configured distillation jobs do. The host integration is intended for DSH and is also described for Claude Code, opencode, Cline, and other MCP- or CLI-capable agents.

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

