
Ctxfile
dev.ctxfile由 ctxfile.dev 发布v0.6.0更新于 Oct 24, 2026
Local-first MCP server that snapshots your project's working state into one context object.
概览
本地优先的 MCP 服务器,把项目的工作状态快照成一个上下文对象,让任意 MCP 智能体一次调用即可加载。
- 可以做什么
- 把项目快照为一个结构化上下文对象:计划文档、按 token 预算排序的关键文件、git 状态,以及可选的 Notion 页面和本地模型摘要
- 保存与续接会话:存储智能体撰写的摘要,并把带来源标注的合并历史交给下一个智能体
- 管理线程:为一项工作提供持久标识,交接模式会强制生成完整的接管包
- 导入助手记忆到全局或项目范围,指令与身份信息需经你批准
- 发布、列出和更新任务,供一个智能体留给另一个智能体,需你批准
- 通过受模式约束的入口接收任意客户端的上下文,并导出静态产物供云端智能体和 CI 使用
- 适用场景
- 适合在多个 AI 智能体或编辑器之间切换、每次冷启动都要重新说明计划、关键文件和 git 状态的场景。它让一个智能体保存会话、另一个接着做,并为托管或 CI 智能体提供可移植的上下文产物。
- 运行要求
- 以本地 stdio 进程运行,通常通过 npm 包 ctxfile 的 npx 启动;需要 Node 20 或更高版本(Windows 上需 22 或更高)。Claude Desktop 安装包目前仅支持 macOS Apple Silicon。可选的 NOTION_TOKEN 用于启用 Notion 连接器,其他连接器需显式配置才会启用。
安装
在 SourceWeft 中
- 打开 控制台中的 Ctxfile,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ctxfile
One context, every agent, all local.
[CI] [npm] [Apache-2.0] [MCP] [GitHub stars]
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.
30-second quickstart
Every client on your machine at once
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)
Cursor (.cursor/mcp.json in your project, or ~/.cursor/mcp.json globally)
Codex CLI
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).
Make it automatic
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):
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.
It follows you into the chat tabs, too
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.
Private by default
This is the part we care about most, so it goes first:
- The default path makes zero network calls. Files and git only.
- Secret-looking content (cloud keys, tokens, private keys, JWTs,
password=assignments) is redacted before it enters the snapshot..env*, key files, and credential files are never read at all. - Core is read-only over your project. It never writes to your repo, your git state, or anything else.
- No telemetry by default. An anonymous weekly install ping exists, and it is opt-in only.
- Network connectors (Notion, local Ollama summarization, Sync) activate only when you explicitly configure them.
The full model, including what Pro and Sync add and what they can never see, is documented at ctxfile.dev/security.
What it does
The monorepo
Open core, honestly
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.
Contributing
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.
- Bugs and features: issues
- Questions and show-and-tell: discussions
- Security reports: SECURITY.md (please do not open public issues for vulnerabilities)
Star history
If ctxfile saves you a cold start, a star is how other people find it.
[Star history chart]License
Apache-2.0. "ctxfile" and the ctxfile logo are trademarks of ctxfile; the license covers the code, not the name.
来源:README.md,提交 fc1dcca
工具
0版本历史
2- v0.6.0最新Sep 26, 2026
- v0.5.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分