memory.cpp

Cache-aware repository memory for coding agents

Local

Install

See setup instructions on github.com

What it does

memory.cpp is a local-first context compiler for coding agents. It gathers repository material such as decisions, fixes, traces, tests, and rules, then assembles a compact context pack before any model request is sent. Each item carries a source anchor, trust level, freshness status, sensitivity flag, and cache role, so durable knowledge can be placed in a byte-stable prefix while volatile task details go in a separate suffix.

The tool is aimed at developers running long-horizon coding agents who want fewer wasted tokens, less stale or contradictory input, and reproducible prompts. It works through a Rust CLI, with commands for compiling packs, recalling memories, planning cache layout, locking a pack for reproduction, and checking invariants in CI. Provider-specific packs exist for several agent clients, and an MCP install option exposes read-only resources.

By default everything stays in a local SQLite vault with no network calls. Secrets are redacted and risky writes are screened. Some caveats matter: it does not shrink a provider's KV cache, benchmark figures are estimates unless measured against a running runtime, and the headline comparisons use a synthetic corpus.

Compatibility and authentication

Connection
Local
Transports
Unspecified
Authentication
Unknown

Security and permissions

  • When you run the server locally, it runs with your user permissions.
  • Authentication type: Unknown.

Repository data

Stars
659
Last push
Nov 2, 2026
License
MIT
Archived
No

FAQ

What license does memory.cpp use?
MIT
Does memory.cpp run locally or remotely?
It runs locally.
Is memory.cpp an official server?
It is listed as a community server.

Comments

No comments yet.

Embed a listing badge

Featured on AI Agents Marketplace
<a href="https://aiagentsmarketplace.dev/mcp/memory-cpp"><img src="https://aiagentsmarketplace.dev/badges/featured.svg" alt="Featured on AI Agents Marketplace" width="262" height="36"></a>
See badge options