Skip to content
context-memory
Get started Log in
Get started

Set up context-memory in Claude Code.

context-memory installs as a Claude Code plugin: it bundles the MCP server and the hooks that capture and recall your project’s memory automatically.

Quickstart

An API key and a handful of commands and you’re running. Each step is explained in full in the walkthrough below.

  1. Set your API key In your shell config
    export CONTEXT_MEMORY_API_KEY="cm_your_key_here"
  2. Install the plugin In Claude Code
    /plugin marketplace add SlovaApplications/claude-plugins
    /plugin install context-memory@slova
    /reload-plugins

    Run them one at a time. When prompted, choose Install for you (user scope); /reload-plugins then activates the MCP server and hooks with no restart.

  3. /context-memory:bootstrap-memory all
Before you start

Requirements

  • The latest Claude Code, on macOS, Linux, or Windows.
  • Node.js 18 or newer on your PATH. The plugin’s hooks run on Node.
  • A context-memory API key, which starts with cm_. Here’s how to get one:
Step-by-step

1Authenticate

The plugin’s MCP server reads your key from the CONTEXT_MEMORY_API_KEY environment variable. Add the export to your shell config (~/.zshrc, ~/.bashrc, or whichever shell you use) so it persists across sessions:

In your shell config
export CONTEXT_MEMORY_API_KEY="cm_your_key_here"

Then reload your shell (source ~/.zshrc) or open a new terminal before launching Claude Code. The key is read at MCP-server start, so if it’s unset, the server fails to load and the hooks stay silent.

2Install the plugin

Run these inside Claude Code, one at a time. First add the Slova marketplace:

In Claude Code
/plugin marketplace add SlovaApplications/claude-plugins

Then install the plugin:

In Claude Code
/plugin install context-memory@slova

When the install prompt asks who to install for, choose Install for you (user scope).

Finally, activate it in your current session. /reload-plugins loads the plugin’s MCP server and hooks with no restart — and the MCP server comes on automatically, so there’s no separate step to switch it on:

In Claude Code
/reload-plugins

3Seed your memory optional

A fresh install starts empty. Run the bootstrap command once to seed it from your history. It reads your past Claude Code transcripts and turns what’s worth keeping into Contexts and Topics (the individual memories it saves, and the syntheses that group related ones). You approve the full set before it writes anything:

In Claude Code
/context-memory:bootstrap-memory all

all sweeps every project you’ve worked on. Omit it to scope the seed to your current repo.

Your transcripts never leave your machine. They’re read locally, and only the knowledge you approve is saved. Running it again is safe: it skips any session it has already processed.

How it works

The memory loop

Once it’s installed, there’s nothing to invoke. context-memory runs a few hooks around your Claude Code sessions, all in the background, inside the agent’s context:

  • At session start, in a git repo, it hands Claude this repo’s prior “where you left off” summary and the project facts you’ve built up.
  • On every prompt, it searches your store and prepends the handful of memories most relevant to what you just asked.
  • At the end of a turn, it nudges Claude to save what it learned: the decisions, dead ends, and gotchas worth keeping.

Claude can also reach your memory directly through the plugin’s MCP tools (save_context, search_contexts, get_context, and the rest), so you can just ask it to remember or look something up.

Manage & reference

Update the plugin

Updates are done from the /plugin menu inside Claude Code:

  1. Run /plugin
  2. Press to the Installed tab
  3. Use to select context-memory Plugin · slova
  4. Press Enter
  5. Move down to Update now
  6. Press Enter

The new version loads automatically on your next session. To apply it in the current session without restarting, run /reload-plugins.

Rotate or replace your key

Keys are managed on your account page — log in with the email and password from your invite. Rotation is zero-downtime if you do it in this order:

  1. Create a new key. It’s shown once — copy it then.
  2. Swap it into CONTEXT_MEMORY_API_KEY in your shell config and reload your shell.
  3. Start a Claude Code session. Back on the account page, the new key’s row flips from waiting for first use… to seen — that’s your confirmation the swap worked.
  4. Revoke the old key.

Lost your key? Same page: log in and create a new one — old keys can’t be re-shown. Forgot your password? Reset it by email; a password reset never touches your keys, so a running agent keeps working.

Remove or disable the plugin

Uninstall it completely:

In Claude Code
/plugin uninstall context-memory@slova

Prefer to keep it installed but paused? Open /pluginInstalled, select context-memory, and choose Disable. You can re-enable it later without reinstalling.

Your saved memory is untouched either way. It lives in your hosted workspace, not in the plugin.

Configuration

Everything is environment variables, read at server start and on every hook. Only the key is required.

VariableDefaultPurpose
CONTEXT_MEMORY_API_KEYrequiredYour cm_ bearer token.
CONTEXT_MEMORY_PREFETCH_TIMEOUT1.5Seconds to wait for the per-prompt search before giving up.
CONTEXT_MEMORY_PREFETCH_LIMIT5Max contexts injected per prompt.
CONTEXT_MEMORY_PREFETCH_MAX_BYTES2000Hard cap on injected text size per prompt.
CONTEXT_MEMORY_RECALL_TIMEOUT2Seconds the session-start recall waits per call.
CONTEXT_MEMORY_ORIENTATION_LIMIT25Max project facts injected at session start.
CONTEXT_MEMORY_RECALL_MAX_BYTES4000Hard cap on the surfaced recall text.
CONTEXT_MEMORY_TOPIC_STOP_TIMEOUT2Seconds the topic-synthesis check waits before giving up.

Troubleshooting

  • Hook errors every turn (node: not found). The plugin’s hooks run on Node, and it isn’t on the PATH Claude Code launched from. Install Node.js 18+ (see Requirements) and confirm node --version works in the same shell you start Claude Code from, then restart.
  • No MCP tools / no recall. Run /mcp to confirm context-memory is listed and connected. If it’s connected but still silent, the key isn’t in the environment Claude Code launched from. Re-check echo $CONTEXT_MEMORY_API_KEY, reload your shell, and restart Claude Code. If it isn’t listed at all, reinstall with user scope (Step 2).
  • Nothing happens, no errors. By design. Every hook fails open: a missing key, an unreachable backend, or a timeout makes it inject nothing rather than break your prompt. So silence usually means the key isn’t set or the backend wasn’t reachable.
  • Still stuck? Email [email protected].