Claude Context Sync

io.github.ybin4548Published by GitHub account ybin4548v0.4.1Updated Oct 24, 2026

Share context, detect conflicts, and message across parallel Claude Code sessions

The publisher's own server: Claude Platform Docs

Overview

AI-generated overview

Shares context, detects file and symbol conflicts, and relays messages between parallel Claude Code sessions on the same machine.

What you can do
  • List active Claude Code sessions with status, task summary and conflicts
  • Read a session's structured summary, re-summarizing it when stale, and collect changed files and decisions across sessions with optional project filtering
  • Send messages to another session or broadcast to a project, and read a session's message history
  • Clear resolved files from the conflict tracking list
When to use it
Useful when you run several Claude Code sessions in parallel on one machine and want each to know what the others are doing, avoid editing the same file or symbol, and pass notes between terminals.
Requirements
Local stdio process installed from npm (npx or global install plus an init command). Needs Node.js 20+, the Claude Code CLI (claude command) for summarization, and jq for the conflict detection hook. Desktop only; no API keys or environment variables declared.
Before you install
It watches Claude Code session logs and writes summaries, conflict data and messages under the user's home directory, and summarization invokes the Claude CLI, which may consume usage or cost. The init command registers a hook that injects conflict alerts and unread messages into sessions. Tracked data is described as removed when sessions end.

Installation

In SourceWeft

  1. Open Claude Context Sync in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

claude-context-sync

[npm] [License: MIT]

MCP server that automatically summarizes and shares context across parallel Claude Code sessions.

When you run multiple Claude Code sessions on different tasks, each session is unaware of what the others are doing. claude-context-sync watches your session logs, generates structured summaries on demand, and provides real-time file conflict detection and cross-session messaging.

Features

  • Session context sharing — any session can see what others are working on
  • File conflict detection — real-time alerts when multiple sessions edit the same file
  • Symbol-level conflicts — detects shared function/class/interface edits (TypeScript, Python, Swift, Go, Rust)
  • Cross-session messaging — send messages between sessions without switching terminals
  • Lazy evaluation — zero cost when tools aren't called
  • Auto-cleanup — tracked data is removed when sessions end

Installation

bash
npm install -g claude-context-synccontext-sync init

That's it. The next time you open Claude Code, the MCP server starts automatically. The init command also registers a conflict detection hook.

MCP Tools

list_sessions

Returns active Claude Code sessions with their current status, task summary, and any file conflicts.

get_session_context

Returns the full structured summary for a specific session. Automatically re-summarizes if stale. Includes conflict information.

Parameters: sessionId (string)

get_all_changes

Returns changed files and decisions across all sessions, with optional project filtering.

Parameters: project (string, optional)

send_message

Sends a message to another session. Omit targetSessionId to broadcast to all sessions in the same project.

Parameters: fromSessionId (string), message (string), project (string), targetSessionId (string, optional)

get_messages

Returns message history for a session.

Parameters: sessionId (string), unreadOnly (boolean, optional)

resolve_conflicts

Clears resolved files from the conflict tracking list.

Parameters: sessionId (string), files (string[])

How It Works

Context Sharing

[Always running] Watcher: detects .jsonl changes → sets stale flag (zero cost)                    ↓[On tool call]   MCP Tool invoked → summarizes only stale sessions                    ↓                 Extractor → Generator (claude -p) → Store → Response

Conflict Detection

[Always running] Watcher: detects .jsonl changes                    ↓                 FileTracker: parses Write/Edit tool_use events                    ↓                 SymbolResolver: identifies enclosing function/class/type                    ↓                 Writes per-session touched files
[Every message]  Hook (UserPromptSubmit): checks for new conflicts                    ↓                 Alerts Claude once per new conflict → Claude notifies user

Messaging

Session A: send_message → writes to ~/.claude/context-sync/messages/{targetId}/                    ↓Session B: Hook detects unread message → injects into AI context                    ↓           Claude reads and relays to user → marks as read

Architecture

Single MCP server process — no separate daemon. Claude Code launches it automatically via stdio transport.

src/├── mcp/server.ts              # MCP server + 6 tools├── watcher/│   ├── watcher.ts             # File watching (chokidar)│   ├── scheduler.ts           # Hybrid summarization strategy│   ├── file-tracker.ts        # Real-time file edit tracking│   └── symbol-resolver.ts     # Pattern-based symbol detection├── summarizer/│   ├── extractor.ts           # .jsonl parsing + stratified sampling│   └── generator.ts           # claude -p invocation├── messaging/│   └── messenger.ts           # Cross-session message passing├── store/store.ts             # Local summary cache├── cli.ts                     # CLI (init + serve + hook registration)└── types.ts                   # Shared types

Summarization Strategy

  • Incremental: updates existing summary with new messages (default)
  • Full: regenerates from scratch (after 4 incremental updates)
  • Stratified sampling: for large sessions (500+ messages), samples head + middle + tail
  • Cached: returns stored summary if nothing changed (zero cost)

Supported Languages (Symbol Detection)

LanguageDetected Symbols
TypeScript/JavaScriptfunction, class, interface, type, enum, const
Pythondef, class
Swiftfunc, class, struct, protocol, enum, extension
Gofunc, type (struct/interface)
Rustfn, struct, enum, trait, impl

Unsupported file types fall back to file-level conflict detection.

Requirements

  • Node.js 20+
  • Claude Code CLI (claude command available)
  • jq (for conflict detection hook)

Feedback

We'd love to hear from you! If you have feature requests, bug reports, or just want to share how you use claude-context-sync:

Development

bash
git clone https://github.com/ybin4548/claude-context-sync.gitcd claude-context-syncnpm installnpm run buildnpm test

License

MIT

Source: README.md at commit 0f1880c

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.4.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Claude integrations