# Ctxfile

> Ctxfile is an open-source MCP server for developer tools. Local-first MCP server that snapshots a project's plan, files and git state for any agent. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Starting price:** $6 a month
- **Platforms:** CLI, self-hosted
- **Website:** https://ctxfile.dev
- **Repository:** https://github.com/ctxfile/ctxfile
- **MCP Registry name:** dev.ctxfile/ctxfile
- **Categories:** developer tools, knowledge and memory
- **Listing updated:** 2026-11-16

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add ctxfile --env NOTION_TOKEN='<NOTION_TOKEN>' -- npx -y ctxfile
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "ctxfile": {
      "command": "npx",
      "args": [
        "-y",
        "ctxfile"
      ],
      "env": {
        "NOTION_TOKEN": "<NOTION_TOKEN>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "ctxfile": {
      "command": "npx",
      "args": [
        "-y",
        "ctxfile"
      ],
      "env": {
        "NOTION_TOKEN": "<NOTION_TOKEN>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "ctxfile": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "ctxfile"
      ],
      "env": {
        "NOTION_TOKEN": "<NOTION_TOKEN>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "ctxfile": {
      "command": "npx",
      "args": [
        "-y",
        "ctxfile"
      ],
      "env": {
        "NOTION_TOKEN": "<NOTION_TOKEN>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "ctxfile": {
      "command": "npx",
      "args": [
        "-y",
        "ctxfile"
      ],
      "env": {
        "NOTION_TOKEN": "<NOTION_TOKEN>"
      }
    }
  }
}
```

## Tools

- `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.

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/ctxfile
