Skip to main content
MCP server CX Codex

ctxfile — Claude Code MCP server: what it does, how to install

Captures working files, git status, and session decisions into a local snapshot shared across your coding agents. Useful when switching between CLI tools and editor chats.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add ctxfile -e NOTION_TOKEN=<NOTION_TOKEN> -- npx -y ctxfile
Open on GitHub

What ctxfile does

Switching between tools like Claude Code and Cursor usually wipes your active context. The ctxfile server gathers priority files, plans, and git history into a unified payload via the get_context tool. When switching environments, save_session and continue_thread hand over the working log without manual recaps.

The core engine operates entirely on your machine without external network traffic. It scans repo files in read-only mode and scrubs private keys, tokens, and .env values before building the snapshot.

Runtime demands are strict: Node 20 is required on Unix systems, and Windows setups need Node 22 or higher. Optional external integrations like Notion only trigger when you supply explicit environment credentials.

What it helps with

  • Hand off active project context between terminal tools and IDE agents
  • Resume unfinished coding sessions without re-explaining past decisions
  • Strip credentials and sensitive keys before feeding files to an agent
  • Track cross-agent tasks and review open items in a shared thread

Example prompts for the agent

  • Call get_context to inspect our working state
  • Run save_session to summarize what we changed so another agent can continue
  • Fetch open items for this thread using list_tasks

How to install ctxfile

Platform CLI

claude mcp add ctxfile -e NOTION_TOKEN=<NOTION_TOKEN> -- npx -y ctxfile

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about ctxfile

How to install ctxfile in Claude Code?

Run claude mcp add ctxfile -e NOTION_TOKEN=<NOTION_TOKEN> -- npx -y ctxfile in your terminal. You can omit the Notion token flag if you do not plan to connect Notion workspace notes.

What does ctxfile do?

It packs your project files, git log, and conversational history into a structured object accessible by any local MCP client. This lets different agents pick up the same task without losing progress.

What are the prerequisites for running ctxfile?

You need Node.js 20 or newer on macOS and Linux, while Windows environments require Node.js 22 or later.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor