# clawmem [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/yoloshii/ClawMem  
**GitHub Stars:** 212  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/clawmem

## Description
On-device memory layer for AI agents. Claude Code, OpenClaw, and Hermes. Hooks + MCP server + hybrid RAG search.

## 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/yoloshii/ClawMem), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
npm install -g clawmem
```

2. Install:

```sh
git clone https://github.com/yoloshii/clawmem.git ~/clawmem
```

3. Install:

```sh
cd ~/clawmem && bun install
```

4. Install:

```sh
ln -sf ~/clawmem/bin/clawmem ~/.bun/bin/clawmem
```

5. Add to your MCP client:

```sh
./bin/clawmem setup mcp   # Registers in ~/.claude.json
```

6. Start the server:

```sh
clawmem serve --port 7438 &
```

## Documentation

## What clawmem does

clawmem turns Markdown notes, project documentation, research material, and imported conversations into searchable memory for AI agents. Its local vault is shared across Claude Code hooks, the MCP interface, the OpenClaw plugin, and the Hermes Agent `MemoryProvider`, allowing information captured in one runtime to be available in another.

The system supports session context, including user profiles, recent handoffs, decisions, stale notes, and relevant background facts. It can capture decisions, preferences, milestones, and problems from session transcripts, generate a handoff at the end of a session, and adjust memory importance through feedback from referenced notes. Conversation imports can come from Claude Code, ChatGPT, Claude.ai, Slack, or plain text. Optional synthesis extracts structured facts and links between them.

## How it works

All access paths write to a local SQLite vault. Retrieval combines lexical BM25 matching, vector search, reciprocal-rank fusion, query expansion, and optional cross-encoder reranking. Composite scoring also considers recency, confidence, content type, document quality, revision history, and relationships between co-accessed documents.

Queries can be classified by intent, such as why, when, entity, or what, then routed to suitable search and graph operations. Semantic, temporal, and causal relationships support multi-graph traversal. Memory metadata can evolve as documents gain keywords, tags, and causal links, while contradiction handling and entity-aware merge checks help prevent conflicting or cross-entity observations from being combined.

Context-surfacing hooks package retrieved material as background facts and relationships, with prompt-injection safeguards. A session focus topic can influence snippet selection without changing retrieval order or the set of selected documents. Heavy maintenance is available as an optional quiet-window worker controlled by configuration.

## Setup and configuration

clawmem runs locally as TypeScript on Bun and is designed to operate without API keys or cloud services. It can be connected through Claude Code hooks, the MCP server, a native OpenClaw plugin, or a Hermes Agent `MemoryProvider`. MCP-compatible clients can use the MCP path, while all supported runtimes continue to use the same vault.

A local GGUF observer model is used for transcript capture. Contradiction judging is optional and is enabled through the `CLAWMEM_JUDGE_*` configuration family. The heavier maintenance lane is disabled by default and can be enabled with `CLAWMEM_HEAVY_LANE=true`; it runs only within its configured quiet window and yields when interactive query activity is present.

## Tools and capabilities

- `memory_retrieve` automatically classifies a query and selects a retrieval backend.
- `timeline` progressively exposes a document’s chronological neighborhood and then its full content.
- `clawmem mine` imports supported conversation exports and text, with optional fact synthesis.
- `clawmem focus set` assigns a session-scoped topic for snippet selection.
- `clawmem rerank-health` reports the attested identity used for cached remote rerank scores.
- Hooks surface context, capture observations, create handoffs, and record retrieval feedback.
- Lifecycle controls support pinning, snoozing, archival sweeps, and restoration.
- Beads issue trackers can be synchronized into searchable memory.

## Limitations and notes

The memory store is local and SQLite-based, so shared data depends on runtimes using the same vault. Local operation avoids cloud dependencies but still relies on the configured local models for observation and optional synthesis. The contradiction judge is inactive unless configured. Focus topics affect presentation only; they do not alter search expansion, scoring, ranking, or document admission. Heavy maintenance is opt-in rather than part of the default interactive path.

Clawmem is released under the MIT License.

_Full upstream README: https://allmcps.com/mcp/clawmem/readme_

