Local-first MCP server serving a project's business-domain knowledge to MCP-compatible agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A local MCP server that accumulates the business-domain knowledge of a software project β flows, integrations, decisions, nuances β and makes it available to any MCP-compatible agent (Claude Code, Cursor, Copilot, Gemini, OpenCode).
The goal is to capture the why behind the code: the stuff a new developer would need six months from now to understand why a thing is built the way it is. The what is already in the code β domain-memory does not duplicate it.
Status: Functional. Local install, single developer, local SQLite.
Domain Memory is a living glossary of your project's business domain β the concepts, rules, entities, and the why behind decisions β that grows as you build. The frame that matters: this is semantic memory (what "a German invoice" or "a deactivated account" means in your project, and why it behaves the way it does), not episodic memory (what you changed last Tuesday and in which commit). The episodic record already lives in git history; Domain Memory holds the part no diff captures.
You don't stop to write documentation. As the agent works it records findings on its own, and they are folded into the glossary when you run /save-knowledge or open a pull request β so the knowledge accrues from real work instead of becoming a separate authoring chore you have to remember.
Everything is plain markdown you own and version in git. Each entry is a human-readable file under .domain-memory/; the search index is derived from those files and can be rebuilt from them at any time, so the knowledge stays portable, reviewable in a pull request, and never locked inside a database.
If what you want is a history of work sessions, cross-machine sync, or generic per-user assistant memory, this is deliberately not that. Domain Memory stays narrow on purpose: the domain knowledge of one project, and nothing else.
Domain Memory occupies a narrow niche. The closest neighbours and where it differs:
| Tool | What it stores | Scope |
|---|---|---|
| Domain Memory | Business-domain knowledge β the why behind the code, decisions, integrations, flows | Per-project, local, source-controlled markdown |
mem0, letta | Conversation / agent memory β what the user said, preferences | Per-user, cross-conversation |
RAG over docs (continue.dev, custom pipelines) | Whatever text you embed (READMEs, Confluence, code) | Reuses existing artefacts; no new authoring layer |
CLAUDE.md / AGENTS.md | A single hand-written context file | One file, no structure, no search |
If you're asking "where does the agent remember that I prefer dark mode?", you want mem0. If you're asking "where does the agent remember that we deliberately bypass tax validation for German invoices because of the 2024 ruling?", you want this.
Three principles run the whole system:
.md file under .domain-memory/knowledge/. SQLite is a derived index that can be rebuilt from disk at any time (domain-memory reindex).The unit is the feature (checkout, auth, notifications, searchβ¦). Each feature is one directory with a feature.md and optional aspects/ underneath:
A feature is the primary context: the general Mermaid diagram in feature.md typically answers 70% of questions. Aspects are loaded on demand when the agent needs detail on a specific slice.
Each entry carries three layers:
file_paths + qualified symbol names.While you work, the agent appends findings to .domain-memory/staging/<branch>.jsonl. Findings survive session compaction, browser closes, new sessions on the same branch β indexed by git branch, not by session id. When you open a PR or run /save-knowledge, the staging is consolidated into real entries.
If you sometimes push without going through the agent, those findings can sit unconsolidated. The optional pre-push reminder closes that gap: domain-memory install --git-hook writes a non-blocking .git/hooks/pre-push that prints a one-line nudge when the branch you are pushing still has staged findings. It never blocks the push, stays silent when there is nothing to consolidate, and is a no-op if the CLI is not on PATH. It is opt-in β plain install asks before touching .git/hooks.
search_knowledge runs three matchers in parallel and fuses them:
The fusion is weighted: path = 0.5, embedding = 0.3, bm25 = 0.2. Path/symbol is weighted strongest because it is the most reliable signal when two pieces of knowledge are about the same code.
Every entry stores SHA-256 hashes of the files it references. On PR open, the agent cross-references the PR's touched files against the knowledge store via check_drift and asks the developer to review any affected entries. Rename/move is absorbed by matching on basename and short symbol; deletes are caught on the next reindex.
Every entry has a confidence (0β100) that decays -5 points every 30 days without verification. Computed lazily at read time β no scheduled job, always consistent with the wall clock. Below 50 the entry shows up red in /stale and the web viewer. A human review resets it with domain-memory verify <id>.
Two ways to run it. Pick the one that matches what you're trying to do.
Add it to your MCP client's config. No global install needed β npx fetches and runs it on demand.
That goes in .mcp.json (Claude Code), .cursor/mcp.json (Cursor), .vscode/mcp.json (Copilot), .gemini/settings.json (Gemini), or opencode.json (OpenCode).
Restart your client. From then on the agent will call search_knowledge at the start of each session.
If you also want the domain-memory CLI (to bootstrap entries, run the web viewer, check drift, etc.):
This installs three commands globally: domain-memory, domain-memory-server, domain-memory-web. Then in any project:
install is idempotent β re-running updates files in place without clobbering your content.
To remove domain-memory from a specific project: delete .domain-memory/, remove the <!-- domain-memory:start --> block from the client instruction files, and drop the domain-memory entry from .mcp.json / .cursor/mcp.json / .vscode/mcp.json / .gemini/settings.json / opencode.json. If you installed the pre-push reminder, also remove the # >>> domain-memory pre-push >>> block from .git/hooks/pre-push (or delete the file if it contains nothing else).
If you want to hack on the project itself, see CONTRIBUTING.md for the clone-and-link dev workflow.
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/domain-memory)<a href="https://allmcps.com/mcp/domain-memory"><img src="https://allmcps.com/api/badge/domain-memory?style=directory" alt="Domain Memory on AllMCPs" /></a>