ContextKeep
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ContextKeepsearch for my API key storage preferences"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.

ContextKeep π§
Infinite Long-Term Memory for AI Agents
ContextKeep is a powerful, standalone memory server that gives your AI agents (Claude, Cursor, Gemini, OpenCode, and more) a persistent, searchable brain. Stop repeating yourself β let your AI remember everything, permanently.
Features β’ What's New in V1.3 β’ Installation β’ MCP Tools β’ Web Dashboard β’ Configuration
π Features
βΎοΈ Infinite Context: Store unlimited project details, preferences, decisions, and snippets β no expiry, no size cap.
π° Save Money & Tokens: Pull only the memories that matter, slashing context window usage and API costs.
π Universal Compatibility: Works with any MCP-compliant client via Stdio (local) or SSE (remote/homelab).
π§ Memory Index Protocol: A reliable two-step retrieval system β
list_all_memories()βretrieve_memory()β so agents always find the right key, every time.π₯οΈ Modern Web Dashboard: Manage your memories visually with Grid, List, and Calendar views in a sleek dark interface.
π Privacy First: 100% local storage. Your data never touches an external server.
π Smart Search: Keyword and semantic search across all memory content.
π§ Linux Service: Runs silently in the background as a systemd service.
π³ Docker Ready: One-command deployment with Docker Compose.
β¬οΈ Export & Backup: Export all memories as JSON via MCP tool or WebUI.

