# GrayMatter [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/angelnicolasc/graymatter  
**GitHub Stars:** 491  
**Views:** 7  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/graymatter

## Description
Persistent agent memory as a single Go binary: knowledge graph, TUI observability, zero infra.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/angelnicolasc/graymatter), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Configure:

```sh
graymatter init --store-only --quiet
```

2. Add to Claude Code:

```sh
claude mcp add --scope user --transport stdio graymatter -- graymatter mcp serve --no-create
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/graymatter/readme_

