Hindsight MCP

A long-term memory system for AI agents: the agent stores experience and facts, then retrieves them through a built-in MCP server

  • 60,672 ★ on the repository
  • Last commit
  • MIT
MCP serverOfficialEditors’ pick

Broad access

Why this level

  • Requires LLM provider keys and handles secrets
  • Sends memory content to an external LLM provider for processing
  • Runs a persistent server and database, and the CLI installer reads git history and past sessions
All reasons and checks

vectorize-io/hindsight

Install

Manual install

docker run -it --pull always --name hindsight --restart unless-stopped -p 8888:8888 -p 9999:9999 -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY -v hindsight-data:/home/hindsight/.pg0 ghcr.io/vectorize-io/hindsight:latest

Recommended way to run the server in Docker. API on port 8888, web UI on 9999, data in the hindsight-data volume.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Requires LLM provider keys and handles secrets
  • Sends memory content to an external LLM provider for processing
  • Runs a persistent server and database, and the CLI installer reads git history and past sessions

This is third-party code. Review the repository files before installing.

What it does

Hindsight gives an agent memory that does not just keep chat history but accumulates knowledge and experience over time. The server runs in Docker, via pip or in Kubernetes and stores data in PostgreSQL, and a developer works with three operations: retain stores information, recall searches memory, reflect produces an answer that accounts for what was accumulated. Each server exposes a built-in MCP endpoint per memory bank, so any MCP client gets these operations as tools. Beyond MCP there are clients for Python, Node.js and Go, an embedded server mode with no separate process, a two-line LLM wrapper, and a memory installer for CLI coding agents that builds a bank from git history and past sessions. Memory runs on top of more than twenty LLM providers, including local ones.

Who it is for. For developers building AI agents and LLM applications who want to give them long-term memory.

Good fit when

  • The agent needs to remember facts and past experience across sessions, not only the current dialog
  • You want memory exposed to the agent as the MCP tools retain, recall and reflect
  • You need to give a CLI coding agent project memory from git history and past sessions

Not a fit when

  • A short context within a single dialog is enough, with no external store
  • You cannot run a server and database or connect an LLM provider

Example request

Remember that we deploy this service via docker compose, and remind me next time I ask about deployment

MCP

Transport
http
Authentication
API key

Environment variables

HINDSIGHT_API_LLM_API_KEY required, secret
Key for the chosen LLM provider that powers memory. Local providers may not need a key.
HINDSIGHT_API_LLM_PROVIDER
Selects the LLM provider: openai, anthropic, gemini, ollama, lmstudio and others. Defaults to openai.
HINDSIGHT_DB_PASSWORD secret
Database password when running with an external PostgreSQL via docker compose.

Limitations

This is self-hosted infrastructure: it needs a running server, PostgreSQL and an LLM provider key, and memory content is sent to the chosen provider for processing. Local providers (ollama, lmstudio, llamacpp) and any OpenAI-compatible endpoints are supported, so the system can stay fully local. A paid Hindsight Cloud option exists as an alternative to running your own server. On Intel Macs (x86_64) install the hindsight-all-slim build instead of hindsight-all.

How to disable. Stop and remove the server container or process and its data volume, uninstall the clients (pip or npm), and for CLI agents remove the added memory integration from their configuration.

FAQ

How does the agent connect to memory?

Each server exposes a built-in MCP endpoint per memory bank at an address like http://localhost:8888/mcp/<bank_id>/. Point an MCP client at it and the retain, recall and reflect operations become tools. There are also clients for Python, Node.js and Go.

Can it work without external cloud LLMs?

Yes. Besides cloud providers it supports local ones (ollama, lmstudio, llamacpp) and any OpenAI-compatible endpoint, so memory can stay entirely on your own infrastructure.

Discussion

No questions or reviews yet.

A long-term memory MCP server for AI agents: facts fade along a forgetting curve and related records are compressed into a summary

MCP serverExtended access272Repository stars

iai-memory

iai-memory (Personal Memory Engine)

Official

A local long-term memory MCP server for agents: keeps conversations verbatim and returns the right context at the start of a session

MCP serverExtended access923Repository stars

A self-hosted MCP server for long-term agent memory: structured records, versioned rollback and a visual dashboard

MCP serverExtended access1.4KRepository stars
Official

An MCP server for long-term agent memory: compresses dialogues into atomic facts, resolves pronouns and anchors relative time to absolute dates

MCP serverExtended access3.9KRepository stars
Official

Long-term memory for agents: a remote MCP server, plugins for Claude Code, Cursor and Codex, and an API for your own apps

MCP serverExtended access31.6KRepository stars

Self-hosted long-term memory for agents: semantic search, a knowledge graph and autonomous consolidation over MCP and a REST API

MCP serverExtended access2.1KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Hindsight (this card)yesAPI key60,672
claude-supermemoryyes2,803the Supermemory plugin for Claude Code
Ori Mnemosnonot required336persistent agent memory in a folder of linked markdown notes
Halofyyes320a Claude Code plugin that connects the agent to shared organizational

README in short

The README presents Hindsight as an agent memory system that makes agents learn, not just remember history. It claims strong results on the LongMemEval benchmark and production use. The quick start shows running the server in Docker, via pip and in Kubernetes, storage in PostgreSQL and connecting clients in Python, Node.js, Go and over a CLI. It describes a built-in MCP endpoint per bank, a two-line LLM wrapper, an embedded serverless mode and a memory installer for CLI coding agents. Memory works with more than twenty LLM providers, including local ones, MIT licensed.

README badge

Report a problem