LinkLore
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**MCP server for project memory — lets AI agents record decisions, pitfalls, and specs as they work, and recall them next session with code context attached.**
Built for agents, not humans: every tool here is designed for usability by an AI, not readability for a person.
Why LinkLore
Every new session, an AI agent starts from zero — decisions get re-litigated, pitfalls get rediscovered, and "why is it done this way?" gets answered by guessing. Markdown notes don't fix this: they're written for people, they drift from the code, and no agent reads them reliably.
LinkLore is structured memory that the agent itself reads and writes through MCP tools:
- **Two record types** — *lore* (decisions, pitfalls, journal) and *doc* (specs, plans), bidirectionally linked to each other and to code files.
- **Local-first** — everything lives in a .linklore/ SQLite store inside your project. No account needed to start.
- **Code context** — records link to source files; git-diff-based stale detection flags memory that the code has outrun.
- **Cheap recall** — query by meaning, tag, file, status, or period; a session-start brief() returns open items and hotspots in a few hundred tokens.
Quick Start
Runs straight from PyPI — no install or clone (uvx llre).
**Claude Code**
**Any other MCP client** (Cursor, Codex, Windsurf, …) — add to the project's MCP config (e.g. .mcp.json):
Then initialize, once, in the project root:
**Or let your agent do all of it** — this is a server meant to be set up by an AI agent rather than typed in by hand. Paste this as your first message to Claude Code, Cursor, Codex, or any other MCP-capable agent:
> Set up LinkLore (an MCP server for project memory) in this repo. It's the PyPI package llre, run via uvx llre — no install or clone needed. Register it as an MCP server for whichever client you are (Claude Code: claude mcp add llre -- uvx llre; otherwise add {"mcpServers": {"llre": {"command": "uvx", "args": ["llre"]}}} to this project's .mcp.json), then run uvx llre init here. Ask me first before running uvx llre login — it opens a browser for Google login and is only needed for personal backup or team sharing.
The Loop
How an agent actually uses it, in order:
Available Tools
23 tools. Call any of them with help=True for full usage.
| Category | Tool | What it does |
| --- | --- | --- |
| Setup | init | Set up .linklore/ in the current directory |
| Project | brief | Session-start dashboard — open items, recent activity, hotspots |
| Project | status | Code↔doc sync drift detection (git-diff based) |
| Project | config | Project settings, external sources, session pin |
| Diagnostics | doctor | Data integrity check; action='fix' auto-repairs |
| Record | add | Create lore or doc; items=[{...}] batch-creates |
| Record | edit | Modify an item — append (default), replace a section, overwrite, or supersede |
| Record | rm | Delete — recoverable trash by default, force=True for permanent |
| Record | restore | Recover from trash; without id lists the trash |
| Record | local | Move/copy/view items across sibling local workspaces |
| Search | show | Query by id, text, tag, status, file, or period; graph and tag views |