-
Purpose conversation-handoff-mcp is an MCP server used to pass conversation context between AI chats, or between different projects within the same AI. It is designed as a lightweight temporary clipboard: data exists only in memory and is not written to disk, making it suitable for sharing context during active sessions.
-
Main Capabilities
-
Handoff save and load: handoff_save saves conversation context; key and title can be omitted and are automatically generated (v0.4.0+). The conversation field stores the complete verbatim content, and the AI is instructed not to summarize or abbreviate messages (v0.6.1+). handoff_load loads the complete content of a specified handoff.
-
Listing and retrieval: handoff_list returns only summaries to save context, along with metadata such as message count, size, status, and next action (v0.11.0+). handoff_search (v0.12.0+) supports multi-condition filtering using structured tags (such as project:foo, issue:176) as well as text, project, AI, status, and date range.
-
Merge and delete: handoff_merge (v0.6.0+) merges multiple related handoffs into a unified context; deletion of handoff records is supported.
-
Tags and comments: handoffs can be marked with structured tags (v0.12.0+); annotations/comments can be added for cross-session context (v0.10.0+).
-
Sender metadata (v0.14.0+): optional from_project / spawner_dispatch_id / sender_agent_id let the orchestrator record who sent the handoff; the server imposes no format requirements and outputs nothing when unset. On merge, it is retained only if all source handoffs agree on that field.
-
Prompt injection protection (v0.14.0+): handoff_load returns stored content within untrusted content markers, including a warning banner, a one-time boundary token (the content cannot forge the end marker), and code fences widened beyond the longest backtick string in the body; structured content fields remain unwrapped.
-
Other: server restart (v0.9.0+), audit logging (v0.7.0+, optional JSONL, enabled with --audit), MCP Apps UI (v0.5.0+) providing an interactive interface for browsing and managing handoffs, auto-connect (v0.4.0+), auto-reconnect (v0.4.0+).
III. Usage Use via npm (recommended): No pre-installation required, run via npx. Fill in the MCP configuration in the configuration file (Codex CLI uses TOML format). Three MCP client configurations are provided: standard configuration (recommended, works automatically once connected), specify a custom server, and force standalone mode (no server).
IV. Storage and Operation Modes
- In-memory storage: Data is stored only in memory and shared across all connected MCP clients via the HTTP server; it is lost once the server process stops; no files are written. When the limit is reached, the oldest handoff is automatically deleted on a FIFO basis without error.
- Auto-connect: As of v0.4.0+, when an MCP client connects, the server automatically starts in the background with no manual setup required.
- Auto-reconnect: When the server is interrupted, it retries according to HANDOFF_RETRY_COUNT (default 30), and on final failure it outputs the pending content for manual recovery; other clients automatically discover the new server on their next request.
- Automatic server shutdown (TTL): By default it shuts down after 24 hours without requests; configurable via HANDOFF_SERVER_TTL, set to 0 to disable.
- Manually starting the server is also supported (optional).
V. Applicable Scenarios and Limitations Applicable scenarios: Handoffs between different projects within Claude Desktop (Claude Desktop by default cannot transfer conversations between projects, but as a single application it shares a memory space, and with this server, handoffs between projects can be achieved); handoffs between different MCP clients, for example doing design discussions in Claude Desktop and loading and continuing the implementation in Claude Code. Example flow: When saving, generate a key for handoff_save (e.g., auth-design-20241208); when loading, use handoff_load to load the complete context, including code snippets and decisions, with no manual copy-paste required.
Limitations: Data is stored only in memory and is lost once the server process stops, so it is not suitable for long-term persistence. Claude Code and CLI tools run as independent processes per tab/session, and handoffs do not work in this mode. Regarding sendMessage in the MCP Apps specification, the specification requires that the message should be added directly to the conversation and trigger a model response, but the current implementation in Claude Desktop inserts it into the chat input box, requiring the user to press Enter to send; the official expectation is that future Claude Desktop updates will improve this behavior. Prompt injection protection is a mitigation rather than a guarantee; the model may still be influenced by sufficiently persuasive text, and handoffs from untrusted senders should be handled with caution.this behavior. Prompt injection protection is a mitigation rather than a guarantee; the model may still be influenced by sufficiently persuasive text, and handoffs from untrusted senders should be handled with caution.