Ctxfile
Local-first MCP server that snapshots a project's plan, files and git state for any agent
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 0.6.0
- Listing updated
- 1 day ago
About Ctxfile
Ctxfile is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
Ctxfile writes a project's working state, meaning the plan, key files, git state and session summaries, into one versioned context file in the repo and serves it to any MCP agent through get_context. The README says the default path makes zero network calls, redacts secret-looking content before it enters the snapshot, never reads .env or key files, and keeps the core read-only over your project.
Its payload tags every entry with its source, parser-read or agent-reported, and works within a token budget. Local threads let you save a session in one agent and continue it in another, with handoff packages. ctxfile init installs a skill so Claude Code, OpenCode, OpenClaw and Hermes checkpoint on their own, with Cursor rules and AGENTS.md blocks for others. A paid Sync vault carries context to ChatGPT, Claude web, Grok and Perplexity.
The core is Apache-2.0. Pro at $12 a month adds session connectors, encrypted memory and multi-agent consult; Sync is $6; a bundle is $15.
Install
Run in a terminal
claude mcp add ctxfile --env NOTION_TOKEN='<NOTION_TOKEN>' -- npx -y ctxfileAdd to claude_desktop_config.json
{
"mcpServers": {
"ctxfile": {
"command": "npx",
"args": [
"-y",
"ctxfile"
],
"env": {
"NOTION_TOKEN": "<NOTION_TOKEN>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"ctxfile": {
"command": "npx",
"args": [
"-y",
"ctxfile"
],
"env": {
"NOTION_TOKEN": "<NOTION_TOKEN>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"ctxfile": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ctxfile"
],
"env": {
"NOTION_TOKEN": "<NOTION_TOKEN>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"ctxfile": {
"command": "npx",
"args": [
"-y",
"ctxfile"
],
"env": {
"NOTION_TOKEN": "<NOTION_TOKEN>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"ctxfile": {
"command": "npx",
"args": [
"-y",
"ctxfile"
],
"env": {
"NOTION_TOKEN": "<NOTION_TOKEN>"
}
}
}
}Configuration
NOTION_TOKENOptional Notion internal integration token (enables the Notion connector)
Tools this server provides (4)
Taken from the project documentation; the running server may differ.
- get_context
- Return the project's working-state snapshot as one context object.
- save_session
- Save the current session for later.
- continue_thread
- Continue a saved thread in another agent.
- list_threads
- List saved threads.
What it does
- One context object
- Plan, key files, git state and session summaries assembled into a single payload.
- Secret redaction
- Cloud keys, tokens and credential files are redacted or never read.
- Cross-agent threads
- Save in one agent and continue in another with handoff packages.
- Auto-checkpoint skill
- ctxfile init teaches agents when to save, announcing every save.
- Cloud export
- Repo-safe context file with redaction profiles for CI and hosted agents.
- Provenance tags
- Entries show whether a parser or an agent supplied them.
Good for
- Stop re-explaining a project when switching from Cursor to Claude Code
- Commit the project's context to the repo for teammates and CI agents
- Hand a thread from one model to another
- Keep secrets out of what agents see
Pricing
Open source, from $6 a month
Core free under Apache-2.0; Pro $12/mo, Sync $6/mo
Prices change. Check ctxfile.dev before you buy.
Ctxfile FAQ
Does anything leave my machine?
By default no: the README says zero network calls, no account and no telemetry; Sync is an opt-in paid vault.
What is the licence?
The core is Apache-2.0.
What do paid plans cost?
Pro is $12 a month, Sync $6 a month, or $15 a month for both.
What does it need to run?
Node 20 or later, or 22 on Windows.
Is Ctxfile free?
Yes. Ctxfile is open source, so you can use and self-host it for free.
How do I add Ctxfile to Claude Code?
Run this command in your terminal: claude mcp add ctxfile --env NOTION_TOKEN='<NOTION_TOKEN>' -- npx -y ctxfile
What are the best alternatives to Ctxfile?
The closest alternatives to Ctxfile are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to Ctxfile

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools