handoff-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@handoff-mcp save our progress and next steps for the JWT auth task"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TaskHandoff
DeepSeek-friendly long-task project memory & cross-session handoff for coding agents.
长任务做到一半换会话 / 上下文被压掉 / 换模型 —— Agent 忘了目标、决策和下一步。
TaskHandoff 把状态写进仓库.handoff/:任何能读项目文件的 Harness 都能恢复任务状态,并拿到结构化的下一步上下文。
「能恢复」有自动化测试证据;「LLM 一定把活干完」仍需 harness 级评测。
Repo | |
Skill name |
|
CLI |
|
MCP |
|
Harness | Skill + CLI + MCP 同一 |

init→save --auto→recall --brief→doctor
怎么录 / 怎么重渲:examples/how-to-record-gif.md
Continuity evidence(跨会话可恢复)
命令 / 材料 | 角色 |
| 完整 CI 证据(hooks 闭环、 |
| 约 15 秒 smoke demo(显式 save → recall only;不覆盖 hooks/--auto/toy) |
真人跨会话:Session A |
# Full evidence (what CI runs via pytest -q):
pytest tests/test_continuity.py -q
# Quick human-readable smoke (not a substitute for the suite):
python scripts/continuity_proof.pyThe suite proves disk-level continuity across independent processes.
LLM execution quality still requires harness-level evaluation.
Details: examples/continuity-proof.md
30 秒心智模型
会话 A 干到一半 → handoff save [--auto] → 写入 .handoff/
新开会话 / 换模型 → handoff recall --brief → 恢复 goal + next 1..3
(Agent 可据此继续;执行成败取决于模型/harness)文件 | 作用 |
| 长期记忆(偏好、架构、坑) |
| 上一会话状态 + 下一步 3 条 |
| 结构化待办与决策日志 |
Related MCP server: SuperBased Observer
安装(推荐最低完整版)
需要 Python 3.9+,零第三方运行时依赖。
git clone https://github.com/sutongwuyanzu/TaskHandoff.git
cd TaskHandoff
pip install -e .
# 验证
handoff --version
# 或
python -m taskhandoff --versionMCP(stdio,零额外依赖)
pip install -e .
handoff-mcp
# 或
python -m taskhandoff.mcp_server把 stdio server 配进 Claude Desktop / Cursor 等(示例:examples/mcp-config.sample.json,说明:references/mcp.md)。
不装包也可以用 CLI:
python scripts/handoff_cli.py init --root /path/to/project装成 Agent Skill
# 一键脚本(推荐)— 在仓库根目录执行
# Windows PowerShell:
powershell -ExecutionPolicy Bypass -File scripts/install-skill.ps1
# macOS / Linux:
bash scripts/install-skill.sh
# 或手动
cp -r TaskHandoff ~/.claude/skills/task-handoff装好后对 Agent 说:交接 / 接着做 / handoff。SKILL.md 是剧本;handoff CLI / MCP 是执行层。
快速演示:init → save → recall
在任意项目里:
cd /path/to/your-app
# 1) 初始化(每个仓库一次)
handoff init --root .
# 2) 会话结束前交接(推荐 --auto:自动带上 git 变更/最近 commit)
handoff save --root . --auto \
--goal "Ship JWT auth" \
--done "Middleware scaffolded" \
--decision "Refresh token in httpOnly cookie" \
--next "Finish refresh endpoint" \
--next "Add 401/403 tests" \
--next "Document env vars" \
--memory-delta "Auth: access token memory-only; refresh httpOnly cookie"
# 3) 新会话只读 brief(短、稳、给 Agent 直接开干)
handoff recall --root . --brief
# 4) 需要全文时
handoff recall --root . --budget 2500
# 5) 健康检查(含密钥扫描)
handoff doctor --root .
handoff status --root .自然语言(Agent 读 SKILL.md)
你说 | Agent 应做 |
交接 / handoff |
|
接着做 / continue / resume |
|
记住我们用 pnpm |
|
handoff 状态 |
|
示例交接包
完整样例见 examples/filled-LATEST.md。
recall --brief 输出形态:
# Resume brief (TaskHandoff)
- project: `your-app`
- goal: Ship JWT auth
- next:
1. Finish refresh endpoint
2. Add 401/403 tests
3. Document env vars
- instruction: Execute next action #1 now. ...安全
默认拒绝把疑似密钥写进 handoff(GitHub PAT、JWT、私钥块、常见
api_key=等)误报时才用:
handoff save ... --allow-secrets(不推荐)handoff doctor会扫描已有LATEST.md
目录结构
TaskHandoff/
SKILL.md # Agent skill 剧本
taskhandoff/ # 可安装 Python 包(CLI)
scripts/handoff_cli.py # 兼容入口
templates/ # MEMORY / handoff 模板
references/ # schema + DSH 接入说明
examples/ # 示例流程、filled handoff、真人 dogfood
docs/ # 非产品文档(含 DSH 沟通笔记)
tests/ # pytest 契约测试
pyproject.toml项目内生成:
your-app/.handoff/
config.json
MEMORY.md
todos.json
decisions.jsonl
handoffs/LATEST.md
handoffs/LATEST.json契约说明:references/schema.md
DeepSeek Harness (DSH)
类型:Skill + CLI + MCP(同一
.handoff/契约)无私有二进制格式:纯 Markdown + JSON
Token 预算:
recall --budget/--brief发布后接入计划:references/deepseek-notes.md(公开 API 落地后再接,不自称 DSH-ready)
更多示例
真人跨会话 dogfood:examples/dogfood-20260813.md
演示用交接包(非真人记录):examples/filled-LATEST.md
会话 Hook 样例:examples/hooks/(SessionStart → recall,SessionEnd → save)
本仓库自用状态:
.handoff/(handoff recall --root . --brief)
开发与测试
pip install -e ".[dev]"
pytest -q
handoff info --root .CI:GitHub Actions 在 main 上跑 Python 3.9 / 3.12。
设计原则
Portable — 状态在仓库里,不绑云
Token-thrifty — 固定章节 + brief
Harness-agnostic — Claude Code / Codex / 未来 DSH
Safe by default — 密钥扫描
Roadmap
可安装 CLI(
handoff)save --auto(git + 上次 handoff)recall --brief固定复述密钥拒绝写入 +
doctorpytest 契约测试
纯 stdlib MCP server(同一
.handoff/契约)GitHub Actions CI + skill 安装脚本 + 仓库 dogfood
会话 hook 样例(Claude Code / generic / DSH 映射)
README 终端 GIF(
assets/terminal-demo.gif+ 可重渲脚本)真人跨会话 dogfood(2026-08-13:save → 关聊天 → recall --brief)
License
MIT
Available Tools
6 toolshandoff_doctorB
Health-check .handoff/ and scan LATEST.md for possible secrets.
Inputs: root.
handoff_initA
Initialize .handoff/ memory layout in a project (once per repo).
Inputs: root, language.
handoff_memory_appendA
Append durable project memory, or show MEMORY.md if text is empty.
Inputs: root, text.
handoff_recallA
Load handoff context for a new session. Default brief=true returns a short resume brief (token-thrifty).
Inputs: root, brief, budget.
handoff_saveA
Save a long-task handoff pack into .handoff/. Prefer auto=true. Provide goal and up to 3 next_actions when possible. Never include API keys or tokens.
Inputs: auto, body, done, file, +12 more.
handoff_statusB
Show .handoff/ status, goal, and next actions.
Inputs: root.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct operation (init, save, recall, status, memory append, doctor), but recall and status both read project state, and memory_append has dual read/write behavior. Descriptions help clarify, but a minor overlap exists.
All tools share the handoff_ prefix and use snake_case, but the command words vary in type: init/save/recall are verbs, while status and doctor are nouns, and memory_append is a compound. The style is consistent overall with minor deviations.
Six tools is well-scoped for a handoff management server, covering setup, save, load, status, memory, and health check without being excessive or too thin.
The core lifecycle of handoff management is covered: init, save, recall, status, and health check. Missing operations like explicit delete or list of prior handoffs are minor and agents can work around them.
Related MCP Connectors
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Project management MCP for AI agents with safe task reads and writes.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives your agent a persistent project brain: vision, architecture decisions, conventions, roadmaps, and automatic session handoff.2 npm7MIT
- FlicenseNot gradedqualityAmaintenanceLocal MCP server that lets your AI coding agent query its own cross-tool project history - file/command freshness, past test failures, cost & token spend, cache status, and session handoff - over stdio, 100% local, no telemetry.63-
- FlicenseNot gradedqualityDmaintenanceCentralized multi-project state & handoff MCP server that lets AI agents save checkpoints in one session and resume in another with minimal token overhead, including git snapshots and code-graph integration.-
- AlicenseNot gradedqualityBmaintenanceLocal-first MCP server that persists AI coding agent memory and session context, enabling seamless resume across sessions with searchable memories and checkpoints.7 npm1MIT