Skip to main content

AI-native coding memory — lore/doc that AI agents read and write directly (MCP)

Project description

llre

AI-native coding memory — a project memory that AI agents read and write directly (lore/doc), via MCP.

A FastMCP server (stdio) that plugs into any MCP client. As the AI works, it records lore (decisions, pitfalls, local rules) and doc (specs, system docs) directly, searches them next session, and detects drift against your code. Humans set direction and approve — tell the AI, and the AI records.

한국어 · localized docs at linklore.io/docs

Fastest way to install: tell your agent

This is an MCP server — it's meant to be set up by an AI agent, not typed in by hand. Paste this as your first message to Claude Code, Cursor, 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. Once it's set up, follow the CLAUDE.md section it adds: call brief() at the start of every session and record decisions as lore.

Prefer to type the commands yourself? See Install / run below.

Why

AI agents forget decisions when the session ends. Spec files keep the conclusion but lose the why. LinkLore keeps the judgment itself as lore, so the next session's AI picks it up with a single brief().

$ uvx llre                                              # runs immediately — no setup

# The AI records a decision while working
add(type='lore', title='Retry capped at 3', msg='API misclassifies 5xx as 429 — infinite retry risk, cap at 3')
→ [lr-8a21f0] Retry capped at 3

# Next session — new conversation, same project
brief()
→ Recent: [lore] Retry capped at 3 — API misclassifies 5xx as... [lr-8a21f0]

Full introduction and screenshots: linklore.io/docs.

Mental model

  • lore (lr-) — decisions, pitfalls, local rules, footprints. level 1–4 (importance), status open/done.
  • doc (dc-) — specs and system docs. group for category, items for checklists/catalogs.
  • lore↔doc bidirectional links (link) + file anchors → automatic code context (stale detection, show(file=...)).

Install / run

Standard install — PyPI package llre (runs via uvx, no clone needed):

uvx llre init          # set up .linklore in this directory (start the project memory)
uvx llre               # MCP server for AI tools (stdio, no args)
uvx llre login         # Google login (browser) — auth for personal backup / team sharing

Embedding search is an optional extra: uvx --from 'llre[embed]' llre (fastembed + numpy).

Platforms: macOS (Apple Silicon), Linux (x86_64), Windows (x86_64) — Python 3.11+.

Claude Code

claude mcp add llre -- uvx llre

Other MCP clients

Project .mcp.json or .cursor/mcp.json:

{
  "mcpServers": {
    "llre": {
      "command": "uvx",
      "args": ["llre"]
    }
  }
}

Logs go to ~/.linklore/mcp.log.

CLI

Besides the MCP stdio server (uvx llre, no args), every tool is callable directly from the terminal — one set of tool functions, two entrances (MCP/CLI).

Seven commands humans type by hand:

uvx llre init            # set up .linklore in this directory
uvx llre login           # Google login (browser)
uvx llre logout          # remove local token
uvx llre connect         # link this project to my account (personal backup)
uvx llre whoami          # show my identity (read-only)
uvx llre doctor          # project data integrity check
uvx llre report <msg>    # send feedback/bugs directly (no login required)

All 24 registered tools are also callable through the generic dispatcher — uvx llre <tool> [key=value ...]:

uvx llre brief
uvx llre show query=lr-x
uvx llre add type=lore title=Title msg=Body

Argument values are parsed as JSON first — level=2 becomes an int, help=true a bool; anything that fails to parse stays a string.

Tools (24)

Category Tool Description
Setup init Initialize project data (creates .linklore/, blueprint supported)
Project brief Project dashboard — call at the start of every session
Project status Code↔doc sync state (stale detection, ack)
Project config Project settings + external source management
Diagnostics doctor Data integrity check (id/paths/link targets), action='fix' auto-repairs
Diagnostics report Send feedback/bugs to the team — anonymous allowed, works with or without login
Record add Add lore/doc (type='lore'|'doc', batch when items=dict list)
Record edit Edit an entry — msg= always appends
Record rm Delete — trash (soft) by default, force=True for permanent
Record restore Restore from trash. Without id, lists the trash
Record local Operate on other workspaces on the same disk — action='move'|'copy'|'show'
Query show Search/browse — query, type, tag, level, status, file, period filters
Query log Change history
Link link Connect two entries — dc↔dc / lr↔lr / dc↔lr automatically
Link unlink Disconnect (symmetric to link)
Doc views doc_flow Render a doc flowLink chain in order (journey view)
Doc views doc_map Bird's-eye view of the whole doc link network
Doc views doc_rollup Collect lore linked to a doc → draft for AI summarization
Cleanup cleanup Detect duplicate-lore candidates (similarity threshold)
My server push Personal backup to backend (think git remote)
My server pull Personal restore (symmetric to push)
Openbox send Send entries to an openbox
Openbox import Import from an openbox into the project
Openbox member Member/role governance (new/invite/join …)

