Quickstart
ctxfile is a local-first MCP server that snapshots your project's working state (plan, key files, git state, optionally more) into one structured context object any MCP client can load. Install to first snapshot takes about a minute.
Install
npm install -g ctxfileThis gives you the ctxfile binary. It runs as an MCP server over stdio. Your client starts it, talks to it, and stops it. Nothing listens on the network.
ctxfile --root <dir>--root defaults to the current working directory. Configuration is optional: see Configuration.
Register with Claude Code
claude mcp add ctxfile -- ctxfile --root .Register with Cursor
Add to .cursor/mcp.json (per-project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"ctxfile": {
"command": "ctxfile",
"args": ["--root", "."]
}
}
}What your agent sees
| Surface | What it does |
|---|---|
| get_context | Tool the model calls to pull the snapshot. Optional scope: full | plan | files | git. |
| ingest_context | Any agent pushes its own session digest in: the universal session capture for unsupported harnesses. See Agent-assisted sessions. |
| context://current | Resource returning the full ContextObject as JSON. |
| context://plan · context://git | Scoped resources: just the plan, just the git state. |
| load-context | Prompt that injects the snapshot into the conversation. |
| remember · recall · forget · consult · transcribe_voice | Pro tools, registered per licensed feature. See MCP surface. |
In practice: open your agent, say “load context” or let it call get_context, and it starts working with your plan, key files, and git state already in hand. No re-explaining. The full reference is on MCP surface.
Cloud agents
ctxfile exportAgents that don't run on your machine (hosted coding agents, CI bots) read a committed .ctxfile/context.json instead of talking MCP. The default profile is repo-safe. See Cloud agents & export.
Local dashboard
ctxfile uiOpens a dashboard bound to 127.0.0.1. It is never exposed to your network. The access token is carried in the URL fragment, which never leaves the browser in HTTP requests.
Next steps
- The complete CLI reference and MCP surface.
- Configure token budgets, includes/excludes, and opt-in connectors.
- Read the privacy model: what runs locally (everything, by default) and what each opt-in enables.
- Tour the dashboard, then see client setup for Claude Desktop, MCP Inspector, and generic stdio clients.