contextkeeper

io.github.TheRealDataBoss由 GitHub 帳號 TheRealDataBoss 發布v0.2.7更新於 Oct 24, 2026

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

概覽

AI 產生的概覽

一個本機 MCP 伺服器兼命令列工具,保存共用的專案脈絡、工作階段、任務與決策,讓不同 AI 代理在交接時保持一致。

可以做什麼
初始化並同步專案脈絡:建立狀態向量、慣例與任務,掃描儲存庫更新狀態,檢視自上次同步以來的變更,並驗證脈絡檔案、執行資料庫結構遷移或匯出為 JSON/Markdown。為任何 AI 代理產生可直接貼上的簡報,並管理工作階段與代理之間的交接。追蹤專案任務與架構決策。提供具 API 金鑰驗證的本機 REST API,並支援多代理並行協調模式。透過約 10 個 MCP 工具與 Claude Code 原生整合。
適用情境
適合在同一個程式碼庫上使用多個 AI 助理或模型、希望工作階段之間保持連續性時使用,也適合把專案狀態、任務與決策集中存放,供任何代理讀取簡報。
執行需求
以本機 stdio 程序執行,透過 pip 從 PyPI 安裝,需要 Python。MCP 伺服器以 Python 模組方式啟動,並在桌面用戶端設定中設定。儲存預設使用檔案,可選 SQLite 或 PostgreSQL 後端;PostgreSQL 需要資料庫連線位址。REST API 伺服器為選用,使用 API 金鑰。
安裝前請注意
它會掃描你的儲存庫並在本機保存專案脈絡、任務與決策,向外部代理分享簡報前請先檢查內容。REST API 由透過 auth 指令建立與撤銷的 API 金鑰保護,請妥善保管。使用 PostgreSQL 後端需要含憑證的資料庫連線位址。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 contextkeeper,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

來源:packages/python/README.md,提交 a7ffe60

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.7最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分