Knot
Persistent memory pool MCP server that verifies every memory against the file on disk.
Knot is an MCP server giving AI coding agents memory that survives the session. Every memory tied to a file is hashed at save time and re-hashed on recall, so a memory that no longer matches reality is flagged stale before it can mislead the agent.
Install
curl -fsSL https://raw.githubusercontent.com/dreygur/knot/main/install.sh | bashThe problem: context rot
An agent's memory of a codebase decays the moment the codebase changes. A note saying “auth middleware validates JWT in three steps” is useful until someone rewrites that middleware, at which point it is worse than having no note at all — it is confidently wrong.
Most memory systems store the text and hope. Knot stores the text alongside a hash of the file it describes.
Just-in-Time Verification
When a memory is saved with a `verification_path`, Knot hashes that file. On every later recall it re-hashes the file live and compares.
A match returns the memory as `[VERIFIED]` and raises its utility score. A changed file returns it as `[STALE:MODIFIED]`, still available but flagged. A missing file returns `[STALE:MISSING]` for review.
The important part is the boundary: stale memories are never silently promoted to project scope. `commit_session` rejects them.
Three memory scopes
L1 is session scope, living only in the current conversation. L2 is project scope, reached by promoting session nodes through `commit_session`. L3 is global, holding cross-project knowledge long-term.
The promotion step is deliberate rather than automatic, which is what keeps a session's guesses from becoming a project's assumptions.
Tools
Memory operations: `save_wisdom`, `recall_memory` (semantic search with confidence scores), `commit_session`, `jit_verify`, `list_nodes`, `link_nodes` for typed edges like `depends_on` / `contradicts` / `refines`, `forget_node`, `knot_status`, and `prune_ghosts` for nodes whose files are gone.
Skills are reusable procedures with variable placeholders: `save_skill` stores steps plus a verification command, `execute_skill` runs one with substitutions, and `recall_skills` searches them.
Setup
Installs as a Claude Code plugin through `/plugin marketplace add dreygur/knot`, via a one-line install script, or manually from a release binary for Linux, macOS (Intel and Apple Silicon), and Windows.
The installer registers the MCP server with Claude Code and OpenCode, whichever it detects, and injects the Knot Protocol into the agent rules file so recall happens before work starts rather than after.
The same binary doubles as a CLI, so `knot recall "SQLite WAL mode"` works from a shell script or a git hook.