Persistent agent memory as a single Go binary: knowledge graph, TUI observability, zero infra.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
AI agents forget everything between sessions. GrayMatter gives them persistent memory, a self-building knowledge graph, and cuts context tokens by 90%.
One binary. Drop it in. Run it. No Docker, no databases, no config files, no cloud accounts, no bullshit.
General-purpose MCP server. Zero vendor lock-in.
Works with Claude Code, Cursor, Codex, OpenCode, Antigravity β and any MCP-compatible client.
Also a plain Go library if you don't use MCP.
Free. Offline. No account required.
Every AI agent is stateless by default. Each run re-injects the full conversation history β and that history grows linearly. Two prompts in and you've already burned half of your daily quota.
That's not just a memory problem. That's a money and performance problem.
Mem0, Zep, Supermemory solve this β but they're Python/TypeScript-only and require a running server. The Go ecosystem has no production-ready, embeddable, zero-dependency memory layer for agents.
That gap is GrayMatter.
~90% reduction in context tokens β versus full-history injection.
Remembers what a sliding window forgets: facts planted 96 sessions back come back 83% of the time.
Context quality improves over time as consolidation surfaces only what matters.
No Docker. No Redis. No API key required for storage.
Drop it in once. It auto-connects to Claude Code, Cursor, Codex, OpenCode, Antigravity β any MCP-compatible client picks it up automatically.
Your agent doesn't just remember facts β it builds a map of how they connect.
Run the daemon with --kg and every consolidation cycle extracts typed
entities (person, organization, project) and links the ones that appear
together. No manual tagging. No configuration. The graph builds itself from
ordinary use.
Every edge carries receipts: the fact IDs that produced it.
Export to Obsidian with one command β entities become notes,
connections become wikilinks, and the whole graph renders natively.
The graph as one self-contained page β inline force-directed SVG, zero external assets, works offline. Hover any edge to see the fact IDs that produced it:
Watch it build, one frame per session:
You can't improve what you can't see.
graymatter tui opens a live terminal dashboard with everything your
agent memory is doing β no extra setup required.
What you get at a glance:
The dashboard auto-refreshes every 5 seconds. Press 1β4 to switch tabs,
r to force refresh, q to quit.
graymatter doctor --graph extends visibility to the knowledge graph itself:
hubs by degree, articulation points, orphans, and a declared connectivity
ratio β printed or emitted as JSON.
| Persistent memory | Facts survive across sessions. Recall by meaning, not just keyword |
| 90% token reduction | Top-8 relevant facts instead of full-history injection |
| Automatic hooks | Claude Code injects routine recall every turn; MCP remains available for writes and focused searches (graymatter hooks install) |
| Receipts, not vibes | recall --explain returns why each fact ranked: per-signal ranks, fused score, provenance |
| Knowledge graph | Typed entities and co-mention edges, auto-populated from ordinary use |
| Self-curation | memory_reflect lets the agent add, update, forget, and link its own memories |
| Context block | Projects top facts into CLAUDE.md / AGENTS.md inside a token budget (context-sync) |
| Free auditor | doctor --audit measures tokens, duplicates, staleness, and marker conflicts in any instruction file |
| Deterministic decay | 30-day half-life; facts fade when nothing touches them. Tombstones, never deletes |
| Single binary | ~10 MB static. No Docker, no Redis, no config files, no cloud accounts |
Install and see it working in under a minute β no API keys, no Ollama:
graymatter init --global still performs that normal setup in the current
directory. It additionally installs the managed memory instructions in Claude
Code and OpenCode's home-scoped instruction files. It does not globalize
project-scoped MCP configs: each repository must be wired separately with
graymatter init or manual client configuration. Codex is the exception in
the table below because its MCP config is already home-scoped.
graymatter demo seeds a scratch store, runs consolidation, and opens the
TUI β then graymatter kg render --out kg-graph.html shows the graph it
built. Restart your editor. Seven memory tools are live.
graymatter init auto-wires every supported client at once. Existing entries
from other MCP servers are merged, never overwritten.
| Client | Config file | Scope |
|---|---|---|
| Claude Code | .mcp.json | project |
| Cursor | .cursor/mcp.json | project |
| Codex (OpenAI) | ~/.codex/config.toml | home |
| OpenCode | opencode.jsonc | project |
| Antigravity (Google) | mcp_config.json | opt-in |
| Windsurf | .windsurf/mcp.json | project |
| VS Code Copilot Agent | .vscode/mcp.json | project |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/graymatter)<a href="https://allmcps.com/mcp/graymatter"><img src="https://allmcps.com/api/badge/graymatter?style=directory" alt="GrayMatter on AllMCPs" /></a>