MCP server for transferring conversation context between AI chats or different projects within the same AI. - Audit Logging (v0.7.0+): Optional structured JSONL logging for diagnostics (--audit flag) - Verbatim Conversation Saving (v0.6.1+): AI saves complete conversations without summarization or abbreviation - Merge Handoffs (v0.6.0+): Combine multiple related handoffs into one unified context -
Add this skill
npx mdskills install trust-delta/conversation-handoff-mcpWell-documented MCP server enabling conversation context transfer with auto-connect and interactive UI
MCP server for transferring conversation context between AI chats or different projects within the same AI.
--audit flag)handoff_saveWorks with Claude Desktop, Claude Code, Codex CLI, Gemini CLI, and other MCP clients.
| Client | Config File |
|---|---|
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Claude Code | ~/.claude/settings.json |
| Codex CLI | ~/.codex/config.toml |
| Gemini CLI | ~/.gemini/settings.json |
| Cursor | ~/.cursor/mcp.json |
| ChatGPT Desktop | In-app settings (Developer Mode) |
No pre-installation required - runs via npx.
{
"mcpServers": {
"conversation-handoff": {
"command": "npx",
"args": ["-y", "conversation-handoff-mcp"]
}
}
}
For global installation:
npm install -g conversation-handoff-mcp
git clone https://github.com/trust-delta/conversation-handoff-mcp.git
cd conversation-handoff-mcp
npm install
npm run build
MCP configuration:
{
"mcpServers": {
"conversation-handoff": {
"command": "node",
"args": ["/path/to/conversation-handoff-mcp/dist/index.js"]
}
}
}
Note: Codex CLI uses TOML format. See Codex MCP documentation for details.
Save conversation context. Key and title are auto-generated if omitted (v0.4.0+). The conversation field stores the complete verbatim content — AI is instructed not to summarize or abbreviate messages (v0.6.1+).
// With explicit key and title
handoff_save(
key: "project-design",
title: "Project Design Discussion",
summary: "Decided on MCP server design approach",
conversation: "## User\nQuestion...\n\n## Assistant\nAnswer..."
)
// Auto-generated key and title (v0.4.0+)
handoff_save(
summary: "Decided on MCP server design approach",
conversation: "## User\nQuestion...\n\n## Assistant\nAnswer..."
)
// → key: "handoff-20241208-143052-abc123" (timestamp + random)
// → title: "Decided on MCP server design approach" (from summary)
Get list of saved handoffs (summaries only).
handoff_list()
Load full content of a specific handoff.
handoff_load(key: "project-design")
handoff_load(key: "project-design", max_messages: 10) // Last 10 messages only
Delete handoffs.
handoff_clear(key: "project-design") // Specific key
handoff_clear() // Clear all
Merge multiple related handoffs into one. Useful for combining discussions from separate sessions.
// Merge two handoffs (chronological order by default)
handoff_merge(keys: ["session-1", "session-2"])
// With custom key and delete sources
handoff_merge(
keys: ["design-v1", "design-v2", "design-v3"],
new_key: "design-final",
new_title: "Final Design Document",
delete_sources: true,
strategy: "sequential"
)
| Parameter | Required | Default | Description |
|---|---|---|---|
keys | Yes | - | Array of handoff keys to merge (min 2) |
new_key | No | auto | Key for merged handoff |
new_title | No | auto | Title for merged handoff |
new_summary | No | auto | Summary for merged handoff |
delete_sources | No | false | Delete source handoffs after merge |
strategy | No | "chronological" | "chronological" (by creation time) or "sequential" (array order) |
Check storage usage and limits.
handoff_stats()
For MCP Apps-compatible clients, handoff_list automatically opens an interactive UI. Non-compatible clients receive the standard JSON response.
Note: According to the MCP Apps specification,
sendMessageshould add messages directly to the conversation and trigger a model response. However, Claude Desktop's current implementation inserts the message into the chat input field instead, requiring the user to press Enter. When you click "Load", the handoff content will be inserted into the input field - press Enter to send it to Claude. This behavior is expected to improve in future Claude Desktop updates.
Starting with v0.4.0, the server automatically starts in the background when an MCP client connects. No manual setup required!
[User launches Claude Desktop]
→ MCP client starts
→ Scans ports 1099-1200 in parallel for existing server
→ If no server found: auto-starts one in background
→ Connects to server
→ (User notices nothing - it just works!)
[User launches Claude Code later]
→ MCP client starts
→ Scans ports 1099-1200 in parallel
→ Finds existing server
→ Connects to same server
→ Handoffs are shared!
| Mode | When | Behavior |
|---|---|---|
| Auto-Connect (default) | No HANDOFF_SERVER set | Discovers or auto-starts server |
| Explicit Server | HANDOFF_SERVER=http://... | Connects to specified URL |
| Standalone | HANDOFF_SERVER=none | No server, in-memory only |
Handoff data is stored in memory only:
When the shared server goes down during operation:
[Server stops unexpectedly]
→ User calls handoff_save()
→ Request fails (connection refused)
→ Auto-reconnection kicks in:
→ Rescan ports 1099-1200 for existing server
→ If found: connect to it
→ If not found: start new server in background
→ Retry the original request
→ User sees success (transparent recovery!)
HANDOFF_RETRY_COUNT (default: 30)The server automatically shuts down after a period of inactivity:
HANDOFF_SERVER_TTL environment variable0 to disable auto-shutdownStandard configuration (recommended) - Just works with auto-connect:
{
"mcpServers": {
"conversation-handoff": {
"command": "npx",
"args": ["-y", "conversation-handoff-mcp"]
}
}
}
Specify custom server:
{
"mcpServers": {
"conversation-handoff": {
"command": "npx",
"args": ["-y", "conversation-handoff-mcp"],
"env": {
"HANDOFF_SERVER": "http://localhost:3000"
}
}
}
}
Force standalone mode (no server):
For Claude Desktop only. Claude Desktop cannot transfer conversations between projects by default, but since it shares memory space as a single app, this MCP server enables handoffs between projects. Claude Code and CLI tools run as separate processes per tab/session, so handoffs don't work in this mode.
{
"mcpServers": {
"conversation-handoff": {
"command": "npx",
"args": ["-y", "conversation-handoff-mcp"],
"env": {
"HANDOFF_SERVER": "none"
}
}
}
}
If you prefer manual control:
# Default port (1099)
npx conversation-handoff-mcp --serve
# Custom port
npx conversation-handoff-mcp --serve --port 3000
| Method | Path | Description |
|---|---|---|
| POST | /handoff | Save a handoff |
| POST | /handoff/merge | Merge multiple handoffs |
| GET | /handoff | List all handoffs |
| GET | /handoff/:key | Load a specific handoff |
| DELETE | /handoff/:key | Delete a specific handoff |
| DELETE | /handoff | Delete all handoffs |
| GET | /stats | Get storage statistics |
| GET | / | Health check |
Scenario: Design discussion in Claude Desktop → Implementation in Claude Code
In Claude Desktop - Have a design discussion:
User: Let's design an authentication system for my app.
Assistant: I recommend using JWT with refresh tokens...
[detailed discussion continues]
Save the conversation - When ready to hand off:
User: Save this conversation for implementation in Claude Code.
Assistant: (calls handoff_save)
✅ Handoff saved with key: "auth-design-20241208"
In Claude Code - Load and continue:
User: Load the auth design discussion.
Assistant: (calls handoff_load)
# Handoff: Authentication System Design
[Full conversation context loaded]
I see we discussed JWT with refresh tokens. Let me implement that...
Key Points:
Note: The server automatically starts in the background when the first MCP client connects. No manual startup required.
Customize behavior via environment variables.
| Variable | Default | Description |
|---|---|---|
HANDOFF_SERVER | (auto) | none for standalone, or explicit server URL |
HANDOFF_PORT_RANGE | 1099-1200 | Port range for auto-discovery |
HANDOFF_RETRY_COUNT | 30 | Auto-reconnect retry count |
HANDOFF_RETRY_INTERVAL | 10000 | Auto-reconnect interval (ms) |
HANDOFF_SERVER_TTL | 86400000 (24h) | Server auto-shutdown after inactivity (0 = disabled) |
HANDOFF_AUDIT | (disabled) | true or 1 to enable audit logging (same as --audit) |
| Variable | Default | Description |
|---|---|---|
HANDOFF_MAX_COUNT | 100 | Maximum number of handoffs |
HANDOFF_MAX_CONVERSATION_BYTES | 1048576 (1MB) | Maximum conversation size |
HANDOFF_MAX_SUMMARY_BYTES | 10240 (10KB) | Maximum summary size |
HANDOFF_MAX_TITLE_LENGTH | 200 | Maximum title length |
HANDOFF_MAX_KEY_LENGTH | 100 | Maximum key length |
{
"mcpServers": {
"conversation-handoff": {
"command": "npx",
"args": ["-y", "conversation-handoff-mcp"],
"env": {
"HANDOFF_MAX_COUNT": "50",
"HANDOFF_MAX_CONVERSATION_BYTES": "524288"
}
}
}
}
## User
User's message
## Assistant
AI's response
The handoff_load output includes security markers to protect against prompt injection attacks:
This prevents malicious content stored in handoffs from being interpreted as AI instructions.
MIT
trust-delta
Install via CLI
npx mdskills install trust-delta/conversation-handoff-mcpConversation Handoff MCP is a free, open-source AI agent skill. MCP server for transferring conversation context between AI chats or different projects within the same AI. - Audit Logging (v0.7.0+): Optional structured JSONL logging for diagnostics (--audit flag) - Verbatim Conversation Saving (v0.6.1+): AI saves complete conversations without summarization or abbreviation - Merge Handoffs (v0.6.0+): Combine multiple related handoffs into one unified context -
Install Conversation Handoff MCP with a single command:
npx mdskills install trust-delta/conversation-handoff-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
Conversation Handoff MCP works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.