Labsco
MCP SERVER

Linksee Memory

by michielinksee

A local memory an agent keeps across sessions and across tools, plus a map of your declared decisions that flags when the code has drifted from them.

Agent MemoryVerified
Summary
Memory is the way in; the reason to keep it is that it notices when the code stops agreeing with what you decided.

Anchors are declared by a human rather than inferred from logs, and the drift check reconciles them against reality afterwards — which is what keeps the map from filling up with things nobody actually agreed. Caveat-layer entries, the 'never do this again' records, are the ones shielded from auto-forgetting, so the hard-won mistakes outlive everything else in the store.

What it is

One SQLite file on your machine that Claude Code, Cursor, Windsurf, Codex and Gemini CLI can all read from — structured memory with ranked recall, and a truth map of decisions the drift detector checks against committed reality.

What you get
  • remember writes into exactly one of six layers — goal, context, emotion, implementation, caveat, learning — and also updates or deletes an existing entry by ID; caveat entries are protected from auto-forgetting
  • recall searches by query, by file path, by layer or by thread, ranks hits on relevance, heat, momentum and importance, and returns the reasons each one matched
  • read_smart replaces the plain file read: the first read returns content plus chunk metadata, and an unchanged re-read comes back as a small fraction of that
  • A truth map of declared decisions — declare_anchor records a decision, constraint or prohibition, with the rule that anchors come only from an explicit human declaration and are never mined from logs
  • where_am_i places the current topic on that map and reports the blast radius: what becomes suspect if you change this; check_decision opens one anchor with its premises, drift edges and pending candidates
  • drift_status separates what has genuinely diverged from what is awaiting a human call and what is acknowledged and time-boxed; resolve_drift records the verdict — fix, supersede, acknowledge and the rest
  • Fork points: flag_proposals records the options you put to the user that were never answered, dream weighs those orphans against the project's North Star, and resolve_proposal writes down whether each stays on the dashboard
  • Cold, low-importance memories are consolidated into learning entries when the server starts
Requirements

Nothing to authorize and nothing leaves the machine: memory lives in ~/.linksee-memory/memory.db, relocatable with LINKSEE_MEMORY_DIR. npx -y linksee-memory setup does the whole install — registers the stdio server, installs the agent skill that teaches the agent when to recall and remember, wires a Stop hook that captures each session, and offers to add the re-injection guard to the project's .claude/settings.json. By hand instead: claude mcp add -s user linksee -- npx -y linksee-memory. Any client that speaks stdio can connect with the same command.

Setup effort

One command — npx -y linksee-memory setup