Get the FREE Ultimate OpenClaw Setup Guide →

mcp-memory-keeper

MCP server for persistent context management in AI coding assistants

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mkreyman-mcp-memory-keeper npx -y mcp-memory-keeper \
  --env DATA_DIR="Directory for database storage (default: ~/mcp-data/memory-keeper/)" \
  --env MCP_MAX_ITEMS="Maximum items per response (default: 100)" \
  --env MCP_MIN_ITEMS="Minimum items to return (default: 1)" \
  --env MCP_MAX_TOKENS="Maximum tokens for responses (default: 25000)" \
  --env MCP_CHARS_PER_TOKEN="Chars per token ratio (default: 3.5)" \
  --env MCP_TOKEN_SAFETY_BUFFER="Safety buffer percentage (default: 0.8)" \
  --env MEMORY_KEEPER_AUTO_UPDATE="Set to 1 to enable auto-updates" \
  --env MEMORY_KEEPER_INSTALL_DIR="Installation directory (default: ~/.local/mcp-servers/memory-keeper/)"

How to use

MCP Memory Keeper provides a persistent context store for Claude Code sessions. It saves and restores context across conversations, allowing multiple Claude sessions to share memory and recall decisions, progress, and results even after a context limit is reached. The server supports features such as channel-based organization, checkpoint snapshots, full-text search, change tracking, and export/import of context, making it ideal for long-running coding projects and collaborative workflows. To use it, install the MCP Memory Keeper server and add it to Claude using the memory-keeper entry, which binds Claude’s memory operations to the persistent SQLite-backed store managed by this MCP server. Once added, Claude can Save, Restore, and query context through natural prompts while the server handles storage, versioning, and retrieval logic. Tools include channel-based organization (auto-derives from git branch), checkpoint creation for complete context snapshots, and batch operations for saving or deleting multiple items atomically. In practice, you’ll initialize a session with a channel (e.g., a project name), have Claude save progress and decisions with appropriate categories, and issue checkpoint or restore commands when you approach or exceed context limits.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to Claude with MCP integration
  • Optional: Git for source-based installation

Installation (NPX method - recommended):

  1. Ensure you have Node.js installed. You can verify with: node -v npm -v

  2. Run the MCP Memory Keeper via NPX (no global install required):

npx -y mcp-memory-keeper
  1. Add the MCP server to Claude (example):
claude mcp add memory-keeper npx mcp-memory-keeper

Alternative installation (global, for local development or scripting):

  1. Install globally and then add to Claude:
npm install -g mcp-memory-keeper
claude mcp add memory-keeper mcp-memory-keeper
  1. If developing from source:
# 1. Clone the repository
git clone https://github.com/mkreyman/mcp-memory-keeper.git
cd mcp-memory-keeper

# 2. Install dependencies
npm install

# Optional: build if needed
npm run build

# 3. Run locally or reference the built path in Claude

Note:

  • The server stores data by default under ~/mcp-data/memory-keeper/ unless overridden by the DATA_DIR environment variable.
  • You can enable auto-updates with MEMORY_KEEPER_AUTO_UPDATE=1 if you want the server to update itself automatically.

Additional notes

Environment variables to customize behavior:

  • DATA_DIR: path to store database files (default: ~/mcp-data/memory-keeper/)
  • MEMORY_KEEPER_INSTALL_DIR: installation directory for the server (default: ~/.local/mcp-servers/memory-keeper/)
  • MEMORY_KEEPER_AUTO_UPDATE: enable auto-updates (1 to enable)
  • MCP_MAX_TOKENS, MCP_TOKEN_SAFETY_BUFFER, MCP_MIN_ITEMS, MCP_MAX_ITEMS, MCP_CHARS_PER_TOKEN: fine-tune token usage and result sets for Claude integration Common issues:
  • If Claude cannot access the MCP Memory Keeper, verify that the server is reachable from your Claude instance and that environment variables are correctly set.
  • Ensure the DATA_DIR has proper permissions for read/write operations.
  • When using checkpoints, make sure there is enough storage space for snapshots.
  • For large projects, consider adjusting MCP_MAX_ITEMS and MCP_MAX_TOKENS to balance performance and completeness.

Related MCP Servers

Sponsor this space

Reach thousands of developers