Documentation

Install on hardened npm

Since context-mcp 0.19.0 / memory-mcp 0.15.0 a hardened npm (ignore-scripts=true) needs no special flags — the native module ships prebuilt. Keep your hardening on.

Nothing special is needed. If npm config get ignore-scripts prints true (corporate hardening), or you are on npm v12+ where install scripts are opt-in, the normal install works as-is — and your hardening stays on:

npm install -g @prom.codes/context-mcp @prom.codes/memory-mcp @prom.codes/saver

npx -y @prom.codes/context-mcp@latest and claude mcp add are fine too. This is the supported path, not a workaround: see the Quickstart or the Claude Code page for the full setup.

Why it needs no scripts

context and memory store their index in SQLite, which needs a native addon. Until 0.19.0 / 0.15.0 that addon was fetched or compiled by better-sqlite3's install script — so blocking scripts left no .node file and the servers could not boot.

Since context-mcp@0.19.0 and memory-mcp@0.15.0 the addon ships prebuilt, one package per platform (@prom.codes/native-…), declared as optionalDependencies and picked by npm from your os, cpu and libc. Installing it is a file copy — no compiler, no download, no lifecycle script. It is the same pattern esbuild and @swc/core use.

Because nothing runs, ignore-scripts has nothing to block. (saver is pure JavaScript and never had a native dependency at all.)

If you are pinned to an older version

context-mcp below 0.19.0 or memory-mcp below 0.15.0 still build better-sqlite3 from an install script, so on a hardened npm they still need the old flags. Upgrading is the real fix — but if you are pinned, allow the build for that one command:

# npm ≥ 11.16 / v12 — install scripts are opt-in, allow-list the package
npm install -g @prom.codes/context-mcp@0.18.0 @prom.codes/memory-mcp@0.14.0 \
  --allow-scripts=better-sqlite3,tree-sitter

# npm ≤ 11 — scripts run unless ignore-scripts=true; override for this command
npm install -g @prom.codes/context-mcp@0.18.0 @prom.codes/memory-mcp@0.14.0 \
  --ignore-scripts=false --foreground-scripts

On npm v12 a config ignore-scripts=true outranks --ignore-scripts=false and the build stays blocked; clear it first with npm config delete ignore-scripts (that touches only your user config, not a machine-level policy). To avoid sudo on a root-owned global prefix, add --prefix ~/.prom-codes-mcp and point your client at node ~/.prom-codes-mcp/node_modules/@prom.codes/context-mcp/dist/bin.js.

A prefix install is not reached by auto-update and the update_servers tool will not drive it — re-run its install line to update it, with every editor window closed (a running server locks its .node file, and a live reinstall can abort with EBUSY).