# catfish-1234/sessionmem [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/catfish-1234/sessionmem  
**GitHub Stars:** 9  
**npm Downloads (last month):** 1123  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/catfish-1234-sessionmem

## Description
Local-first memory layer for AI coding assistants. Watches your coding sessions and injects a compact summary at the start of each new session. No cloud, no account, just a SQLite file on your machine. Works with Claude Code, Cursor, Cline, Windsurf, and any other MCP host.

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

```json
"mcpServers": {
  "sessionmem": {
    "command": "npx",
    "args": ["-y","sessionmem"]
  }
}
```

## Documentation

## What catfish-1234/sessionmem does

catfish-1234/sessionmem keeps short, searchable project memories between AI-assisted coding sessions. It records decisions, warnings, and useful facts such as a technology stack, an unfinished migration, or a known implementation constraint. At a later session start, it selects relevant entries and presents them within a small token budget rather than replaying an entire transcript.

The default storage location is a SQLite database at `~/.sessionmem/memories.db`. Storage is local by default, with no account or cloud service required. Secret redaction is enabled during setup and removes common credential patterns, tokens, password assignments, and private keys before saving. Redaction uses pattern matching, so it should not be treated as a complete security boundary.

## How it works

Session capture and memory injection depend on the host. Claude Code receives SessionStart, SessionEnd, and PostToolUse hooks during installation. These hooks capture supported events, summarize useful information at session end, and load prior memories when a new session begins.

Codex and Cursor use the automatically started watcher to read supported local histories. The watcher handles Claude Code, Codex CLI, and Cursor transcripts without API keys. Other MCP hosts can call the memory and lifecycle tools and use the instructions installed for the host, but automatic transcript reading requires a supported transcript reader.

Search starts with SQLite FTS5 BM25 ranking and entity overlap. An optional local MiniLM model can add semantic candidates; its weights are installed separately. Queries do not make network calls and fall back to BM25 if local inference is unavailable. Scope labels, entity information, relevance, recency, and importance can affect retrieval.

## Setup and configuration

Install the package globally with Node.js 22.13 or newer:

```bash
npm install -g sessionmem
```

Run `sessionmem install` from a configured project directory. The command detects supported hosts where possible, registers the MCP server, creates initial configuration under `~/.sessionmem/config.json`, adds host instructions, and enables a per-user login service for `sessionmem watch`. Use `--adapter` to select a host explicitly, such as `claude-code`, `cursor`, `cline`, `codex`, `windsurf`, or `generic`. The `SESSIONMEM_ADAPTER` environment override is also supported, with the command-line flag taking precedence.

Restart the AI tool after installation so it loads the MCP registration. Use `sessionmem doctor` to check setup offline. A generic installation writes a project-local `.mcp.json`; hosts with different configuration formats may require copying the server entry into their MCP configuration.

## Tools and capabilities

- Store and retrieve decisions, warnings, and project context through MCP memory operations.
- Use lifecycle operations for session-oriented capture and recall.
- Search stored memories with BM25, entity overlap, and optional local semantic candidates.
- Apply local scopes to sessions, memories, and entity associations.
- Run a background watcher for supported Claude Code, Codex CLI, and Cursor histories.
- Trim injected memories to a small fixed token budget.
- Redact common secrets before persistence by default.

## Limitations and notes

Automatic lifecycle capture is not uniform across hosts. Claude Code receives installed lifecycle hooks, while Codex and Cursor use the watcher without those hooks. Other hosts can use MCP tools, but automated transcript capture depends on reader support.

The watcher runs as a per-user login service: LaunchAgent on macOS, a user systemd service on Linux, or a Scheduled Task on Windows. Linux requires systemd and an available user service manager; macOS requires a GUI login session. If the service cannot start, setup can remain partially complete and may require running `sessionmem autostart enable` after fixing the operating-system error.

Running `sessionmem run` directly starts a stdio MCP server that waits for MCP messages, so it may appear idle in a terminal. Data remains local unless sharing or cloud summarization is enabled. Semantic search also depends on separately installed local model weights and falls back to BM25 when local inference is unavailable.

_Full upstream README: https://allmcps.com/mcp/catfish-1234-sessionmem/readme_

