Skip to main content
MCP server CX Codex

nexusmem — Claude Code MCP server: what it does, how to install

Local-first memory engine for coding assistants that tracks shell history, exit codes, and git diffs. Keeps agents from repeating broken steps and dead ends.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add nexusmem -- npx -y nexusmem
Open on GitHub

What nexusmem does

NexusMem records developer activity into a local SQLite file on disk. The tool logs shell executions alongside their true exit codes, per-file git patches, and markdown docs. When an agent queries its background, the ranker returns relevant items fitted to a specified token budget without sending project data to cloud services.

Custom hooks expand this tracking to the interactive shell and the agent environment. The shell hook captures the working directory with status codes, while the Claude Code hook associates test executions with prior file edits. Commands are automatically scrubbed of credentials before being stored.

Running on Node 20 will fail immediately due to missing better-sqlite3 binaries. You need git and Node version 22 or newer on your machine. An Ollama instance is entirely optional and only comes into play for vector search.

What it helps with

  • record terminal command execution with real exit codes
  • surface past solutions for broken builds and tests
  • retrieve relevant git patches within strict token limits
  • prevent coding assistants from repeating failed shell commands

Example prompts for the agent

  • Search NexusMem history to see why our build failed earlier and how it was resolved
  • Find previous commands in nexusmem related to process spawn failures on Windows

How to install nexusmem

Platform CLI

claude mcp add nexusmem -- npx -y nexusmem

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about nexusmem

How do I install nexusmem in Claude Code?

Run claude mcp add nexusmem -- npx -y nexusmem to register the MCP server with Claude Code.

Why use nexusmem instead of plain git log?

Git records only final commits, losing failed intermediate shell attempts. NexusMem keeps command logs, non-zero exit codes, and prior edit context so the agent knows what failed before.

What dependencies are required for nexusmem?

You need git and Node version 22 or higher. Node 20 is not supported, while Ollama is completely optional if you want semantic retrieval.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor