hindsight-shared-memory
hindsight-shared-memory
Always-on, local Hindsight memory for Claude Code on your Mac.
This repo runs the Hindsight server and its web UI as background daemons on localhost. Claude Code connects to
them through the official Hindsight Coding Agents plugin.
Every session remembers project decisions automatically, and every session and agent in a repo shares the same
memory.
No API key. Fact extraction runs on your Claude Code login (Pro, Max, Team or Enterprise), using Haiku.
Automatic. The plugin injects relevant memories when a session starts and saves each session when it ends. You don't need to prompt it or keep CLAUDE.md rules.
Always on. launchd daemons for the server and the UI, started at login and restarted if they crash.
Local and private. Everything binds to
127.0.0.1(upstream defaults to0.0.0.0). It uses an embedded Postgres and local ONNX embeddings and reranking, and starts offline once the models are downloaded.Light. Uses Hindsight's slim build, with no PyTorch (about 0.8 GB instead of 1.8 GB).
๐ Install guide: from scratch on macOS in about 10 minutes.
How it works
Claude Code (any repo) โโ hooks + MCP โโโ Hindsight Coding Agents plugin (npx)
Codex / Cursor / โฆ (same plugin) โโโโโโโโค recall on session start ยท retain on Stop
โผ
hindsight-shared-memory daemon โโ 127.0.0.1:8888 (launchd)
โโ LLM: claude-code provider โ Haiku on your Claude login
โโ ONNX embeddings + FlashRank reranker (local, cached)
โโ embedded Postgres (pg0) โโ 127.0.0.1:5488
Hindsight Control Plane UI โโ 127.0.0.1:9999 (launchd)The plugin gives each git repo its own bank (coding-agent::<repo>). The first session seeds it from git history
and a short Haiku survey of the code. The bank then maintains knowledge pages such as the component map,
conventions, key decisions and initiatives. It also adds hindsight_* MCP tools and a hindsight-coding-agent
skill for explicit memory work.
Related MCP server: Unforget MCP Server
What this repo adds on top of Hindsight
Upstream default | Here | |
Bind address (API and UI) |
|
|
LLM | OpenAI (API key) |
|
Install size | 1.8 GB (PyTorch) | ~0.8 GB (ONNX + FlashRank) |
Offline start | Checks Hugging Face on every start | Offline once the models are cached |
Reranker cache |
|
|
Embedded Postgres port | 5432 (clashes with a local Postgres) | 5488 |
Running it | You run it yourself |
|
Daemon PATH | โ | Stable dirs only, so a |
Server MCP endpoint ( | ~35 tools, including | 5 memory tools, for other MCP clients |
CLI
hindsight-shared-memory serve # run the server in the foreground
hindsight-shared-memory install-service # server daemon (launchd; systemd --user on Linux)
hindsight-shared-memory uninstall-service # remove it (memories are kept)
hindsight-shared-memory install-ui # web UI daemon, pinned to the server version (needs Node.js)
hindsight-shared-memory uninstall-uiConfiguration
Every setting is a Hindsight environment variable. Set it before serve, or before install-service, which bakes
your HINDSIGHT_* variables into the daemon.
Variable | Default here | Notes |
|
| |
|
| If you change it, pass the new |
|
| Used by |
|
| Or |
|
| Sonnet extracts more thoroughly but is much slower (~30 s per retain in testing) |
|
| Model |
|
| Cached in |
|
| Data in |
|
| Only for the server's own |
The plugin's settings (bank routing, what to inject, survey options) are in ~/.hindsight/coding-agent.json;
see the plugin docs. This setup changes one of
them, autoInject: "recall", and the install guide explains why.
Security
The API and the UI have no authentication. They bind to
127.0.0.1and must stay there, since anything that can reach the ports can read and write memories. CI checks that the server can't be reached on a non-loopback address.Memories, and whole session transcripts sent by the plugin, are stored in plaintext in the local Postgres. Avoid pasting secrets into sessions.
The daemons keep only a stable
PATHandHINDSIGHT_*variables from your environment.
See SECURITY.md.
Development
git clone https://github.com/ShmuelOps/hindsight-shared-memory && cd hindsight-shared-memory
uv sync
uv run pytest # unit tests, plus a real server (LLM "none") checked for sharing and isolation over MCP
uv run ruff check . && uv run ruff format --check .CI runs on Ubuntu and macOS. See CONTRIBUTING.md.
License
MIT. Hindsight is MIT-licensed by Vectorize.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceProvides persistent memory for AI coding agents via MCP, enabling agents to store and semantically recall facts, events, and lessons across sessions, all running locally without cloud dependencies.Apache 2.0

Unforget MCP Serverofficial
AlicenseNot gradedqualityCmaintenanceLong-term memory for Claude Code, Cursor, and MCP clients with zero-config embedded PostgreSQL. Stores and retrieves facts, preferences, and decisions using 4-channel semantic, BM25, entity, and temporal search with cross-encoder reranking.1Apache 2.0- AlicenseNot gradedqualityBmaintenanceProvides a self-hosted shared memory service that lets AI agents capture and recall durable facts, decisions, and context across multiple tools and MCP-capable clients.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to store and recall durable facts, decisions, and lessons over MCP using hybrid semantic and keyword search, typed memories, graph relations, sessions, and time-travel queries. Runs locally with no server process or API key, persisting everything to files that both agents and a CLI can share.14 npmMIT