Purpose
Linksee Memory is a local-first agent memory system, provided as a Model Context Protocol (MCP) server. The problem it solves is this: AI coding agents (such as Claude Code) forget everything from previous sessions in a new session, leading to re-implementing approaches that have already been rejected and repeating mistakes that have already been made. Linksee Memory gives cross-session, cross-agent project handoff a "reason"—record a decision once, and the agent will see it again before acting.
Main Capabilities
- Cross-agent shared memory: All memories are stored in a single local SQLite file (~/.linksee-memory/memory.db). Claude Code, Cursor, Windsurf, OpenAI Codex, and Gemini CLI share the same "brain," and a decision made in one tool will appear before other agents act. Data does not leave the local machine, no account, API Key, or cloud service is required, MIT license.
- Six-layer structured memory: Each memory is tagged as exactly one layer: goal / context / emotion / implementation / caveat / learning. Among these, caveat-layer entries are protected and will not be automatically forgotten; obscure low-importance memories are automatically merged into learning entries when the server starts.
- Drift Detection: Decision anchors can be declared, and the engine automatically detects whether the committed reality has deviated from the declared intent. States are divided into: 🔴 Drift (reality has deviated and there is no recorded handling), 🟡 Review (soft signals awaiting a decision), ⚪ Held (the gap has been confirmed and a review date has been set), 🔵 Aligned (reality is consistent with intent or there is a recorded explanation). It can be handled via fix, supersede, acknowledge, and dismiss, and gated with two gates: harden (PreToolUse blocking) and soften (falling back to a warning). Key rule: deviations explained by an on-record handling (supersede/fix/acknowledge) do not count as drift; only unexplained gaps are flagged.
- Re-injection Guard: Complementary to post-hoc drift detection, the guard is a pre-action step. It runs as a Claude Code hook, re-presenting a decision before the agent executes a tool that could undermine an already locked decision. It is fail-open by design: any parsing/database/logic error is allowed through, and only an explicit hard contradiction to a declared decision will block.
- token savings (read_smart): A diff cache based on sha256 and AST/heading/indentation chunking; repeated reads return only the differences. It is said that a typical TS file edit can save 86%, and an unchanged re-read can save 99%.
- map (linksee-memory map): Raises drift detection from a single anchor to the entire product. Use map.yaml to describe how value reaches users (discover → understand → try → adopt → retain → monetize → expand), and establish typed dependencies between the parts. The coordinator checks the map against real code, and the CLI can answer: I am changing this file—where is it on the map, and what else must move together. The impact scope is graded as must fix together / should align / fyi.
How to Use
One-click install:
npx -y linksee-memory setup
This command registers the MCP server, installs the agent skill (teaching the agent when to recall/remember), configures automatic capture (saving each session to the local brain), and optionally wires the reinjection guard into the current project. After restarting Claude Code, just converse normally; add "Use Linksee" to the prompt to trigger memory recall.
After manual installation and registration, the tools appear as mcp__linksee__remember, mcp__linksee__recall, mcp__linksee__read_smart.
To record a decision use: remember({ content, anchor: {} }). To declare an anchor use: declare_anchor({ kind: "decision", statement: "...", violation_signal: [...] }).
Map commands include: where · affects · explain · status · next · reconcile · inspect --json · blueprint; adding --lang ja displays Japanese labels.
Guard-related options: --project-guard (current repository only), --no-guard (skip). You can also manually place the guard configuration block into .claude/settings.json (project root, or ~/.claude/settings.json for all repositories), pointing to the globally installed linksee-memory-guard bin.
Use Cases
- When Claude Code forgets past decisions across sessions.
- When you need to share the same memory across Claude Code, Cursor, Windsurf, OpenAI Codex, and Gemini CLI.
- When the agent repeatedly reimplements rejected proposals.
- When you need to detect whether the codebase has drifted from past decisions (with file:line evidence).
- When running multiple projects in parallel and need to see which project has quietly drifted from its goals.
- When you want a local-first, self-hosted memory solution with no cloud dependency.
Limitations
- Official materials note: if you only need "remembering across sessions," CLAUDE.md is already sufficient; Linksee targetsthe three scenarios of interception before action, changing your mind, and visibility into drift across multiple parallel projects.
- The reinjection guard requires explicit harden to block; otherwise it only reinjects as context.
- The map feature depends on the project providing map.yaml as the source of truth for the desired state.
- Other specific performance, compatibility, or pricing information is not yet provided.