# Anamnesis [Health: Active]

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

## Description
Cross-machine, file-first memory for Claude Code: markdown + SQLite FTS5, synced with git

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

```json
"mcpServers": {
  "anamnesis": {
    "command": "npx",
    "args": ["-y","anamnesis-dashboard"],
    "env": {
      "ANAMNESIS_HOME": "",
      "ANAMNESIS_MACHINE_ID": "",
      "ANAMNESIS_GIT_REMOTE": ""
    }
  }
}
```

**Requires environment variables:** `ANAMNESIS_HOME`, `ANAMNESIS_MACHINE_ID`, `ANAMNESIS_GIT_REMOTE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What the Anamnesis MCP server does

The Anamnesis MCP server connects Claude Code with a local memory store under `~/.anamnesis`. Notes are stored as Markdown files, making them readable, editable, and reviewable with Git. A SQLite FTS5 index is generated locally for keyword search; the database is derived data rather than the shared source of truth.

The store is intended for information such as project conventions, architecture decisions, successful fixes, preferences, and recent session summaries. Claude Code can receive relevant notes when a session begins, and session hooks can record information when a session ends or before context compaction.

## How it works

Each machine keeps its own working copy of the Markdown memory repository and its own search index. Synchronization uses Git over a private network such as Tailscale, or another Git remote under your control. The sync sequence commits local changes, pulls with rebase, pushes updates, and rebuilds the local index after incoming changes.

Only Markdown is synchronized. If two machines modify the same note, Git reports a conflict rather than silently discarding one version. This design keeps the files portable and version-controlled while allowing search to remain local.

The Anamnesis MCP server provides Claude Code with five tools: `memory_search`, `memory_list`, `memory_status`, `memory_write`, and `memory_sync`. The first three are read-only. Hooks handle session context and capture, while the MCP tools let Claude Code query or update the store during work.

Optional reflection uses an OpenAI-compatible model configured by the user. It can turn accumulated session notes into durable notes. The `merge` command can consolidate near-duplicates, and `eval` measures reflection on a sandbox copy before changes are applied.

## Setup and configuration

Install the package with `uv tool install anamnesis-memory`, then run `anamnesis init`. The initializer registers the MCP server with Claude Code at user scope, installs the SessionStart, SessionEnd, and PreCompact hooks, configures `~/.anamnesis`, and performs an initial sync. `--print` previews the plan, while `--local-only` starts without a remote.

For cross-machine use, create a shared bare Git repository and pass its location to `anamnesis init --remote`. A Tailscale mesh is one documented option, but the remote can be any Git repository the machines can access. The repository can be attached later if setup began in local-only mode.

When configuring a project-scoped `.mcp.json`, Claude Code’s filtered environment means `ANAMNESIS_HOME`, `ANAMNESIS_MACHINE_ID`, and `ANAMNESIS_GIT_REMOTE` should be placed in the MCP server’s `env` block. The project also documents installation from source with Python 3.12 and the MCP extra.

## Limitations and notes

The documented client integration is Claude Code. The search system uses keyword BM25 recall through SQLite FTS5 and does not use a vector store. The README reports approximately 94% recall on its project evaluation set, so semantic vector retrieval is not part of the described design.

No cloud account is required, but synchronization still depends on Git connectivity when using a remote. Reflection additionally requires an OpenAI-compatible model configured by the user. Generated notes include provenance and confidence metadata, and dashboard access is available through a separate web GUI for browsing, searching, editing, viewing history, and running reflection.

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