π What's New in V1.3 β Harbor
π³ Docker Support
The #1 community request. ContextKeep now ships with a Dockerfile and docker-compose.yml for one-command deployment:
docker compose up --buildThat's it. MCP server on :5100, WebUI on :5000, with persistent storage via Docker volumes.
π¦ Modern Python Packaging
pyproject.tomlβ canonical dependency spec foruv,poetry, orpipuvsupport β the installer auto-detectsuvand usesuv syncfor blazing-fast setupBackwards compatible β
pip install -r requirements.txtstill works
π οΈ 3 New MCP Tools (5 β 8 total)
New Tool | Purpose |
| Agents can now delete memories directly |
| Memory count, total chars, storage path at a glance |
| Full backup as JSON β for migration or archival |
β¬οΈ WebUI Export
Export All button in the toolbar (or press
Ctrl+E)Downloads a timestamped
contextkeep_backup_YYYY-MM-DD.json
π§Ή Code Quality
Fixed dead code in
memory_manager.py(unreachable duplicatetry/except)Added missing
core/__init__.pyfor proper Python packagingReplaced bare
except:withexcept Exception:throughout
π Installation
Option 1: Quick Start (pip)
Clone the repository:
git clone https://github.com/mordang7/ContextKeep.git cd ContextKeepRun the Installer:
Linux/macOS:
python3 install.pyWindows:
python install.py
Follow the Wizard: The installer creates a virtual environment, installs dependencies, and generates a ready-to-use
mcp_config.json.
Option 2: uv (Fast)
git clone https://github.com/mordang7/ContextKeep.git
cd ContextKeep
uv sync
uv run python server.pyOption 3: Docker (Recommended for Homelabs)
git clone https://github.com/mordang7/ContextKeep.git
cd ContextKeep
docker compose up --build -dThis starts:
Service | Port | Purpose |
|
| MCP server (SSE transport) |
|
| Web dashboard |
Memories persist in a Docker volume (contextkeep-data).
π οΈ MCP Tools
ContextKeep exposes 8 MCP tools to any connected agent:
Tool | Signature | Purpose |
| (no args) | [USE FIRST] Returns a full directory of all memory keys, titles, tags, and timestamps |
|
| Fetch the full content of a specific memory by exact key |
|
| Create or update a memory |
|
| Content-based keyword/semantic search across all memories |
| (no args) | Return the 10 most recently updated memories |
|
| Delete a memory permanently by key |
| (no args) | Get total memory count, character count, and storage path |
| (no args) | Export all memories as a JSON array |
Recommended Agent Directive
Add this to your GEMINI.md, AGENTS.md, or CLAUDE.md:
## Memory Index Protocol (MANDATORY)
1. FIRST β call `list_all_memories()` to get the complete key directory
2. THEN β call `retrieve_memory(exact_key)` using the exact key from step 1
Only use `search_memories()` for content-based searches, NOT for key lookup.π Configuration
Copy the contents of mcp_config.example.json into your AI client's config file and update the paths.
Option 1: Local (Claude Desktop / Gemini CLI / Cursor)
{
"mcpServers": {
"context-keep": {
"command": "/absolute/path/to/ContextKeep/venv/bin/python",
"args": ["/absolute/path/to/ContextKeep/server.py"]
}
}
}Option 2: Remote via SSH (Homelab / Raspberry Pi)
Run ContextKeep on a home server and access it from any machine on your network:
{
"mcpServers": {
"context-keep": {
"command": "ssh",
"args": [
"-i", "/path/to/private_key",
"user@192.168.1.X",
"'/path/to/ContextKeep/venv/bin/python'",
"'/path/to/ContextKeep/server.py'"
]
}
}
}Option 3: SSE Mode (HTTP)
Ideal for OpenCode, web apps, or any client that prefers HTTP transport:
{
"mcpServers": {
"context-keep": {
"transport": "sse",
"url": "http://localhost:5100/sse"
}
}
}Option 4: Docker
Use mcp_config.docker.example.json or point your client to the container:
{
"mcpServers": {
"context-keep": {
"transport": "sse",
"url": "http://localhost:5100/sse"
}
}
}π Web Dashboard
ContextKeep ships with a full-featured web UI to manage your memories without touching the CLI.
URL:
http://localhost:5000Grid View: Memory cards with tag chips, char counts, and inline actions
List View: Dense, scannable table with all memories sorted by last updated
Calendar View: Browse your memory history by month
Search: Real-time filtering across titles, keys, and content
Full CRUD: Create, view, edit, and delete memories from the browser
Export: Download all memories as JSON with one click (
Ctrl+E)
To start manually:
./venv/bin/python webui.pyπ§ Linux Service Setup (Recommended for Homelabs)
Run both the MCP server and Web UI as persistent background services:
chmod +x install_services.sh
./install_services.shThis installs:
Service | Port | Purpose |
|
| MCP server (SSE transport) |
|
| Web dashboard |
Manage services:
sudo systemctl status contextkeep-server
sudo systemctl restart contextkeep-webuiπ Changelog
V1.3 β Harbor
β Docker Support β Dockerfile + docker-compose.yml for one-command deployment
β Modern Packaging β
pyproject.toml+uvsupport alongside pipβ New MCP tool:
delete_memory()β agents can now delete memoriesβ New MCP tool:
get_memory_stats()β memory count & size at a glanceβ New MCP tool:
export_memories()β full backup as JSONβ WebUI: Export All button with
Ctrl+Eshortcutβ WebUI: Stats API endpoint
β Fix: Removed dead code in
memory_manager.pyβ Fix: Added missing
core/__init__.pyfor Docker/package importsβ Fix: Bare
exceptreplaced withexcept Exceptionβ Updated installer to V1.3 with
uvdetectionβ Community contributors credited π
V1.2 β Obsidian Lab
β New
list_all_memories()MCP tool β complete memory directory in one callβ Obsidian Lab UI redesign β dark premium aesthetic with cyan/neon accents
β Memory count live badge in the header
β Calendar month navigation (forward/back)
β Grid cards now show tag chips and character count badges
β Removed "Recent Memories" sidebar for a cleaner calendar layout
β Memory Index Protocol V1.2 β standardised two-step agent retrieval pattern
V1.1
Web dashboard with Grid, List, and Calendar views
SSE transport support alongside Stdio
Linux systemd service installer
Memory titles and timestamps
V1.0
Core MCP server with
store_memory,retrieve_memory,search_memoriesJSON-backed persistent storage
SSH remote transport support
π€ Contributing
Contributions are welcome. Open a PR, file an issue, or suggest a feature β all input is appreciated.
V1.3 Community Contributors
A huge thank you to everyone who contributed to the Harbor release:
@Cyberdogs7 β PR #2: Initial Docker & Docker Compose implementation
@frehov β PR #3: Dockerfile,
pyproject.toml,uvsupport,__init__.pyfix@thinkstylestudio β Community advocacy
β Support the Project
If ContextKeep saves you time, tokens, or sanity β consider buying me a coffee.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mordang7/ContextKeep'
If you have feedback or need assistance with the MCP directory API, please join our Discord server