About contextkeeper
contextkeeper is a project-context manager for people working across AI agents and LLMs. Its CLI, SDK, REST API, and session tools help track project state and create briefings that can be shared across agents.
Key features
- 01Scaffold and sync project context
- 02Generate briefings for AI agents
- 03Track sessions, tasks, and decisions
- 04Export context to JSON or Markdown
- 05Coordinate concurrent agent access
- 06Validate context and detect changes
Use cases
- 01Restore project context when switching agents
- 02Review project changes since the last sync
- 03Track agent sessions and project tasks
- 04Share context as JSON or Markdown
MCP support
Provides 10 MCP tools for native Claude Code integration. The server can also be configured in Claude Desktop.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEcontextkeeper
Zero model drift between AI agents.
Install
pip install contextkeeper
Quickstart
contextkeeper init
contextkeeper sync --agent claude
contextkeeper bootstrap --clipboard
# paste into any AI — full context restored
CLI Reference
| Command | Description |
|---|---|
init | Scaffold project context — state vector, conventions, tasks |
sync | Scan repo and update state vector with current project state |
bootstrap | Generate paste-ready briefing for any AI agent |
status | Show tracked projects and their current state |
doctor | Validate context files for consistency and missing fields |
migrate | Run database schema migrations |
export | Export project context to JSON/Markdown |
diff | Show what changed since last sync |
serve | Start the REST API server (FastAPI + Uvicorn) |
sessions | List and manage agent sessions |
tasks | List and manage project tasks |
decisions | List and manage architectural decisions |
auth | Create and revoke API keys (ck_ prefix, SHA-256 stored) |
Python SDK
from contextkeeper import ContextKeeperClient
client = ContextKeeperClient()
# Sessions
session = client.create_session(agent="claude", project="myproject")
client.end_session(session.id, summary="Implemented auth module")
# Tasks & decisions
client.create_task(project="myproject", title="Add rate limiting")
client.create_decision(project="myproject", title="Use PostgreSQL", rationale="Need JSONB")
# Handoff
handoff = 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:
{
"mcpServers": {
"contextkeeper": {
"command": "python",
"args": ["-m", "contextkeeper.mcp"]
}
}
}
Backends
# File (default) — zero config
contextkeeper init
# SQLite
contextkeeper init --backend sqlite
# PostgreSQL
contextkeeper init --backend postgres --db-url postgresql://user:pass@localhost/ck
REST API
14 endpoints + 3 auth endpoints. FastAPI with OpenAPI spec.
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
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.