Logo vun ContextKeep

ContextKeep

Communautéit
mordang7

Infinite Long-Term Memory for AI Agents (MCP Server)

Editeurmordang7
RepositoryContextKeep
SproochPython
Forks
38
Stären
158
Disponibel Tools
0
Transporttypstdio, streamable-http
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    ContextKeep stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    158 Stären an 38 Forks aus dem verlinkte Repository.

ContextKeep Banner

ContextKeep

Long-Term Memory for AI Agents

Version: 2.1 Status: Stable Platform: Linux | Windows | macOS License: MIT Python 3.10+ MCP Ready Docker Ready

ContextKeep gives AI agents a persistent, searchable memory they can use across sessions. V2.1 adds SQLite, full-text search, user-editable categories, safer Docker defaults, and verified backup-first upgrades.

What's New | Safe Upgrade | Install | MCP Tools | Configuration | Docs


Features

  • Persistent local memory for MCP-compatible agents.
  • SQLite storage with FTS5 full-text search.
  • User-editable categories instead of fixed tags.
  • Multiple categories per memory.
  • WebUI for browsing, editing, searching, exporting, and category management.
  • Streamable HTTP MCP endpoint at /mcp, with SSE fallback for older clients.
  • Docker Compose support with one default service for WebUI and MCP.
  • Verified backup and restore helpers for bare-metal and Docker upgrades.
  • Server identity checks through get_contextkeep_info.

ContextKeep Showcase

What's New In V2.1 Atlas

V2.1 is the first category-first ContextKeep release.

  • list_all_memories has been removed.
  • Agents now use list_categories and list_memories before retrieve_memory.
  • tags are replaced by user-editable categories.
  • Memories can belong to more than one category.
  • V1 tags are preserved as legacy_tags migration metadata.
  • Docker now runs WebUI and MCP together by default so both use the same SQLite database.
  • get_contextkeep_info reports version, storage path, database ID, tool list, and migration status.
  • Upgrade scripts create verified backups before continuing.

Older releases remain available through GitHub releases and tags. V2.1 is the recommended version for new installs and upgrades.

Safe Upgrade First

Before replacing an existing install, use the safe upgrade wrapper. It creates a backup, verifies the archive, checks SQLite/JSON integrity, and stops if anything looks wrong.

Bare-metal:

bash
python scripts/upgrade_to_v2_1.py baremetal

Docker:

bash
python scripts/upgrade_to_v2_1.py docker

V1 JSON migration:

bash
python scripts/upgrade_to_v2_1.py baremetal --v1-source /path/to/old/data/memories

See docs/SAFE_UPGRADE.md for backup, restore, Docker volume, and rollback details.

Install

Fresh Bare-Metal Install

bash
git clone https://github.com/mordang7/ContextKeep.git
cd ContextKeep
python -m venv .venv

Linux/macOS:

bash
source .venv/bin/activate
pip install -r requirements.txt

Windows PowerShell:

powershell
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

You can also run the installer:

bash
python install.py

Fresh Docker Install

bash
git clone https://github.com/mordang7/ContextKeep.git
cd ContextKeep
docker compose up -d --build

Default ports:

ServiceURL
WebUIhttp://localhost:5000
MCP HTTPhttp://localhost:5100/mcp

Run

Local MCP over stdio:

bash
python server.py

Remote MCP over HTTP:

bash
python server.py --transport http --host 0.0.0.0 --port 5100

WebUI:

bash
python webui.py --host 0.0.0.0 --port 5000

Then open:

text
http://localhost:5000

MCP Tools

ContextKeep V2.1 exposes 16 tools:

ToolPurpose
get_contextkeep_infoConfirm version, storage path, database ID, schema, tools, and migration status
list_categoriesList live user-editable categories
create_categoryCreate a category when no existing category fits
update_categoryRename or edit category metadata
delete_categoryDelete an empty category or reassign memories
merge_categoriesMerge one category into another
list_memoriesList memory keys/titles, optionally filtered by category
retrieve_memoryRetrieve a memory by exact key
search_memoriesFull-text search memory content
list_recent_memoriesList recently updated memories
store_memoryStore or update a memory with categories
update_categoriesReassign one memory to one or more categories
get_edit_historyView edit history for a memory
delete_memoryDelete a memory permanently
get_memory_statsShow memory/category counts and storage path
export_memoriesExport all memories as JSON

