context-sync — Claude Code MCP server: project memory
A local memory layer for a codebase: the agent keeps decisions, constraints and file structure across sessions. Handy when context vanishes on restart.
claude mcp add context-sync -- npx -y @context-sync/serverWhat context-sync does
context-sync stores project context in a local database and serves it to the agent through a small MCP tool surface: set_project, remember, recall, read_file, search, structure, git and notion. Project identity and stack, active work, decisions and caveats live in the database rather than in chat history.
The workflow starts with set_project on an absolute path, then recall brings back what was stored, structure and search help you explore, and remember keeps anything that should outlive the current session. Inside a git repository set_project can install hooks for post-commit, pre-push, post-merge and post-checkout. They carry the Context Sync Auto-Hook marker, and existing hooks get backed up first.
The database sits at ~/.context-sync/data.db and config at ~/.context-sync/config.json. Point it elsewhere with context-sync --db-path /absolute/path/to/db or the CONTEXT_SYNC_DB_PATH variable. Auto-configuration only runs on a global install, so a local install means setting things up by hand from docs/CONFIG.md. Notion is opt-in through context-sync-setup and stays read-only.
What it helps with
- restore project context after restarting a session
- record a stack decision so it survives the chat
- locate a file in an unfamiliar codebase
- inspect git hotspots and file coupling
- pull a Notion page into a task
Example prompts for the agent
- Call
set_projectwith the project path, then runrecall - Remember that SQLite was chosen for local storage
- Show the project structure two levels deep
How to install context-sync
Platform CLI
claude mcp add context-sync -- npx -y @context-sync/serverPlatform CLI
codex mcp add context-sync -- npx -y @context-sync/serverConfig file
{
"mcpServers": {
"context-sync": {
"command": "npx",
"args": [
"-y",
"@context-sync/server"
]
}
}
}Config file
{
"servers": {
"context-sync": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@context-sync/server"
]
}
}
}Platform CLI
gemini mcp add context-sync npx -y @context-sync/serverStep 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 context-sync
How do I install context-sync in Claude Code?
Run claude mcp add context-sync -- npx -y @context-sync/server, then restart your tool and check the list with claude mcp list.
What does context-sync do?
It gives an agent persistent memory for a project: stack, decisions, constraints and file structure, plus git context and Notion lookup.
What is needed for Notion support?
Run the setup wizard with context-sync-setup or npx context-sync-setup. The notion tool is read-only.