Claude Code
Boot context, per-prompt recall, memory tools, and Skills in Claude Code through the Lore plugin.
The Claude Code integration gives Claude Code startup memory at the start of each session, recall before each prompt, and the Lore memory tools. It installs as the lore@lore plugin, which connects Claude Code to Lore through hooks and MCP.
Install
Run this on the machine where you use Claude Code:
npx @loremem/cli install --channels claudecodeOn Loremem Cloud, pass the server and your project token:
npx @loremem/cli install --base-url https://api.loremem.com --api-token lm_your_token --channels claudecodeThe installer skips Claude Code when the claude command is not on your PATH. Restart Claude Code after the install finishes.
What gets installed
- The plugin files from
lore-claudecode.zip, in~/.lore/claudecode/. The installer registers that folder as a plugin marketplace and installslore@lore. - Two hooks.
SessionStartloads startup memory, andUserPromptSubmitadds recall to each prompt. Each hook has a 10-second timeout. The hooks run withnpx tsx. - One MCP server.
loreconnects to<server>/api/mcp?client_type=claudecodeand sends the token fromLORE_API_TOKEN. Skills no longer have an MCP server of their own: session start syncs them into the plugin'sskills/directory. - Connection values in the
envblock of~/.claude/settings.json:LORE_BASE_URL,LORE_HOME,LORE_CLIENT_TYPE(set toclaudecode), andLORE_API_TOKENwhen you set a token. The legacyLORE_SKILLS_ENABLEDswitch is scrubbed here. - Cleanup of earlier installs: the user-scope
loreandlore-skillsMCP entries are removed, and the legacy~/.claude/lore-guidance.mdfile and its import line in~/.claude/CLAUDE.mdare removed.
Claude Code lists Lore's tools with the mcp__plugin_lore_lore__ prefix, for example mcp__plugin_lore_lore__lore_search.
Verify
- Run
npx @loremem/cli status. Theclaudecodeline should readinstalled. - Run
claude plugin list. The output should includelore@lore. - Start a new Claude Code session and ask Claude to summarize the rules it loaded at startup. The answer should come from your boot memory.
- Ask Claude Code to call
lore_status. It should return the server's health. - Send a prompt about a project that has memories. The context should include a
<recall>block.
Notes
-
Auto-memory. Claude Code has its own auto-memory. To make Lore the only memory, turn auto-memory off in
~/.claude/settings.json:{ "autoMemoryEnabled": false }You can also set
CLAUDE_CODE_DISABLE_AUTO_MEMORYto1in the same file'senvblock. -
CLAUDE.md. Lore does not write toCLAUDE.md. To move durable rules out of that file, see Move CLAUDE.md and AGENTS.md into Lore. -
npxonPATH. The hooks runnpx tsx, sonpxmust be on thePATHthat Claude Code uses. -
Restart after changes. Hooks and MCP settings load at process start. Restart Claude Code after you change
~/.claude/settings.jsonor the token.
Manual setup (fallback)
Use these steps only when the installer can't run on your machine. They set up the same plugin and settings without the installer's checks.
-
Download and unzip the plugin:
mkdir -p ~/.lore/claudecode curl -fsSL -o lore-claudecode.zip https://github.com/FFatTiger/lore/releases/latest/download/lore-claudecode.zip unzip -qo lore-claudecode.zip -d ~/.lore/claudecode rm lore-claudecode.zip -
Register the marketplace and install the plugin:
claude plugin marketplace add ~/.lore/claudecode claude plugin install lore@lore -
Add the server to the
envblock of~/.claude/settings.json. Leave outLORE_API_TOKENif your server has noAPI_TOKEN:{ "env": { "LORE_BASE_URL": "https://api.loremem.com", "LORE_API_TOKEN": "lm_your_token" } } -
Write the same values to
~/.lore/config.json. The hooks read this file first:{ "base_url": "https://api.loremem.com", "api_token": "lm_your_token" } -
Restart Claude Code.
Manual setup leaves Skills off. To turn them on, set LORE_SKILLS_ENABLED to 1 in the same env block, and only on a server that has Skills.
Uninstall
npx @loremem/cli uninstall --channels claudecode -yThis removes the lore@lore plugin and the lore MCP entry when the claude command is available. It also removes the Lore entries from the env block of ~/.claude/settings.json and deletes ~/.lore/claudecode. Restart Claude Code afterwards.
If Claude Code doesn't load Lore, see Agent connection issues.