Tool arguments prefer lists (tags=['a','b']). Each tool documents itself with help=True.

Data layout

.linklore/
├── model/
│   └── settings.json        # project settings
├── system/
│   ├── linklore.db          # single SQLite home — lore/doc/links/history
│   ├── embeddings.npz       # lore embeddings (+ embed_index.json)
│   ├── embed_doc.npz        # doc embeddings (+ embed_doc_index.json)
│   ├── codemap.json         # code map cache
│   └── versions/            # version snapshots
├── remote/                  # server/openbox local cache + identity (not the store)
│   ├── personal/            # personal server (push/pull) connection info
│   └── <project-id>/        # per-openbox received cache (meta.json + lore/doc)
└── external/
    └── registry.json        # external source registry
  • The home store is a single SQL source (linklore.db, WAL mode). Your data is a local file that is yours to inspect, back up, and delete.
  • LINKLORE_DB_URL can point at Postgres or another DB (SQLite by default).

Source model

Mostly readable, core compiled. The published wheel ships the entry point, i18n catalogs, base utilities, and the onboarding guide as readable Python; the core modules (search, ranking, contradiction detection, tool logic) ship as compiled extensions. The readable portion is published at the project repository. We'd rather be upfront that the crown-jewel logic is compiled than pretend the package is fully open.

Environment variables

Variable Description
LINKLORE_BACKEND_URL backend API base. Default https://api.linklore.io
LINKLORE_DB_URL DB URL override. Default: SQLite .linklore/system/linklore.db
LINKLORE_LANG Tool output language (en, ko). Defaults to OS locale, falls back to en
CLAUDE_PROJECT_DIR Project-root anchor injected by MCP client hooks

License

Elastic License 2.0 — free to install and use; you may not provide the software as a competing managed service, circumvent license-key functionality, or remove licensing notices.

Team sync, cross-project sharing, and cloud backup are provided by the backend service at linklore.io.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

llre-0.1.3-cp311-abi3-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.11+Windows x86-64

llre-0.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (21.8 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

llre-0.1.3-cp311-abi3-manylinux1_x86_64.manylinux_2_5_x86_64.whl (22.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.5+ x86-64

llre-0.1.3-cp311-abi3-macosx_26_0_arm64.whl (4.5 MB view details)

Uploaded CPython 3.11+macOS 26.0+ ARM64

File details

Details for the file llre-0.1.3-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: llre-0.1.3-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for llre-0.1.3-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a29eecda1e1cd23b4adc0dbd77ea5a25d4c8f3f51f6b33cbe7d180d1e73386b5
MD5 087b93e26ae0b2874b46255ea8e3acbb
BLAKE2b-256 9407b258319d138ae5fbb89e468c83c746c24bbc9d783b664a0add103aa64736

See more details on using hashes here.

File details

Details for the file llre-0.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

  • Download URL: llre-0.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 21.8 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for llre-0.1.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 16144e24538f631a2a37ee45234b28e9f0dc8504ccc0a7df71701a1379fc2421
MD5 c936eec9a8b5618323e7ba3bf8b8a8b0
BLAKE2b-256 b82aa694c84da2a8dbdc0360a374e63d3db1cbb18aba49cf968ef3aa69ef66b3

See more details on using hashes here.

File details

Details for the file llre-0.1.3-cp311-abi3-manylinux1_x86_64.manylinux_2_5_x86_64.whl.

File metadata

  • Download URL: llre-0.1.3-cp311-abi3-manylinux1_x86_64.manylinux_2_5_x86_64.whl
  • Upload date:
  • Size: 22.2 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for llre-0.1.3-cp311-abi3-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 714b515216365ec5f6bc5a86e83a6d57011095e072a7baa50cc9e56ef0db3371
MD5 5eba030bd4791e2ffcf36c83ec07ab30
BLAKE2b-256 080b2cf39720859e8c60459af6098e77e830322d533202b3513d6215f34add8b

See more details on using hashes here.

File details

Details for the file llre-0.1.3-cp311-abi3-macosx_26_0_arm64.whl.

File metadata

  • Download URL: llre-0.1.3-cp311-abi3-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.11+, macOS 26.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for llre-0.1.3-cp311-abi3-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 c0f413a5da7e3177a46cbff982560af609bd9e4f39cc507b0c155205f5bf0aef
MD5 d40789df7eab3f7f52ad56a602b3e09b
BLAKE2b-256 2573433725ae7e8954f092d9f6f4bbe020ca2b54b28a59cec2be0aff73ed3ab2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page