Recommended retrieval flow:

text
list_categories -> list_memories -> retrieve_memory

Use search_memories for topic discovery, then retrieve the exact matching memory before relying on it.

MCP Client Configuration

Most clients that support streamable HTTP:

json
{
  "mcpServers": {
    "context-keep": {
      "url": "http://localhost:5100/mcp"
    }
  }
}

Antigravity IDE uses serverURL:

json
{
  "mcpServers": {
    "context-keep": {
      "serverURL": "http://localhost:5100/mcp"
    }
  }
}

SSE fallback:

json
{
  "mcpServers": {
    "context-keep": {
      "url": "http://localhost:5100/sse"
    }
  }
}

For a remote machine, replace localhost with the hostname or address of the machine running ContextKeep.

Do not keep an old SSH/stdin config active for the same context-keep server name. It may launch an older server that writes to a different database than the WebUI.

Verify The Right Server

After connecting a client, call get_contextkeep_info.

Expected V2.1 values:

  • version: 2.1.0
  • schema_version: 2
  • storage_backend: sqlite
  • storage_path: /app/data/contextkeep.db in Docker, or your configured local path
  • V2.1 tool list including list_memories, list_categories, update_categories, and get_edit_history

If an agent stores a memory but the WebUI cannot see it, compare WebUI /api/info with MCP get_contextkeep_info. The database_id, storage_path, and memory count should match.

Backup And Restore

Create a verified bare-metal backup:

bash
python scripts/backup_contextkeep.py baremetal --install-dir /path/to/contextkeep

Create a verified Docker backup:

bash
python scripts/backup_contextkeep.py docker --volume <docker-volume-name>

Restore commands are written into every backup folder. The full guide is in docs/SAFE_UPGRADE.md.

If you use container auto-update software, keep an external backup routine. The safe upgrade scripts can verify backups before an upgrade, but unattended image replacement cannot ask you to confirm backup health.

Docs

Changelog

V2.1 Atlas

  • SQLite database with FTS5 search.
  • User-editable categories with multi-category memory assignment.
  • WebUI category management.
  • V1 JSON migration with legacy tag preservation.
  • One-container Docker default for shared WebUI/MCP database access.
  • get_contextkeep_info identity checks.
  • Verified backup and restore tooling.
  • Updated MCP client examples for HTTP, Antigravity, and SSE fallback.

V1.3 Harbor

  • Docker support.
  • Modern Python packaging.
  • New tools: delete_memory, get_memory_stats, export_memories.
  • WebUI export.
  • Packaging and code quality fixes.

V1.2 Obsidian Lab

  • Memory directory tool.
  • Obsidian Lab UI redesign.
  • Calendar and memory count improvements.

V1.1

  • Web dashboard.
  • SSE transport support.
  • Linux systemd service installer.
  • Memory titles and timestamps.

V1.0

  • Core MCP server with persistent JSON-backed memory.
  • Local stdio and remote access patterns.

Contributing

Issues, feature ideas, and pull requests are welcome. If you build a client guide, migration recipe, or workflow pattern around ContextKeep, please share it.

V1.3 Community Contributors

Thank you to everyone who contributed to the Harbor release:

  • @shuft opened the Docker support request.
  • @Cyberdogs7 contributed the initial Docker and Docker Compose implementation.
  • @frehov contributed Dockerfile, pyproject.toml, uv support, and packaging fixes.
  • @thinkstylestudio supported the project through community advocacy.

Support

If ContextKeep saves you time, tokens, or context-window pain, support is appreciated.

Ko-Fi


Installatioun

TypingMind
{
  "mcpServers": {
    "contextkeep": {
      "command": "/absolute/path/to/ContextKeep/venv/bin/python",
      "args": [
        "/absolute/path/to/ContextKeep/server.py"
      ]
    }
  }
}

