Persistent memory for Claude and other MCP clients
Prime stores knowledge-graph relationships, embeddings, provenance, and compressed context in a local event store. Claude Desktop, Claude Code, and other MCP clients read and write that memory directly.
One memory store across agent surfaces
One cargo install, one config edit per client. The same Prime store serves Claude Desktop, Claude Code, Cursor, and OpenCode — one source of truth, every place your agents work.
cargo install allsource-prime
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"prime": {
"command": "allsource-prime",
"args": [
"--data-dir", "~/.prime/memory",
"--auto-inject"
]
}
}
}claude mcp add prime allsource-prime \ --data-dir ~/.prime/memory \ --auto-inject
~/.cursor/mcp.json{
"mcpServers": {
"prime": {
"command": "allsource-prime",
"args": [
"--data-dir", "~/.prime/memory",
"--auto-inject"
]
}
}
}opencode.json{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"prime": {
"type": "local",
"command": ["allsource-prime", "--data-dir", "~/.prime/memory", "--auto-inject"],
"enabled": true
}
}
}--auto-inject flag exposes a prime://auto-context MCP resource. Each client reads it at conversation start — a compressed markdown index of everything you've told it, organized by domain, in ~500–1,000 tokens. No prompt engineering required, and every client sees the same index because they share the same local Prime store (or, if you wire --sync-to, the same hosted one).--data-dir at a time. Use separate directories or tenant-scoped hosted persistence for concurrent clients.19 MCP tools Claude picks automatically
You don't call these. Claude does — the tool descriptions are written for agent consumption. v0.22.0 adds text-only inputs for prime_embed and prime_recall so the model never has to hand over a precomputed vector.
| Tool | When Claude calls it |
|---|---|
| prime_add_node | Create a node — person, concept, project, decision, insight. |
| prime_add_edge | Connect two nodes with a directed relation (works_on, impacts, depends_on…). |
| prime_embed | Make a node findable by meaning. Pass text — Prime embeds it server-side via fastembed. |
| prime_recall | Hybrid recall: vector similarity + graph proximity + temporal recency. Pass text or a vector. |
| prime_context | Combined retrieval with tiered depth (L0 stats / L1 conversation / L2 full hybrid). |
| prime_index | Compressed knowledge index — token-efficient markdown of everything you know, by domain. |
| prime_neighbors | Walk the graph around a node. Multi-hop BFS with direction + relation filters. |
| prime_search | List all nodes of a given type. Cheap, broad. |
| prime_shortest_path | Find how two entities are connected — the chain of relationships between them. |
| prime_similar | Find the most semantically similar embeddings to a stored vector. |
| prime_history | Full audit trail for any entity — every creation, update, and deletion. |
| prime_forget | Soft-delete a node. Invisible to queries, preserved in history. |
| prime_stats | Graph overview: total nodes, edges, types, relations. |
Where Prime fits
Prime is a retrieval layer over durable event history, not a general database or a human publishing suite.
Use Prime for agent memory
Choose Prime when agents need graph and vector recall, compressed context, temporal history, and provenance through MCP.
Use Core without Prime for event history
Choose Core alone when replay, point-in-time reconstruction, and projections matter but semantic or graph recall does not.
Use a CMS for human publishing workflows
Choose a CMS when editorial UI, approvals, previews, scheduling, and collaborative page editing are primary requirements.
What's under the hood
Prime is an AllSource event store, not a separate database. Every mutation — node, edge, vector, soft-delete — appends an immutable event to the WAL and is replayed by projections that hold the queryable state. WAL + Parquet durability with CRC32 checksums; Snappy-compressed columnar snapshots; in-memory Core indexed reads measured 11.9µs p99 in the published reference benchmark. Hybrid recall adds graph and vector work and has separate end-to-end latency.
Embeddings are computed in-process via fastembed (AllMiniLML6V2, 384 dims, ~25 MB, auto-downloaded into the fastembed cache on first call). No external embedding service is required. Subsequent embeddings take ~1–3 ms on a modern CPU.
Already running Claude?
Then you're halfway there. Install allsource-prime, add the MCP config block, restart your client. Claude starts writing to memory on its own — no prompt changes needed.
