Local-first agent memory MCP — Claude Code, Cursor, OpenAI Codex, and Gemini CLI share one SQLite brain. 6-layer structured memory (goal/context/emotion/implementation/caveat/learning), drift detection with pre-action re-injection guard, and an AST-aware diff cache saving 50-99% tokens on file re-reads. npx linksee-memory-setup — one command.
Server Config
{
"mcpServers": {
"linksee": {
"command": "npx",
"args": [
"-y",
"linksee-memory"
]
}
}
}