Context Autopilot
@ChiragBachani
About Context Autopilot
No overview available yet
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"context-autopilot": {
"command": "npx",
"args": [
"-y",
"-p",
"context-autopilot",
"ctxlayer-mcp"
]
}
}
}Tools
7List projects that have agent session history (Claude Code or Cursor) available for context mining.
Check a project's CLAUDE.md / AGENTS.md for references the repo has outgrown: files that no longer exist and npm scripts that were removed. Returns findings as JSON.
Apply the user's explicit decisions on pending context proposals. Call ONLY after the user has said in conversation which proposals to accept and/or reject — never decide for them. Pass the exact proposal titles. Accepted rules are written into the managed block of the context files; rejected ones are remembered and never re-proposed; unmentioned proposals stay pending.
Mine a project's agent-session history for durable context signals: instructions the user repeated across sessions, corrections they made, and tool calls they rejected. Returns the signals as JSON. Proactively call this when the user has corrected you more than once in a session, or when you notice them repeating an instruction they have given before — if strong signals come back, offer to distill them.
Mine ALL of the user's projects for cross-project signals about how they like agents to work (verification effort, planning style, workflow preferences) and distill them into proposals for their personal global context file (~/.claude/CLAUDE.md). Proposals are saved to ~/.claude/.ctxlayer/proposals.json for review; nothing is applied automatically. Can take a minute.
Scan the memory the user's agents have already saved per project (Claude Code auto-memory directories plus each project's CLAUDE.md/AGENTS.md) and find rules that belong in the user's GLOBAL ~/.claude/CLAUDE.md: how-the-user-works rules, and rules duplicated across 2+ projects. Additive only — project files are never edited. Proposals are saved to ~/.claude/.ctxlayer/proposals.json; NOTHING is applied until the user approves via apply_context_proposals with global=true. Can take a minute.
Run the full Context Autopilot pipeline: scan session history, then distill the signals into evidence-backed CLAUDE.md/AGENTS.md proposals. Proposals are saved for review; NOTHING is written to context files until the user approves via apply_context_proposals. Can take a minute. Good moments to proactively suggest this: after the user corrects you repeatedly, or at the natural end of a substantial working session — ask first, then run.
Overview
What is Context Autopilot?
Automated context collection for coding agents. It mines real agent sessions — every instruction repeated, every correction made, every tool call rejected — and distills them into CLAUDE.md / AGENTS.md rules you approve. Runs 100% locally as a CLI and MCP server.
How to use Context Autopilot?
Install via npm install -g context-autopilot or use npx. Run ctxlayer scan to mine signals from local session transcripts (Claude Code and Cursor), ctxlayer distill to convert signals into proposals via your existing Claude CLI, and ctxlayer apply to review and write accepted rules. Also supports a Claude Code plugin and an MCP server for in-chat use.
Key features of Context Autopilot
- Mines session history for repeated instructions, corrections, and rejected tool calls.
- Distills signals into imperative, project-specific rules backed by verbatim evidence.
- Interactive approve/reject flow; never writes context files without your decision.
- Writes managed blocks into both
CLAUDE.mdandAGENTS.md. - Global mode mines all projects for personal working preferences.
- Staleness check (
ctxlayer stale) finds context file references the repo has outgrown.
Use cases of Context Autopilot
- Prevent re‑teaching agents the same conventions every session.
- Enforce project‑specific constraints (e.g., “staff login cannot access admin view”).
- Capture cross‑session patterns that no single live session can observe.
- Maintain a personal, cross‑project set of preferences for how you like to work.
- Add a CI step that flags stale context entries (missing files, removed npm scripts).
FAQ from Context Autopilot
How is this different from Claude Code's /insights?
/insights is a personal usage report with hand‑copy suggestions for Claude Code only. Context Autopilot provides a full pipeline: mines Cursor history too, attaches verbatim quotes as evidence, runs an approve/reject flow, writes managed blocks to both CLAUDE.md and AGENTS.md, offers global cross‑project rules, and includes a CI staleness check. Fully open source and local.
How is this different from Claude Code's auto‑memory?
Auto‑memory captures what the model notices live in a single session. Autopilot is retroactive and systematic: it mines months of existing history across tools and finds cross‑session patterns (e.g., you said it six times in four sessions) that no single live session can see.
Where does my data live?
Everything runs on your machine. Transcripts are parsed locally. Only extracted signals (short quotes of your own instructions) are sent to the model you already use for coding. Nothing is uploaded anywhere else.
What are the runtime requirements?
The CLI requires Node.js. Cursor session mining uses Node's built‑in node:sqlite (Node 22+; on older Node, the Cursor source is skipped gracefully). No external API key is needed for distillation—it uses your existing claude CLI.
How does the MCP server work?
Configure it in your MCP client with npx -y -p context-autopilot ctxlayer-mcp. It exposes tools like scan_context_signals, distill_context_proposals, apply_context_proposals, and find_stale_context. The approval loop closes entirely inside chat: the tool returns each proposal with evidence and asks you which to accept; apply_context_proposals writes only the ones you approve.
Frequently asked questions
How is this different from Claude Code's `/insights`?
`/insights` is a personal usage report with hand‑copy suggestions for Claude Code only. Context Autopilot provides a full pipeline: mines Cursor history too, attaches verbatim quotes as evidence, runs an approve/reject flow, writes managed blocks to both CLAUDE.md and AGENTS.md, offers global cross‑project rules, and includes a CI staleness check. Fully open source and local.
How is this different from Claude Code's auto‑memory?
Auto‑memory captures what the model notices live in a single session. Autopilot is retroactive and systematic: it mines months of existing history across tools and finds cross‑session patterns (e.g., you said it six times in four sessions) that no single live session can see.
Where does my data live?
Everything runs on your machine. Transcripts are parsed locally. Only extracted signals (short quotes of your own instructions) are sent to the model you already use for coding. Nothing is uploaded anywhere else.
What are the runtime requirements?
The CLI requires Node.js. Cursor session mining uses Node's built‑in `node:sqlite` (Node 22+; on older Node, the Cursor source is skipped gracefully). No external API key is needed for distillation—it uses your existing `claude` CLI.
How does the MCP server work?
Configure it in your MCP client with `npx -y -p context-autopilot ctxlayer-mcp`. It exposes tools like `scan_context_signals`, `distill_context_proposals`, `apply_context_proposals`, and `find_stale_context`. The approval loop closes entirely inside chat: the tool returns each proposal with evidence and asks you which to accept; `apply_context_proposals` writes only the ones you approve.
Basic information
More Other MCP servers

DeepMark
DeepMark helps teachers deliver rapid, consistent marking with meaningful feedback for every student — in a fraction of the time. What once took a week, now takes one free period.
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
ICSS
chokcoco不止于 CSS
Awesome Mlops
visengerA curated list of references for MLOps
Comments