ContextKeep Long-term Memory
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.
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
Maintainer
Works with
Installation
Manual Installation
npx contextkeepConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 ContextKeepInstall 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.pyStart 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.pyConfigure 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.
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.
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:5000ContextKeep 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.
ContextKeep Long-term Memory Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to ContextKeep Long-term Memory? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
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.
Set Up ContextKeep Long-term Memory in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.