lore
Provides Git-native context sync: installs pre-push and post-merge hooks, stores encrypted AI sessions in hidden refs/ai/lore, and supports lore commands via git lore to push/pull context without polluting the working tree or git log.
Interacts with GitHub for remote repository syncing and contributor key discovery, allowing users to authorize or revoke GitHub users by fetching their public SSH keys from github.com/.keys for encrypted context sharing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@loresearch my past sessions for how we fixed the login bug"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lore (git-lore)
Git-native, encrypted, zero-token-bloat AI context & transcript sync across devices and contributors.
Switch between your desktop and laptop—or hand off a branch to a teammate—and your AI coding agent (Antigravity, Claude Code, Cursor, Codex) immediately knows your past chats, architectural decisions, and debugging context without you ever explaining a thing.
0 Cloud Accounts / 0 API Keys: Uses Git itself (
refs/ai/lore) as the database and deterministic local compression.~350-Token Always-On Digest + 0-Token Deep Search: Strips 85–95% of raw
.jsonlbloat and indexes full transcripts locally via SQLite FTS5 + MCP.Private Context on Public Repos: Encrypted with your existing
~/.ssh/id_ed25519key andhttps://github.com/<username>.keysvia Ed25519 → X25519 ECDH + AES-256-GCM (with automatic API key/token redaction before encryption).Zero Git Pollution: Never touches your working tree, never clutters
git log, and keepsgit status100% clean.
Quick Start (2 Commands)
# 1. One-time machine setup (registers global MCP server & skill for Antigravity, Claude Code, Cursor)
npx git-lore-cli setup
# 2. Initialize in any Git repository
git lore initFrom that moment on, every git push automatically compresses, encrypts, and syncs your repo's AI sessions to refs/ai/lore, and every git pull decrypts and updates the local context rule.
Related MCP server: context-mcp
How lore Compares
Feature | Static | Raw Chat Loggers (SpecStory, etc.) | Cloud Memory SaaS (Mem0, etc.) |
|
Updates automatically on | ❌ Manual | ⚠️ Commits giant files to branch | ❌ Separate cloud sync | ✅ Auto |
Token cost per chat | ~500 tokens | ❌ 20,000–100,000+ tokens | Varies | ✅ ~350 tokens (digest) + 0-token FTS5 search |
Safe on public GitHub repos | ❌ Public to everyone | ❌ Leaks private prompts in PRs | ✅ Private account | ✅ Encrypted via GitHub SSH keys ( |
Keeps | ⚠️ Manual commits | ❌ Pollutes every PR | ✅ Yes | ✅ Hidden Git ref ( |
Requires API key or paid server | ❌ No | ❌ No | ❌ Yes | ✅ 0 API keys, 100% free & serverless |
Architecture
flowchart LR
subgraph DeviceA["Desktop (git push)"]
A1["Local Transcripts\n(Antigravity / Claude / Cursor / Codex)"] -->|"Deterministic Strip\n(85-95% noise removed, 0 API keys)"| A2["Compact Session + Recap"]
A2 -->|"Gzip + X25519 ECDH\nAES-256-GCM"| A3["Hidden Git Ref\nrefs/ai/lore"]
end
A3 <-->|"GitHub Remote\n(Safe on Public Repos)"| B1["Hidden Git Ref\nrefs/ai/lore"]
subgraph DeviceB["Laptop / Teammate (git pull)"]
B1 -->|"Decrypt via\n~/.ssh/id_ed25519"| B2["Local Cache\n.git/lore/"]
B2 -->|"~350 tokens\n(git-excluded)"| B3[".agents/rules/lore-context.md"]
B2 -->|"0 tokens until queried\n(SQLite FTS5 BM25)"| B4["MCP Server\nlore_search / lore_get_session"]
endPrivate Context on Public Repos (git lore allow)
Because Git allows anyone who clones a public repo to inspect its refs, lore encrypts every session and takeaway using multi-recipient envelope encryption (ssh-ed25519-x25519-aes256gcm):
Each payload is compressed with
gzipand encrypted with a random 256-bit Content Encryption Key (CEK) viaAES-256-GCM.Each authorized contributor's
ssh-ed25519public key is converted to MontgomeryX25519to wrap the CEK via ECDH +HKDF-SHA256.To approve a teammate on a public or private repo, run:
git lore allow torvaldsloreautomatically fetches their publicssh-ed25519key(s) fromhttps://github.com/torvalds.keysand re-encryptsrefs/ai/lore.To revoke a contributor and rotate encryption keys:
git lore revoke torvalds
CLI Reference
You can run commands as either lore <cmd> or native Git subcommand git lore <cmd>:
Command | Description |
| One-time global install for Antigravity ( |
| Initialize |
| View synced sessions, compression ratio, takeaways, and authorized SSH keys |
| Collect local transcripts, encrypt, union-merge with remote |
| Fetch & decrypt |
| Authorize a GitHub user (fetches |
| Remove a recipient and rotate encryption keys on |
| Save an architectural decision, gotcha, convention, or WIP note ( |
| Instant SQLite FTS5 BM25 search across all past sessions and takeaways |
| Read the stripped User/Assistant conversation turns of a session in your terminal |
MCP Tools Exposed to Your Agent
Once lore setup is run, your AI agents automatically have access to:
lore_status— View the repo's Living Digest, recent cross-device sessions, and authorized contributors.lore_search— Full-text BM25 search across all past transcripts and takeaways in the repo (0 token cost until searched).lore_get_session— Retrieve the verbatim User/Assistant dialogue of any past session by ID or prefix.lore_save_takeaway— Record an architectural decision, gotcha, or WIP handoff note into the Living Digest.lore_sync— Pull and push encrypted context viarefs/ai/lore.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
One searchable history across every AI coding tool, with secret scanning and a shared task board.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Intelligent context infrastructure for AI teams: knowledge graph, sessions, tasks, documents.
Git-backed platform for skills, tools, and context for AI agents
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThe shared AI context engine for git — save, search, and share the reasoning behind code changes. Captures the why behind every commit and slide on PRs for coding agents.13 npmMIT
- AlicenseAqualityCmaintenanceProvides persistent memory and a codebase knowledge graph for AI coding assistants, enabling shared context across multiple tools like Claude, Cursor, and ChatGPT, with significant token reduction.519 npmMIT
- AlicenseAqualityAmaintenanceEnables AI coding assistants to recall past lessons, bugs, and conventions from local git history with sub-5ms latency and full privacy.711 npm1MIT
- AlicenseBqualityAmaintenanceEnables AI coding agents to build and query local repository memory, returning ranked files, context packs, relationship maps, semantic recall, and feedback-tuned search without uploading code.9735 PyPI1MIT