ContextKeep MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal ContextKeep verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dir kënnt MCP lokal op Ärem Apparat ausféieren oder Iech mat enger Remote-MCP-Server-URL verbannen.

Optioun 1: De lokale Connector benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

ContextKeep als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu ContextKeep an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "contextkeep": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu ContextKeep. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu ContextKeep.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat ContextKeep?
ContextKeep
Jo. Ech hunn et gelies.
Dat hunn ech mat ContextKeep fonnt.

Optioun 2: Eng MCP-Server-URL derbäisetzen

Benotzt dës Optioun, wann ContextKeep scho remote gehost gëtt oder Är Ekipp ee gemeinsame Connector wëllt, op dee méi Benotzer kënnen zougräifen.

1

MCP-Connectoren opmaachen

Gitt an TypingMind op „Plugins“, maacht „MCP-Connectoren“ op a wielt dann „URL derbäisetzen“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Gitt op „Plugins“.
  3. Maacht „MCP-Connectoren“ op.
  4. Klickt op „URL derbäisetzen“.
TypingMind-Formulaire fir eng benotzerdefinéiert MCP-Server-URL derbäizesetzen
2

D'Server-URL apeschen

Gitt d'MCP-Server-URL vum Ubidder am Feld „Server-URL“ an. Setzt e Verbindungsnumm, eng Beschreiwung, e Symbol, benotzerdefinéiert HTTP-Headeren oder OAuth-Clientastellungen derbäi, wann de Server se erfuerdert.

  1. Pescht d'MCP-Server-URL vum Ubidder an d'Feld „Server-URL“.
  2. Gitt en Numm fir d'Verbindung mat ContextKeep an.
  3. Setzt eng Beschreiwung an e Symbol derbäi, fir d'Verbindung méi einfach erëmzeerkennen.
  4. Setzt benotzerdefinéiert HTTP-Headeren oder OAuth-Clientdetailer derbäi, wann de Server eng Authentifizéierung erfuerdert.
3

D'Verbindung erstellen

Klickt op „Verbindung erstellen“, gitt dann zeréck op d'Plugin-Lëscht a kontrolléiert, ob déi nei MCP-Verbindung aktiv ass.

  1. Klickt op „Verbindung erstellen“.
  2. Gitt zeréck op d'Lëscht vun de MCP-Connectoren.
  3. Kontrolléiert, ob d'Verbindung mat ContextKeep als aktiv ugewise gëtt.
  4. Aktualiséiert d'Plugin-Lëscht, wann d'Verbindung net direkt ugewise gëtt.
4

Modeller wiesselen ouni nei ze verbannen

Start e Chat mat Ärem bevorzugte Modell, aktivéiert d'Tools vu ContextKeep ënner „Plugins“ a wiesselt bei Bedarf op en anere Modell. D'MCP-Verbindung bleift am TypingMind-Aarbechtsberäich disponibel.

  1. Start en neie Chat an TypingMind.
  2. Wielt de KI-Modell, deen Dir benotze wëllt.
  3. Aktivéiert d'Tools vu ContextKeep ënner „Plugins“.
  4. Biet de Modell, den Tool ze benotzen, wann néideg.
  5. Wiesselt op en anere KI-Modell a benotzt déiselwecht MCP-Verbindung weider.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat ContextKeep?
ContextKeep
Jo. Ech hunn et gelies.
Dat hunn ech mat ContextKeep fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server ContextKeep benotzt?

ContextKeep ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech ContextKeep MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir ContextKeep mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat ContextKeep MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann ContextKeep verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech ContextKeep MCP mat TypingMind?

Dir kënnt ContextKeep iwwer de lokale MCP-Connector oder iwwer d'URL vun engem Remote-MCP-Server mat TypingMind verbannen. Benotzt de lokale Connector, wann de Server Zougrëff op Fichieren, Apps oder privat Ressourcen op Ärem Apparat brauch, an eng Server-URL, wann de MCP-Server op Distanz gehost gëtt.

Wéi eng Tools stellt ContextKeep MCP an TypingMind zur Verfügung?

ContextKeep stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir ContextKeep MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann ContextKeep eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