1. Conduid
  2. RAG
  3. Contextgit
MCP server · RAG

Contextgit

Persistent memory layer for AI agent workflows

37Low

Scored 6 months ago · breakdown

About Contextgit

Contextgit is an MCP server in the RAG category: persistent memory layer for AI agent workflows.

Install

Claude Code
claude mcp add contextgit -- npx -y contextgit
npx
npx -y contextgit

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (12)

context_searchSemantic + full-text search over past context commits.

Parameters not published.

project_memory_branchCreate a context branch for experimental work.

Parameters not published.

project_memory_loadLoad the full project snapshot — the plan, live open threads, recent activity, active claims, plus live git facts (HEAD, commit count). Call at session start. Optional `commit_window` (default 5) controls how many recent commits to include.

Parameters not published.

project_memory_mergeMerge a context branch back into the parent.

Parameters not published.

project_memory_planCreate or update the plan hierarchy — lay out a whole plan → step → task tree, or update one node's status (`pending` / `in_progress` / `done`).

Parameters not published.

project_memory_plansRead the plan tree. `--completed` shows finished plans; `--plan <handle>` drills into one.

Parameters not published.

project_memory_retrieveWindowed scroll-back. `tier='commits' \

Parameters not published.

project_memory_saveSave a context commit, bound to the current git commit — decisions made, approaches abandoned, open questions. Call once per commit; the body carries intent, not a paraphrase of the diff. Can open threads, close threads (`closes_threads`), and check off tasks (`completes_tasks`) in the same call. Threads open as `'open'` (committed) or `'watch'` (a TTL-expiring reminder).

Parameters not published.

project_memory_threadsList threads with `filter='stale' \

Parameters not published.

project_memory_traceRecord a step-level reasoning note in the fine tier — decisions considered and rejected, dead ends. Pull-only: NEVER appears in `project_memory_load` output.

Parameters not published.

project_task_claimClaim a task so other agents skip it. Claims auto-expire after 2 hours.

Parameters not published.

project_task_unclaimRelease a claimed task.

Parameters not published.

Ask AI

✦

Ask AI about Contextgit

Powered by Claude · Grounded in docs

I know everything about Contextgit. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

ContextGit

Every time you start a new session with an AI coding agent, it starts from zero. It doesn't know what was built yesterday, what decisions were made, or what's left to do. You spend the first 10 minutes of every session re-explaining your project. ContextGit fixes this — it gives your agents a persistent memory layer that survives across sessions, branches, and machines.

Install

npm install -g contextgit
cd your-project
contextgit init

Restart Claude Code (or any MCP client) after running init for the MCP server to take effect.

That's it. init registers the MCP server, updates CLAUDE.md with session instructions, and installs Claude Code hooks. Start a new session — the agent calls project_memory_load automatically and picks up exactly where the last session left off.

How it works

ContextGit stores structured context commits alongside your git history. Each commit captures what was done, what was decided, and what questions remain open.

Session 1: Agent builds auth module → saves context commit
Session 2: Agent loads snapshot → knows auth is done → starts on the next task

What the agent sees

When an agent calls project_memory_load, it gets a snapshot like this:

## Project State
Auth module complete. API routes tested. Database schema finalized.

## Current Branch: Context: main
Implementing payment integration. Stripe SDK configured.

## Recent Activity
- [2026-03-20T08:33:44Z] "Payment webhook handler done" by solo via claude-code
- [2026-03-20T07:15:22Z] "Stripe SDK integration" by solo via claude-code
- [2026-03-19T16:42:11Z] "Auth module complete" by solo via claude-code

## Open Threads
- [FREE] Need to add rate limiting to payment endpoints
- [CLAIMED by studio-mcp-agent] Build invoice PDF generation
- [FREE] Decide on webhook retry strategy

## Active Claims
- "Build invoice PDF generation" claimed by studio-mcp-agent (2h TTL)

The agent reads this and knows exactly where the project stands without you saying a word.

MCP tools

These tools are exposed to the agent via MCP. The agent calls them as part of its normal workflow.

Tool What it does
project_memory_load Load the full project snapshot — what was built, what's decided, open threads, active claims. Call at session start.
project_memory_save Save a context commit — what you did, decisions made, open questions. Call before ending a session.
context_search Semantic + full-text search over past context commits.
project_task_claim Claim a task so other agents skip it. Claims auto-expire after 2 hours.
project_task_unclaim Release a claimed task.
project_memory_branch Create a context branch for experimental work.
project_memory_merge Merge a context branch back into the parent.

CLI commands

contextgit init              # Initialize contextgit in current project
contextgit init --hooks      # Initialize with git hooks
contextgit commit "message"  # Write a context commit
contextgit status            # Show current project state
contextgit search "query"    # Search past commits
contextgit claim "task"      # Claim a task
contextgit unclaim <id>      # Release a claim
contextgit branch <name>     # Create a context branch
contextgit merge <id>        # Merge a context branch
contextgit serve             # Start the REST API server

Architecture

Monorepo with strict dependency ordering:

packages/
  core/     → Types, snapshot formatter, embedding service, context engine
  store/    → Storage interface, LocalStore (SQLite), RemoteStore, SupabaseStore
  mcp/      → MCP server (stdio transport, launched by Claude Code)
  cli/      → CLI commands (oclif)
  api/      → REST API (Express)

Local storage: SQLite via better-sqlite3. One DB per project at ~/.contextgit/projects/<id>.db.

Remote storage: Optional Supabase (Postgres + pgvector) for cross-machine sync and team use.

Embeddings: Local all-MiniLM-L6-v2 (384 dimensions, no API key needed) for semantic search.

Configuration

Project config lives at .contextgit/config.json:

{
  "project": "my-project",
  "projectId": "unique-id",
  "store": "local",
  "agentRole": "solo",
  "workflowType": "interactive",
  "autoSnapshot": false,
  "snapshotInterval": 10,
  "embeddingModel": "local"
}

Current status

This is an early-stage tool. It works for solo developers using Claude Code across one or more machines. The core memory layer is solid — context commits, branches, threads, search, and snapshots all work.

Known limitations

  • No automatic context merge when git branches are merged (manual project_memory_merge required)
  • No integration with external boards (Linear, Jira, GitHub Issues)
  • Semantic search requires the embedding model to download on first use (~23MB)

License

MIT

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Contextgit

How do I install Contextgit?

Run claude mcp add contextgit -- npx -y contextgit, then add the server to your MCP client's configuration.

Is Contextgit safe to use with an AI agent?

Its trust score is 37 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Contextgit still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.