Lore
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Lore
Git for what your AI agents know.
Lore is a memory layer for AI coding agents: claims with provenance, stale detection, parallel-agent merges, and undo for a bad session.
The problem
If you use more than one AI agent on the same project (Claude Code, Codex, Gemini CLI, Cursor), their memory today is an append-only log with vector search. It stores, but nobody trusts it:
Dead facts keep living. The file changed three weeks ago; the memory still describes the old behaviour.
Contradictions are both "true". Two agents learned different things; search returns both.
You cannot undo a bad session. Memory that was poisoned stays poisoned.
You cannot ask "who taught the agent this?" So you never dare rely on it.
Agent B does not trust agent A, so it redoes the work.
Lore fixes the trust problem, not the storage problem.
Related MCP server: contextos-memory
What it gives you
Guarantee | How |
Provenance | Every claim carries evidence with a content hash and an authority tier (T0 test → T4 inference) |
Staleness | On read, evidence is re-hashed; a claim whose file changed is marked stale and drops out of retrieval |
Trust | Only |
Merge | 3-way merge on |
Undo |
|
See it work

Canon demo: npm → pnpm invalidation.
GUI: lore ui serves a live dashboard; see docs/desktop.md.


60-second demo
npm i -g @529studio/lore # or a Release tarball
cd my-project
lore init # creates .lore/ + lore.ontology.yml
lore ingest # derives claims from manifests, env vars, imports, routes, rules
lore status # 77 active, 0 draft, 0 stale
lore search "DATABASE_URL" # ranked claims with evidence and score breakdown
lore blame env:DATABASE_URL # who/what taught this, and whether it is still trueThen edit a file that a claim depends on:
lore status # stale 10 (nothing is deleted)
lore verify --all --strict # exit 3 — memory health is a CI gateWho this is for
For developers using coding agents on a repository (Node 22+, git). Non-terminal: Track B.
Track A — developer setup
Prerequisites
Node.js 22+
git (drives extraction; memory lives beside the repo)
An MCP-capable client: Claude Code, Codex CLI, Gemini CLI, Cursor, or any MCP-over-stdio client.
Install
# npm (recommended)
npm i -g @529studio/lore
# or build from source
git clone https://github.com/529-studio/lore.git && cd lore
npm ci && npm run build && npm linkVerify: lore --version.
Initialise a repository
cd my-project
lore initCreates:
.lore/lore.db # SQLite store: claims, evidence, commits, refs
lore.ontology.yml # which predicates may hold one value vs many
.gitignore # .lore/ appended, so the store is not committedlore ingest derives claims deterministically (no LLM):
Source | Claim example |
manifests |
|
env vars |
|
imports |
|
routes |
|
in-code invariants |
|
ADR decisions |
|
lesson rules |
|
rule registries |
|
root docs |
|
Re-running ingest is idempotent.
Connect your agents (MCP)
Run lore setup to configure your agent automatically:
lore setup agy # Antigravity CLI (.agents/mcp_config.json)
lore setup claude # Claude Code (.mcp.json)
lore setup codex # Codex CLI (.codex/config.toml)
lore setup gemini # Gemini CLI (~/.gemini/settings.json)
lore setup cursor # Cursor IDE (.cursor/mcp.json)
lore setup opencode # OpenCode (opencode.json)Or configure manually: claude mcp add lore --scope project --env LORE_SESSION=claude -- node "$(command -v lore)" mcp.
Each client sets LORE_SESSION (a branch agent/<session>); agents never write to main.
Team sessions pull the delta on initialize; memory_status shows remote_behind, memory_sync
uses it. Full details: docs/mcp.md.
Daily workflow
When | Command | Why |
Start of a task |
| give the agent the right 10 claims instead of the whole repo |
During the task | agent calls | inference lands as |
End of the task |
| you review what the agent learned |
Hand-off |
| merge your branch into |
Something is wrong |
| trace it, then undo it |
Command reference
lore init [--solo] [--full] initialise .lore/ (--full: rules, ingest, MCP)
lore ingest [--dry-run] derive claims from deterministic extractors
lore write write one claim (draft for agent/human); --valid-from <iso>
lore search "<query>" rank rules over static facts; --files, --semantic, --valid-at
lore explain <claim|key> why a claim is injected: trust, provenance, evidence
lore canon status|decay|confirm|resolve|metrics trust, decay, re-confirm, resolve, metrics
lore blame <subject> provenance: author, evidence, branch membership
lore timeline <subject> bi-temporal revisions across valid-time and tx-time
lore status [--strict] health: branch and store active/draft/stale, conflicts, GC
lore diff <from>..<to> claims added/removed between revisions
lore merge <branch> 3-way merge; --semantic, exit 2 on real conflicts
lore resolve [s] [p] record conflict decision; --take, --auto-semantic
lore promote merge current branch into main
lore push --propose publish session branch + drafts as a hub proposal
lore proposals | review --remote review, approve, promote proposals to main
lore wrapup [--yes] audit session drafts, approve and promote
lore revert <commit> inverse commit, history preserved
lore verify <claim> | --all re-hash evidence; --accept stores a legitimate change
lore guard [--staged] scan for secrets before they enter a claim
lore identity [issue] show identity or issue a token
lore alias add <name> <id> name an entity ("refund flow" -> doc:...#refund-flow)
lore rename <old> <new> move entities and evidence after a file rename
lore onboard detect the stack, pick a template, ingest
lore review review drafts one by one (approve / reject / skip)
lore reject <claim> reject a draft: retract it, keep the row and reason
lore attest <claim> independent review: agree or disagree, linked to the claim
lore digest what changed since the last review
lore ui dashboard on localhost (health, sync indicators, review)
lore remote <dir> point fetch/push at a shared directory
lore fetch | push exchange commits; fetch refreshes links:
lore links [sync] refresh read-only ext: memory from links:
lore bundle export|import air-gapped exchange of commits
lore replicate [action] Litestream streaming replication
lore sync bi-directional sync with a remote replica
lore redact <claim> replace the object with [redacted], keep id and audit
lore purge <claim> --yes remove the row permanently, keep an audit entry
lore gc [--ttl-sessions 3] retract drafts, purge tombstones, --compact
lore export --md [--filter publish] deterministic filtered markdown
lore supersede <claim> replace a claim, preserving history
lore setup [agent] configure MCP for agents
lore rules [--update] install or update agent rules
lore config [action] view or edit project configuration (list, get, set, unset)
lore check-update check npm registry for newer versions of lore
lore doctor [--json] [--fix] readiness: store, branch parity, MCP configs, ontology
lore mcp MCP server over stdioExit codes: 0 ok · 1 doctor errors · 2 unresolved merge conflict · 3 stale above threshold.
search ranks invariant predicates above routes and static AST/TOC facts, and a query must match
the claim text; structural facts stay retrievable but never fill the budget ahead of a rule. See
docs/retrieval.md.
Troubleshooting
Symptom | Cause | Fix |
| no |
|
| empty branch |
|
claim is | agent inference needs approval |
|
everything is | files changed since ingest |
|
merge exits 2 | genuine conflict |
|
Track B — non-terminal setup
A developer sets this up once:
lore init && lore ingest
claude mcp add lore --scope project --env LORE_SESSION=team -- node "$(command -v lore)" mcpAfter that, use Claude / Codex / Gemini as before. What changes:
the agent stops re-discovering the same facts every session;
when a file changes, the agent is told the old fact is stale instead of repeating it;
anything the agent "learns" by inference waits for a human
approvebefore it is trusted;a bad session can be undone.
Without tooling: lore export --md --out AGENTS.md writes what the agent knows, grouped by
subject.
GUI: lore ui; desktop packaging: #66.
Track C — team workflow
main ──────────●──────────────●───────── (shared memory)
\ /
agent/claude ●──●──●────● (one session)
agent/codex ●──●──● (another session)Every session writes to
agent/<session>. Nothing lands inmainby accident.lore promotemerges your branch intomainwith the same ladder.Two agents editing the same fact produce a conflict, not a silent overwrite:
T0 testbeatsT1 filebeatsT2 humanbeatsT4 inference;a stale side loses to a verified side;
delete-vs-edit resolves to deletion;
if nothing applies, the merge aborts with exit 2 and asks a human.
lore resolve <subject> <predicate> --take theirs --reason "..."records the decision, and the next merge applies it.Linked worktrees share
.lore/; a committed.lore.ymlpluslore joinattaches a fresh clone — see team mode.
Team identity. Team mode requires LORE_TEAM_SECRET, an identity (LORE_TOKEN or LORE_OIDC_EMAIL),
and lore.policy.yml. See docs/team-mode.md.
Internal or offline repositories. Memory does not depend on a git host: lore remote shares
commits via directory or Postgres, lore bundle crosses air gaps, lore replicate/lore sync
stream WAL; --trust-remote includes ahead-of-checkout claims. See
docs/team-mode.md.
Team hub. lore hub serve adds per-user tokens, delta sync, CAS, server policy, contributor
proposals and N-of-M review. See docs/hub.md.
Cross-repo memory. A private origin declares publish: allow/deny and to_repos; a consumer
declares links: and receives read-only ext:<slug>/... claims rendered [EXT], capped at 25% of
the search budget. See team mode.
Plugins. Personal config adds hosts/hooks; committed .lore.yml plugins add extractors. See
docs/plugins.md.
CI. The GitHub Action comments on each PR with what it teaches and invalidates. See docs/github-action.md.
How it works
A claim is (subject, predicate, object) plus:
bi-temporal timestamps — when it became true (
valid_from) and when we learned it (tx_from);authority tier — T0 test, T1 tool-observed, T2 human-approved, T3 human chat, T4 inference;
evidence — kind, reference, and a content hash taken at observation time.
Claims are immutable and content-addressed, so two agents observing the same fact produce the same id and merge becomes a set operation instead of a text merge. Commits form a DAG (a merge commit has two parents). Memory is never deleted: retract, supersede and GC all change state, not rows.
On every read, evidence hashes are recomputed. If a file changed, the claim is stale — visible
in blame, excluded from search, marked in export. That is the whole trick: memory behaves like
a cache of reality that can be verified, not a belief system.
Full design and every deviation: SPEC.md. Why the storage, protocol and branch model look the way they do: docs/adr.
Evidence, not claims
Executable checks and benchmarks in the repository:
npm run build # TypeScript
npm run smoke # 20+ end-to-end assertions on a throwaway repo
npm run mcp:smoke # real MCP handshake, tools, draft gating, approve
npm run bench:concurrency # soak benchmark (p50/p95/p99, Prometheus/OTel)
npm run bench:cluster # multi-replica gossip topology simulator
npm run eval # outcome metrics, no LLM judgeLatest npm run eval: 20 replayed sessions plus test suite before and after revert.
Set LORE_EVAL_FIXTURES to evaluate against your repositories; details in docs/eval.md.
Metric | Result | Threshold |
stale_rate | 8.2% (worst file 15.8%) | < 15% |
false_claim_rate | 0.0% | < 5% |
conflict_rate (merges that should succeed) | 0.0% | < 10% |
revert_correctness | 100% | 100% |
token_savings | 72.3% | > 30% |
time_to_first_useful | 3 invocations | < 10 |
These numbers are measured proxies; the harness fails the build when a scenario check fails.
Limitations
verifydoes not rewrite hashes; a changed file stays stale untilingestre-observes it (#3).Code repositories only. Entity ids come from
path#symbol, which is what makes merge deterministic. Non-code entities are v0.3 (#20).
Contributing
Issues and pull requests are welcome. Start with CONTRIBUTING.md and the project rules in AGENTS.md — they apply to humans and AI agents alike.
Security reports: SECURITY.md, never a public issue.
License
MIT © 529 Studio. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Related MCP Servers
- AlicenseAqualityBmaintenanceHosted memory for coding agents, exposing commit_mem, recall, and status over stdio. Each write carries provenance, contradictions surface as inspectable state changes, and a bad run can be rolled back from a snapshot.151Business Source 1.1
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to share a local-first, versioned memory of decisions, conventions, tasks, conflicts, and handoffs over MCP and REST.MIT
- AlicenseNot gradedqualityBmaintenanceExposes repo-native, self-verifying memory to coding agents over stdio MCP, letting them recall ranked past decisions, record new claims with verifiable receipts, and check the health and stats of stored memory. Keeps agent context honest by surfacing memories whose evidence no longer holds.4 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables development agents to keep persistent memory: proposing and reviewing workspace-scoped content, running hybrid search over accepted sources, and resuming projects with auditable history and provenance. It exposes 32 MCP tools over stdio and authenticated Streamable HTTP, with optional embeddings and rerank.Apache 2.0