contextkeeper

io.github.TheRealDataBossPublished by GitHub account TheRealDataBossv0.2.7Updated Oct 24, 2026

Zero model drift between AI agents. Session continuity for Claude, GPT, Gemini, and any LLM.

Overview

AI-generated overview

A local MCP server and CLI that keeps shared project context, sessions, tasks and decisions so different AI agents stay consistent across handoffs.

What you can do
Scaffold and sync project context: initialize state vectors, conventions and tasks, scan the repo to update state, and diff what changed since the last sync, plus validate context files and run schema migrations or export context to JSON or Markdown via the CLI and SDK. Generate paste-ready briefings for any AI agent and manage agent sessions, including handoffs between agents. Track project tasks and architectural decisions. Serve a local REST API with API key authentication and run multi-agent coordination modes. Expose about 10 MCP tools for native integration with Claude Code.
When to use it
Useful when you work with several AI assistants or models on the same codebase and want continuity between sessions, or when you want project state, tasks and decisions stored in one place that any agent can be briefed from.
Requirements
Runs locally as a stdio process, installed from PyPI with pip; Python is required. The MCP server is launched as a Python module and configured in the desktop client config. Storage defaults to files, with optional SQLite or PostgreSQL backends; PostgreSQL needs a database URL. The REST API server is optional and uses API keys.
Before you install
It scans your repository and stores project context, tasks and decisions locally, so review what gets captured before sharing briefings with external agents. The REST API is protected by API keys created and revoked through the auth command; keep them secret. The PostgreSQL backend requires a database connection URL containing credentials.

Installation

In SourceWeft

  1. Open contextkeeper in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

contextkeeper

[PyPI] [Python 3.10+] [License: MIT] [MCP Native]

Zero model drift between AI agents.


Install

bash
pip install contextkeeper

Quickstart

bash
contextkeeper initcontextkeeper sync --agent claudecontextkeeper bootstrap --clipboard# paste into any AI — full context restored

CLI Reference

CommandDescription
initScaffold project context — state vector, conventions, tasks
syncScan repo and update state vector with current project state
bootstrapGenerate paste-ready briefing for any AI agent
statusShow tracked projects and their current state
doctorValidate context files for consistency and missing fields
migrateRun database schema migrations
exportExport project context to JSON/Markdown
diffShow what changed since last sync
serveStart the REST API server (FastAPI + Uvicorn)
sessionsList and manage agent sessions
tasksList and manage project tasks
decisionsList and manage architectural decisions
authCreate and revoke API keys (ck_ prefix, SHA-256 stored)

Python SDK

python
from contextkeeper import ContextKeeperClient
client = ContextKeeperClient()
# Sessionssession = client.create_session(agent="claude", project="myproject")client.end_session(session.id, summary="Implemented auth module")
# Tasks & decisionsclient.create_task(project="myproject", title="Add rate limiting")client.create_decision(project="myproject", title="Use PostgreSQL", rationale="Need JSONB")
# Handoffhandoff = client.create_handoff(from_session=s1.id, to_agent="gpt-4")

MCP Server

10 tools — native Claude Code integration via Model Context Protocol.

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "contextkeeper": {      "command": "python",      "args": ["-m", "contextkeeper.mcp"]    }  }}

Backends

bash
# File (default) — zero configcontextkeeper init
# SQLitecontextkeeper init --backend sqlite
# PostgreSQLcontextkeeper init --backend postgres --db-url postgresql://user:pass@localhost/ck

REST API

14 endpoints + 3 auth endpoints. FastAPI with OpenAPI spec.

bash
contextkeeper serve --port 8420# → http://localhost:8420/docs   (Swagger UI)# → http://localhost:8420/openapi.json

Auth header: Authorization: Bearer ck_your_api_key

Multi-Agent Coordination

Three modes for concurrent agent access:

  • sequential — one agent at a time (default)
  • lock-based — pessimistic locking per resource
  • merge — optimistic merge with conflict resolution

Links

License

MIT © TheRealDataBoss

Source: packages/python/README.md at commit a7ffe60

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.7LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts