Your context belongs to you, not to your chatbot

Stop re‑explaining your project to every AI agent.

ctxfile snapshots your working state (plan, files, git, sessions) into one context file any AI agent can load. Claude Code, Cursor, Codex, local models. New agent, zero re-onboarding. On your machine or across every device. Local-first. Open source.

npm install -g ctxfile
⭐ Star on GitHub

Apache-2.0nothing leaves your machine by defaultno account required

ctxfile ui · 127.0.0.1:4747
file
git
notion
ollama-summary
sessionsclaude code · cursor digests PRO
token budget0 / 50,000 · 0%

event: snapshot · POST /api/internal/snapshot

Works withClaude CodeCursorCodex CLIOpenCodeGemini CLIAiderOpenClawHermesany MCP client

The problem

The re-explaining tax.

Every session starts blind.

Your agent forgot the plan, the decisions, and where you left off. You burn the first 15 minutes rebuilding context it had yesterday.

Every agent is an island.

Cursor doesn't know what Claude Code did. Your writing agent documents endpoints your coding agent deleted this morning.

Your context is hostage.

Weeks of project understanding trapped inside one vendor's chat history. Switching models means starting over.

How it works

Three moves. Zero re-onboarding.

01ctxfile --root .

Snapshot

ctxfile watches your project: plan, key files, git state, session summaries, Notion pages. One structured context object, assembled from reality.

02get_context()

Serve

A local MCP server any agent can read. Claude Code, Cursor, custom agents, local Ollama models: they call get_context and start already knowing the project.

03continue_thread("Q3 campaign")

Hand off

Switch agents, switch models, switch tools. Threads carry the decisions and open items across providers; the context stays yours and travels with the work, not the vendor.

The payload

What your agent actually receives.

Not a black box: one readable JSON object, scoped to what the agent needs. This is the real shape, straight from get_context. Try the scopes.

get_context(scope:
)
{
  "meta": {
    "name": "ctxfile",
    "generatedAt": "2026-07-10T17:41:02Z",
    "tokenBudget": 50000,
    "tokensUsed": 18432,
    "connectors": [
      { "name": "file", "status": "ok", "durationMs": 947 },
      { "name": "git", "status": "ok", "durationMs": 512 },
      { "name": "notion", "status": "skipped" }
    ]
  },
  "plan": "Ship checkout flow: webhook handler, then receipt emails.",
  "keyFiles": [
    { "path": "src/payments/webhook.ts", "tokens": 1284, "redactions": 2 },
    { "path": "src/payments/receipt.ts", "tokens": 911, "redactions": 0 }
  ],
  "gitState": { "branch": "feat/checkout", "ahead": 2, "modified": ["src/payments/webhook.ts"] },
  "sessionSummary": "Implemented signature verification; receipt template next."
}

Free core · Apache-2.0

The context layer your agents were missing.

Everything below ships in the open-source core. Readable source is the trust model.

Local-first, provably

No server, no account, no telemetry by default. Open source: audit the claim, don't trust it. Your data never becomes our data.

Any agent, any model

MCP-native: works with every MCP client today and every one that ships tomorrow. Cloud model, local model, doesn't matter.

Cloud agents included

ctxfile export ships a repo-safe context file with your repo. CI agents and hosted sessions load it on clone; redaction profiles keep private notes private.

Automatic, not prompted

Install the skill (ctxfile init) and your agents checkpoint on their own: announced every time, paused whenever you want, reviewable always. When a parser breaks, the fallback ladder still catches you.

Provenance on everything

Every context entry is tagged with its source, parser-read vs. agent-reported, so downstream agents know what they're trusting.

The .ctxfile convention

A versioned, documented format any tool can adopt. Like Dockerfile for builds or AGENTS.md for instructions, but for live working state.

Take it with you

Save in ChatGPT. Continue in Claude.

ctxfile is local-first, everywhere you work. An encrypted Sync vault extends the same context to your phone, the web, and any MCP-capable chat app: Claude, ChatGPT, Grok, Perplexity, Le Chat. Add the connector once and every conversation on that account can save a thread and resume it, on any provider.

01ChatGPTon your phone

“Save this session to ctxfile, thread Q3 campaign.”

save_session ✓encrypted to your vault, provenance-stamped

02Claudeminutes or days later

