# Qarinah [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/AjnasNB/qarinah  
**GitHub Stars:** 3  
**npm Downloads (last month):** 1030  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/qarinah

## Description
Automatic project memory for coding agents: code relationships, decisions, tool outcomes and Git history with session recall. Local stdio server.

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

```json
"mcpServers": {
  "qarinah": {
    "command": "npx",
    "args": ["-y","qarinah@latest"]
  }
}
```

## Documentation

## What the Qarinah MCP server does

The Qarinah MCP server gives coding-agent sessions access to retained project context from a local memory graph. It records permitted decisions, relationships between code symbols and files, tool outcomes, conflicts, and Git worktree history. New sessions can retrieve relevant cited context rather than reconstructing the project from a complete previous conversation.

Each worktree has its own `.qarinah` ledger and consent record. Qarinah derives repository and branch context, associates memories with the checkout that produced them, and preserves separate writable histories instead of linking worktrees to one shared database. The JSONL ledger is authoritative, while deterministic OKF 0.1 Draft Markdown provides a portable export view.

## How it works

Setup uses the local CLI. The safe default is metadata-only capture without a hosted account, content disclosure, or activation measurement. Content capture and automatic compaction are opt-in. A foreground `watch` workflow can notice source changes, refresh the symbol graph, and regenerate local read models; unchanged cycles do not create duplicate checkpoints.

Retained events include SHA-256 content and record digests plus the previous record hash. Retrieved context can include event IDs, evidence hashes, selection reasons, and packet manifests. The `proof` command combines current decisions, temporal facts, and query-ranked files and symbols into a bounded task packet. `receipts` writes body-free records for captured host sessions, while `panel` searches the visible graph and timeline.

Qarinah does not install a hidden background service or inspect unrelated applications. Optional activation measurement is disabled unless explicitly enabled, and its documented payload excludes project content, paths, queries, transcripts, and event bodies.

## Setup and configuration

Initialize a project with:

```sh
npx qarinah@latest setup .
```

To enable content capture and automatic compaction, use:

```sh
npx qarinah setup . --capture content --auto-compact
```

`npx qarinah demo` creates an isolated temporary workspace for trying the workflow without changing a repository or configuring coding agents. User-level automatic initialization can be enabled with `setup-user`, and its status can be checked with `auto-init status`. Remote hosts require their own setup. The local dashboard is served with `npx qarinah dashboard --serve`; `--worktrees` adds initialized sibling worktrees.

## Tools and capabilities

The Qarinah MCP server and CLI support these documented workflows:

- Search project memory and timeline with `panel`.
- Query cited context in Markdown format.
- Generate task-aware proof packets with `proof`.
- Write exact session receipts with `receipts --write`.
- Run an explicit change-detection and memory-refresh loop with `watch`.
- Compare separate worktree ledgers in the local dashboard.
- Export the ledger as deterministic OKF Markdown.
- Expose multi-language definitions and references through the project-local `qarinah-lsp`.

The dashboard provides searchable graph and timeline views, worktree comparison, and detailed session replay. A local VS Code/Cursor panel is described as a sandboxed, read-only webview. A JetBrains template and a standard LSP workflow are also documented.

## Limitations and notes

Capture scope depends on the selected mode and explicit consent. Metadata-only setup does not retain project content, while content-enabled workflows require an explicit choice. Separate worktrees remain separate ledgers, so comparisons operate across initialized checkouts rather than one shared writable history.

The published evaluator results describe deterministic tests over generated or isolated repositories. They should not be read as universal accuracy, cost, or cross-product guarantees.

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

