ContextKeep Long-term Memory

v1.0.0Knowledge & Memorystable

Provides infinite long-term memory for AI agents with persistent, searchable storage of project details, preferences, and snippets. Reduces token costs by retrieving only relevant memories while keeping all data stored locally.

agentaicontextmcpmemory
Share:
157
Stars
0
Downloads
0
Weekly
0/5

What is ContextKeep Long-term Memory?

ContextKeep Long-term Memory is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides infinite long-term memory for ai agents with persistent, searchable storage of project details, preferences, and snippets. reduces token costs by retrieving only relevant memories while keepi...

Provides infinite long-term memory for AI agents with persistent, searchable storage of project details, preferences, and snippets. Reduces token costs by retrieving only relevant memories while keeping all data stored locally.

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Provides infinite long-term memory for AI agents with persis

Use Cases

Infinite memory for AI agents
Token cost reduction
Local-first persistent storage
mordang7

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx contextkeep

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use ContextKeep Long-term Memory

ContextKeep is a local-first, persistent memory MCP server that gives AI agents infinite long-term storage for project details, user preferences, code snippets, and any structured knowledge. It stores all memories locally on your machine (nothing sent to external servers) and exposes eight retrieval tools — including keyword search and recent-memory listing — so agents can load only the relevant context they need per query, dramatically reducing token consumption compared to stuffing everything into the system prompt.

Prerequisites

  • Python 3.10+ installed (for the default local/stdio setup)
  • uv package manager installed (recommended) — or pip for the standard installer
  • An MCP-compatible client such as Claude Desktop, Claude Code, or Cursor
  • Optional: Docker and Docker Compose for homelab or Raspberry Pi deployments
1

Clone the ContextKeep repository

Download the source code. ContextKeep is not currently published to PyPI, so you must clone and run it directly.

git clone https://github.com/mordang7/ContextKeep.git
cd ContextKeep
2

Install dependencies

Use uv for fast dependency resolution, or run the interactive installer script which handles virtualenv creation and package installation automatically.

# Option A — uv (recommended)
uv sync

# Option B — interactive installer
python3 install.py
3

Start the server to verify it works

Run the server directly to confirm it starts without errors before connecting an MCP client.

uv run python server.py
4

Configure your MCP client for stdio mode

Add ContextKeep to your claude_desktop_config.json using absolute paths to the venv Python interpreter and server.py. Replace the paths with your actual clone location.

5

Restart your client and begin storing memories

After restarting Claude Desktop, ask it to store information. Use the list_all_memories tool first to get a directory, then retrieve_memory with the exact key for targeted fetches.

6

Access the web dashboard (optional)

ContextKeep ships a local web UI for browsing stored memories in Grid, List, or Calendar views. Open it after starting the server.

open http://localhost:5000

ContextKeep Long-term Memory Examples

Client configuration

Claude Desktop stdio configuration for ContextKeep. Replace /path/to/ContextKeep with the actual clone directory.

{
  "mcpServers": {
    "context-keep": {
      "command": "/path/to/ContextKeep/.venv/bin/python",
      "args": ["/path/to/ContextKeep/server.py"]
    }
  }
}

Prompts to try

Example prompts that leverage ContextKeep's persistent memory tools.

- "Store my preferred code style: 2-space indentation, single quotes, no semicolons"
- "What do you remember about the database schema for Project Alpha?"
- "Search my memories for anything related to deployment credentials"
- "List all memories you have stored and show me the most recent 10"
- "Export all my memories as a JSON backup"

Troubleshooting ContextKeep Long-term Memory

Server fails to start with ModuleNotFoundError

Run 'uv sync' inside the ContextKeep directory to install all dependencies. Ensure the Python path in your MCP config points to the virtualenv interpreter at .venv/bin/python, not the system Python.

retrieve_memory returns 'key not found'

Always call list_all_memories() first to get the exact stored keys. Key lookup is exact-match, so minor spelling differences will cause misses. Use search_memories for fuzzy keyword search.

Web dashboard at localhost:5000 is not accessible

The dashboard requires the server to be running in HTTP/SSE mode (not stdio). Start with 'uv run python server.py' directly in a terminal, then open http://localhost:5000 in your browser.

Frequently Asked Questions about ContextKeep Long-term Memory

What is ContextKeep Long-term Memory?

ContextKeep Long-term Memory is a Model Context Protocol (MCP) server that provides infinite long-term memory for ai agents with persistent, searchable storage of project details, preferences, and snippets. reduces token costs by retrieving only relevant memories while keeping all data stored locally. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install ContextKeep Long-term Memory?

Follow the installation instructions on the ContextKeep Long-term Memory GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with ContextKeep Long-term Memory?

ContextKeep Long-term Memory works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is ContextKeep Long-term Memory free to use?

Yes, ContextKeep Long-term Memory is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "contextkeep": { "command": "npx", "args": ["-y", "contextkeep"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use ContextKeep Long-term Memory?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides