GrayMatter logo

GrayMatter

Local persistent agent memory with semantic recall, self-curation, a knowledge graph, and terminal observability in one Go binary.

Install GrayMatter

Run the project’s own setup commands, in order.

Setup steps from the project

GrayMatter installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Configure
    graymatter init --store-only --quiet
    
  2. 2. Add to Claude Code
    claude mcp add --scope user --transport stdio graymatter -- graymatter mcp serve --no-create
    

Overview

GrayMatter MCP server gives AI agents persistent local memory that survives across sessions. It stores facts, recalls relevant information by meaning, supports agent-driven memory updates through `memory_reflect`, and can build a typed knowledge graph from ordinary use. Reach for it when agents need continuity without Docker, Redis, cloud accounts, or a separate database, or when you need to inspect memory and provenance through its TUI and CLI.

Use cases

  • Persist decisions and project facts across agent sessions
  • Recall relevant facts without injecting full conversation history
  • Build an automatically linked knowledge graph from agent memory
  • Inspect memory ranking, provenance, and activity in a terminal UI
  • Project selected facts into CLAUDE.md or AGENTS.md

Key features

  • Persistent semantic memory
  • Explainable recall with provenance
  • Self-curating agent memory
  • Automatic knowledge graph construction
  • Terminal observability workbench
  • Single local Go binary

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

22/22 checks healthy over the last 79d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars490Stargazers on the source repository.
Last commit8d agoMost recent push to the default branch.
Directory activity7 viewsConfig copies, upvotes, and views on AllMCPs.

How GrayMatter works

What GrayMatter does

GrayMatter provides persistent memory for AI agents in a single local Go binary. Facts remain available across sessions, allowing an agent to recover decisions, dates, and other information without injecting an entire conversation history into every prompt. Recall selects relevant facts by meaning and can expose the ranking signals and provenance behind its results.

The memory model supports adding, revising, retiring, pinning, and linking facts. An agent can also use memory_reflect to curate its own memories. Unpinned facts use deterministic decay with a default 30-day half-life, and pruning can remove both live facts and tombstones.

How it works

Run GrayMatter as a daemon for persistent operation, then connect it to an MCP client such as Claude Code, Codex, or Cursor. Claude Code can additionally install hooks that inject routine recall on each turn; MCP remains available for writes and focused searches. The project can also be embedded as a Go library.

With --kg, consolidation extracts typed entities such as people, organizations, and projects, then creates edges for entities that appear together. Each edge retains receipts pointing to the fact IDs that produced it. Graph data can be inspected, rendered as a self-contained HTML page, exported as Graphviz DOT, or exported to Obsidian, where entities become notes and connections become wikilinks.

Setup and configuration

The binary is designed to run locally without API keys, Docker, Redis, configuration files, or cloud accounts. Start the graph-enabled daemon with:

bash
graymatter daemon run --kg

Useful graph commands include:

bash
graymatter kg render --out graph.html
graymatter kg render --out graph.dot
graymatter kg inspect --json
graymatter doctor --graph --html graph.html

Install Claude Code hooks with graymatter hooks install. The terminal workbench supports dark, light, and terminal themes, optional mouse input, and read-only mode. Read-only mode requires an existing store and either a running daemon or --no-daemon.

Tools and capabilities

  • Persistent facts that survive between agent sessions.
  • Meaning-based recall with explainable ranking and provenance.
  • Agent memory curation through memory_reflect.
  • Fact creation, revision, retirement, linking, and pinning.
  • Automatic typed-entity and co-mention graph construction.
  • Graph inspection through the CLI, TUI, HTML, DOT, and Obsidian export.
  • Six TUI views: Memory, Recall, Activity, Graph, Usage, and Status.
  • Context projection into CLAUDE.md or AGENTS.md within a token budget.
  • Instruction-file auditing for token use, duplicates, staleness, and marker conflicts.

Limitations and notes

The knowledge graph can contain historical edges whose support is uncertain; these remain available for navigation while their provenance is pending review. Graph diagnostics can report hubs, articulation points, orphans, connectivity, and provenance.

The Usage view can show subscription limits and API spend, but no account is connected automatically. Missing values remain unavailable, and failed refreshes leave the last observation marked stale. Memory decay and pruning can affect unpinned facts, so information that must remain available should be pinned.

The TUI is intended for terminal-based inspection and management. Its read-only mode blocks memory and session mutations. GrayMatter supports Linux, macOS, and Windows, and is distributed as a static binary of approximately 10 MB.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about GrayMatter

GrayMatter is an MCP server that connects AI agents to a local persistent memory store. Its main tools and capabilities cover semantic recall, focused memory searches, memory writes, fact revision, and the `memory_reflect` workflow for agent-driven curation. It also supports a knowledge graph, provenance inspection, and terminal-based observability.

Install and run the GrayMatter Go binary locally, then configure an MCP client to launch or connect to it. The server is designed to work without API keys, Docker, Redis, configuration files, or cloud accounts. Claude Code users can run `graymatter hooks install` for automatic recall hooks.

Yes, GrayMatter works with Cursor as an MCP client. It also supports Claude Code and Codex, and can be used with another MCP client. Connect the client to the local GrayMatter process to use persistent memory and focused searches.

Start the daemon with `graymatter daemon run --kg`. GrayMatter then extracts typed entities and co-mention edges during consolidation. Use `graymatter kg inspect --json` to inspect provenance, or render the graph to HTML or Graphviz DOT with `graymatter kg render`.

Yes, GrayMatter can export the knowledge graph to Obsidian. Entities become notes and connections become wikilinks, while each graph edge retains receipts that identify the supporting fact IDs.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGrayMatter AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/graymatter?style=directory)](https://allmcps.com/mcp/graymatter)
HTML Embed
<a href="https://allmcps.com/mcp/graymatter"><img src="https://allmcps.com/api/badge/graymatter?style=directory" alt="GrayMatter on AllMCPs" /></a>