
Store and retrieve entities, relations and observations in a persistent local knowledge graph.

ctxfile is a local-first MCP server that snapshots your project's working state into one structured context object and hands it to any MCP agent, so you can save a session in one agent and continue it in another without anything leaving your machine.
ctxfile: a local-first MCP server for sharing project context is cataloged as an MCP server attributed to ctxfile. ctxfile is a local-first MCP server that snapshots your project's working state into one structured context object and hands it to any MCP agent, so you can save a session in one agent and continue it in another without anything leaving your machine. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Apache-2.0. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for ctxfile: a local-first MCP server for sharing project context are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
By default it makes zero network calls and reads only files and git; network connectors such as Notion, local Ollama summarization and Sync activate only when explicitly configured.
Secret-looking content like cloud keys, tokens, private keys, JWTs and password assignments is redacted before it enters the snapshot, and .env files, key files and credential files are never read.
ctxfile export writes a static, repo-safe artifact for agents that never touch your machine, such as hosted coding agents and CI, using an open specification.
README.md · fc1dcca59a19 · 采集于 2026-11-13 10:46:12 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
One context, every agent, all local.
Website · Docs · Quickstart · Clients · The .ctxfile convention · Security
You work with more than one AI agent. Claude Code in the terminal, Cursor in the editor, a chat tab for thinking. Each one starts cold, because your working state (the plan, the key files, the git state, what you decided an hour ago) lives in your head and in scrollback.
ctxfile is a local-first MCP server that snapshots your project's working state into one structured context object, and hands it to any MCP agent in a single call. Save a session in one agent, continue it in another. Nothing leaves your machine.
you → ctxfile → the same context, in every agent
Every client on your machine at once
npm install -g ctxfile
ctxfile connect # lists the MCP clients it found
ctxfile connect --all # adds ctxfile to each (backups kept, other servers untouched)
Or tell any coding agent: "Set up ctxfile for me by following https://ctxfile.dev/setup.md".
Claude Code (as a plugin, or one command)
/plugin install ctxfile --marketplace ctxfile/ctxfile
claude mcp add --scope user ctxfile -- npx -y ctxfile
Cursor (.cursor/mcp.json in your project, or ~/.cursor/mcp.json globally)
{
"mcpServers": {
"ctxfile": { "command": "npx", "args": ["-y", "ctxfile", "--root", "${workspaceFolder}"] }
}
}
Codex CLI
codex mcp add ctxfile -- npx -y ctxfile --root .
Claude Desktop (no terminal needed): download ctxfile-macos-arm64.mcpb and drag it into Settings → Extensions. The bundle carries a compiled native module, so it is macOS (Apple Silicon) only for now; on Windows or an Intel Mac, add the stdio JSON above to claude_desktop_config.json instead.
Every other client: ctxfile is a standard stdio server, so npx -y ctxfile is the whole command. One-click install links and copy-paste setup for VS Code, Windsurf, Zed, Cline, Gemini CLI, OpenCode, Warp, Goose, LM Studio, Kiro, JetBrains, Visual Studio, Amp, OpenClaw, Hermes, and more are on the per-client tabs at ctxfile.dev/docs/clients.
Then, in your agent: "load my context" (or call get_context). Requires Node ≥ 20 (≥ 22 on Windows).
You stop typing "save this." One command installs a skill that teaches any agent, while doing its normal work, when to checkpoint context and to announce every save (never silent, paused any time, reviewable always):
ctxfile init
It renders from one canonical spec into whatever each harness reads: an Agent SKILL.md for Claude Code, OpenCode, OpenClaw, and Hermes (one portable file across all four skill systems), a Cursor rule, and managed GEMINI.md / AGENTS.md blocks. Details at ctxfile.dev/docs/automatic.
The same context your CLI and editor agents load over MCP can travel to web chatbots. Connect Grok, ChatGPT, Claude web, or Perplexity to your encrypted Sync vault as a custom MCP connector, or ctxfile export and paste the envelope into any prompt box (Gemini, and anything else). Walkthrough: ctxfile.dev/docs/webchat.
This is the part we care about most, so it goes first:
password= assignments) is redacted before it enters the snapshot. .env*, key files, and credential files are never read at all.The full model, including what Pro and Sync add and what they can never see, is documented at ctxfile.dev/security.
| Snapshot | get_context returns one structured ContextObject: plan docs, ranked key files fitted to a token budget, git state, optional Notion pages and local-LLM summary. |
| Save and resume | save_session stores an agent-written summary of the current conversation. continue_thread hands the merged, provenance-labeled history to the next agent. Different harness, different provider, cold start: it picks up where you left off. |
| Threads | Durable identities for a piece of work ("Q3 campaign"), spanning agents and machines. handoff: true enforces a complete takeover package: state, decisions with rationale, ordered open items, gotchas. |
| Memory import | ingest_memory moves what ChatGPT, Grok, Claude or any assistant knows about you into ctxfile: one prompt (ctxfile memory prompt), a strict schema, global or per-project scope. Instructions and identity wait for your approval; duplicates merge; rejections stick. Every agent then gets it in get_context. Docs. |
| Tasks | post_task, list_tasks, update_task: one agent leaves work on a thread for another ("have ChatGPT draft the lead emails"), the assignee finds it in its inbox and asks you before starting. Agent-posted tasks are proposals until you approve them in the dashboard or CLI; approvals are signed on your device, and anything that sends, publishes, pushes code, or spends needs its own yes. Docs. |
| Universal ingest | ingest_context is the schema-enforced door for any harness without a native parser. The prompt is the adapter, so every MCP-speaking agent is supported, including ones that do not exist yet. |
| Cloud agents | ctxfile export writes a static, repo-safe artifact for agents that never touch your machine (hosted coding agents, CI). The format is an open spec: the .ctxfile convention. |
| Dashboard | ctxfile ui: a local cockpit on 127.0.0.1. Run snapshots, watch connectors, browse context, inspect git state. |
| Sync (optional) | An end-to-end encrypted vault through a relay you can self-host. Argon2id key derivation, XChaCha20-Poly1305 per blob. The relay stores ciphertext only. |
| Package | What | License |
|---|---|---|
packages/core | ctxfile on npm: the MCP server, snapshot engine, threads, ingest, export, Sync client, dashboard host | Apache-2.0 |
packages/relay | @ctxfile/relay on npm: the self-hostable Sync relay and team hub (encrypted vaults, /mcp endpoint, federation, audit log). One Docker image | Apache-2.0 |
packages/dashboard + packages/ui-kit | The local instrument UI served by ctxfile ui | Apache-2.0 |
apps/web | ctxfile.dev: site and docs | Apache-2.0 |
Everything in this repo is Apache-2.0 and works standalone, forever. The paid Pro add-on (a separate, closed package) adds session connectors that read your recent sessions from Claude Code, Cursor, Codex CLI, OpenCode, Gemini CLI, Aider, OpenClaw, and Hermes Agent, encrypted cross-session memory, multi-provider consult (Anthropic, OpenRouter for hundreds of models on one key, any OpenAI-compatible endpoint, or local Ollama), AI-distilled prompt Playbooks, and local voice capture. Licensing is an Ed25519-signed key verified offline. No phone-home, ever. Pro funds the open-source work.
We want your issues, your PRs, and your weird harness reports. Start with CONTRIBUTING.md. Every ingested format, every MCP client quirk, every redaction gap you find makes the whole thing better.
git clone https://github.com/ctxfile/ctxfile.git && cd ctxfile
npm install
npm run build && npm test # the whole gate: lint, typecheck, tests
If ctxfile saves you a cold start, a star is how other people find it.
Apache-2.0. "ctxfile" and the ctxfile logo are trademarks of ctxfile; the license covers the code, not the name.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for ctxfile: a local-first MCP server for sharing project context from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/ctxfile-594f67)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

Organize problem solving into revisable, branching thought steps through an MCP tool.

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.