“Pick up my Q3 campaign thread. What were we doing?”

continue_thread ✓the first answer already knows the decisions and open items

03Your deskback home

Local ctxfile pulls the vault. The phone sessions land in your snapshot; your local sessions push up.

synced ✓one thread, every provider, both directions

Threads ship today, free and local: save_session and continue_thread work between every agent on your machine. The encrypted vault is the second beat of this launch, in Standard mode (roams everywhere) or Strict (true end-to-end, your own devices only). The trade-offs are spelled out honestly in the FAQ below and in the Sync docs.

Not just for code

Your brand brief is context too.

Running a marketing project? Your brand voice, guidelines, contacts, and campaign history are working state, and you pay the same re-explaining tax every time you open a new AI tool. ctxfile serves that context to any model the same way it serves a codebase: connect your Notion, snapshot the project, hand it to whichever AI you're using today. Switch from ChatGPT to Claude mid-campaign and it already knows your brand.

Works today via Claude Desktop one-click install. Sync brings it to your phone and every chat app you use.Get Sync for knowledge work →

Pricing

Free engine. Paid memory.

Free, forever

$0 Apache-2.0

  • The full context engine: MCP server + get_context
  • Threads: save_session and continue_thread, local
  • File, git, Notion, Ollama connectors
  • Session ingest for any harness
  • Cloud export with redaction profiles
  • Local dashboard
npm install -g ctxfile
Most popular

Pro

$12 / month

  • Automatic session sync across 8 tools
  • Persistent AI-employee memory: hire an agent once, never re-onboard it
  • Multi-agent consult with answer diffing
  • Voice input with repo-aware vocabulary
  • ctxfile serve: the HTTP door on your machine
See full pricing

Sync

$6 / month

  • Encrypted vault; your machine stays the source of truth
  • Phone, web, and chat apps: Claude, ChatGPT, Grok
  • Cross-provider threads everywhere
  • Standard or Strict encryption, your call
  • Bundle with Pro for $15/month
See Sync

Team, coming

Soon waitlist

  • Shared writable context
  • Per-agent write permissions
  • Full audit trail
  • Cross-machine sync, self-hosted hub
  • For teams that can't use cloud AI
Talk to us

FAQ

The launch set.

Is my code sent anywhere?

No. The default path makes zero network calls. Notion, cloud-model consult, and the Sync vault are opt-in and loudly flagged. The code is open: verify it.

What agents does it work with?

Anything that speaks MCP: Claude Code, Cursor, Claude Desktop, Cline, Windsurf, custom agents. With Sync, also the hosted chat apps: Claude, ChatGPT, Grok, Perplexity, Le Chat. Plus any harness at all via session ingest and export.

Is Sync end-to-end encrypted?

Your choice per vault. Standard encrypts everything on your device before upload; storage holds ciphertext only, and serve-time decryption lives in memory for the length of a single request. Encrypted at rest and in transit, zero plaintext persistence. That is not zero-knowledge, and we won't blur it: a hosted chat app can only read plaintext at its edge. Strict is true end-to-end (the relay can never decrypt), which works between your own devices and trades away chatgpt.com and claude.ai. Third path: self-host the open-source relay, and the momentary plaintext happens on hardware you control.

My agent's sessions aren't syncing.

Open the dashboard (ctxfile ui) and check Sessions: when a parser can't deliver, it hands you a one-paste prompt your agent uses to sync its own sessions. The full flow is documented under Session sync in the docs.

Open source and paid?

The core is Apache-2.0, forever. Pro is convenience and memory on top. The paid code isn't in the public repo; the free code is the trust proof.

I'm not a developer. Is this for me?

Yes. Sync is the knowledge-worker product: your brand brief, guidelines, and campaign history follow you across ChatGPT, Claude, and whatever you try next week. The one-click Claude Desktop install works locally today.

Today: portable context. Next: AI employees, agents with persistent identity and memory that survive across sessions and across models. Your research agent stays your research agent whether it runs on Claude today or a local model tomorrow. Then: shared team memory with permissions and audit. The context layer is how it all connects.

Agents don't work alone anymore. Neither do companies. Federation is coming for teams whose agents collaborate across org lines: shared, permissioned, encrypted, audited context between organizations. Talk to us or read the security overview.

One context. Every agent. All local.

npm install -g ctxfile
Read the quickstart →