
Description
GrayMatter is a persistent memory layer for AI agents, shipped as a single Go binary. It runs as a general-purpose MCP server, so clients such as Claude Code, Cursor, Codex and OpenCode can connect to it and keep facts between sessions instead of resending the full conversation on every run. The README says it cuts context tokens by about 90% compared with full-history injection, and reports that facts planted 96 sessions back come back 83% of the time. An optional knowledge graph, turned on with the --kg flag on the daemon, extracts people, organizations and projects from ordinary use and links the ones that appear together. There is no Docker, database or cloud account to set up, and no API key is needed for storage. It can also be imported as a plain Go library for projects that do not use MCP. The project describes itself as free and offline.…
Highlights
- Persistent memory for AI agents across sessions
- MCP server for Claude Code, Cursor, Codex and other clients
- Knowledge graph built from ordinary use with --kg
- Single binary with no Docker, database or cloud account
- Usable as a plain Go library without MCP
Ratings & Reviews
No ratings yet
Be the first to rate GrayMatter.
People also visit

hmem — Humanlike Memory for AI Agents
Persistent memory and agent lifecycle for Claude Code
GrayMatter FAQ
What does GrayMatter do?
It gives AI agents a memory that lasts between sessions, so they do not have to re-read the whole conversation history on every run.
Which AI tools does it work with?
The README lists Claude Code, Cursor, Codex, OpenCode and Antigravity, and says any MCP-compatible client can connect.
Do I need a database or an API key?
No. The README says there is no Docker, no database and no cloud account to set up, and no API key is required for storage.
How much does it reduce token use?
The README reports about 90% fewer context tokens than full-history injection, while keeping context quality.
Can I use it without MCP?
Yes. GrayMatter is also a plain Go library that you can embed in your own program.
What are the best GrayMatter alternatives?
Popular alternatives to GrayMatter include MemoCat — Shared AI Memory, hmem — Humanlike Memory for AI Agents and synap. See all GrayMatter alternatives




















