Skip to content
MCP server

GrayMatter

Persistent memory and knowledge graph for AI agents, shipped as one Go binary

Pricing
Open source
Platforms
CLI, macOS, Linux
Version
0.16.4
Listing updated
today

Similar MCP servers

About GrayMatter

GrayMatter is an open-source MCP server for knowledge and memory. It is available on CLI, macOS, Linux, Windows, vscode, self-hosted and API.

The README says AI agents lose context between sessions, and GrayMatter stores facts across them so an agent can recall relevant ones instead of replaying the full conversation history. Recall ranks facts with a mix of vector similarity, keyword matching and recency, and facts fade on a 30-day half-life unless pinned, with contradicted facts tombstoned rather than deleted.

When run with the daemon's knowledge graph option, consolidation cycles extract typed entities such as people, organizations and projects and link entities that co-occur, with each edge recording the fact IDs behind it. The graph can be rendered as a self-contained HTML page, exported to Obsidian, or inspected through a six-view terminal workbench.

The project targets developers wiring memory into Claude Code, Cursor, Codex, OpenCode and other MCP clients, and also works as a plain Go library for teams that do not use MCP. Storage is a local bbolt file with no Docker, Redis or accounts required; embeddings can come from Ollama, OpenAI, Voyage AI or fall back to keyword search.

What it does

Hybrid fact recall
Returns the top relevant facts by combining vector, keyword and recency signals, with an explain mode showing why each fact ranked.
Knowledge graph building
Extracts typed entities and co-mention edges during consolidation, with edges linked back to the supporting facts.
Decay and tombstones
Facts fade on a 30-day half-life unless pinned, and contradictions are recorded as tombstones instead of deletions.
Terminal workbench
A TUI with views for memory, recall, activity, graph, usage and status for inspecting the store.
Claude Code hooks
Optional hooks inject recall at session start, on each prompt, before compaction and at session end.
Single local binary
Ships as one static Go binary storing data in a local file, with no Docker, database server or cloud account.

Good for

  • Giving a coding agent memory of project conventions across sessions
  • Keeping an MCP-connected assistant's context small by recalling only relevant facts
  • Adding persistent memory to a Go service without running a separate memory server
  • Visualising how remembered people, organizations and projects relate to each other
  • Exporting an agent's memory graph to Obsidian for review

Pricing

Open source

Free and open source; self-hosted local binary.

GrayMatter FAQ

Is GrayMatter free to use?

The README describes it as free, offline and requiring no account, and the repository is public on GitHub.

Which MCP clients does it work with?

The README names Claude Code, Cursor, Codex, OpenCode and Antigravity, and says any MCP-compatible client can connect via graymatter mcp serve.

Does it need an embedding API key?

No. Keyword-only mode works with no external services, while Ollama, OpenAI or Voyage AI can supply embeddings when available.

Can it be used without MCP?

Yes, the README says it is also a plain Go library that can be imported directly.

Is GrayMatter free?

Yes. GrayMatter is open source, so you can use and self-host it for free.

What are the best alternatives to GrayMatter?

The closest alternatives to GrayMatter are Total Agent Memory, knowmind, Kognite, Knowl and Mnemolith.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.

How AIPoweredBot checks servers