@voyageurworks/handoff-desk

中文文档
1.0.3发布于 2026/11/03MITES Module构建来源已验证

Hand tasks from Claude Code or Cursor to a personal agent that reads a folder of markdown notes.

原始使用文档
文档目录15 节
  1. Try it
  2. In 30 seconds
  3. How it works
  4. Quick start (5 minutes, no real agent needed)
  5. Connect your client
  6. Connect your agent
  7. Compatibility
  8. Use
  9. Settings
  10. Try it without a real agent
  11. Safety
  12. Limits
  13. Troubleshooting
  14. Development
  15. License

handoff-desk

Hand tasks from your coding session to a personal agent, and read the answer back.

npm CI Security License: MIT Node

handoff-desk is a small MCP server that runs on your computer. When you tell Claude Code, Cursor, Codex or another MCP client to "hand this to my agent", it writes a markdown note into a folder you own, optionally emails the agent a heads-up, and later reads the agent's reply from the same note.

  • No hosted service, no account, no telemetry. Everything is files on your disk.
  • Works with any agent that can read a folder, a private git repository or a mailbox. The format is plain markdown.
  • Safe by default. Requests that look like they contain a password or key are refused, git transports are restricted, and text from the agent is marked as untrusted.
  • Reviewable. Every task and answer is a note you can read, diff and delete.

Try it

npx -y @voyageurworks/handoff-desk init ~/handoff-demo

That creates a demo desk. The five-minute walkthrough below (add it to Claude Code, answer with a stand-in agent) needs nothing else installed but Node.js 22 or newer.

In 30 seconds

You, in Claude Code:  "Hand this to my agent: book the dentist for Friday at 3."
handoff-desk writes:  Desk/2026-11-02 Item 01 - Book dentist.md   (status: waiting)
Your agent (any):     reads the note, does the task, writes "## Reply", sets status: done
You, same chat:       "What did my agent say?"  ->  the reply, read back from that note

Not to be confused with the "handoffs" inside an agent framework (one agent passing a conversation to another inside a single run). This is asynchronous and between separate programs: your coding assistant writes a note, a different agent (on your PC, in the cloud, or a person) answers when it can, and the note stays on disk as the record.

Status: 1.0. The tools and the note format are stable. Agent coverage is narrow: it is tested on every change with the bundled stand-in agent, and was tried with one real cloud agent over git and email (five rounds on 2026-10-26, all passed). Other agents are untested. See Compatibility.

How it works

sequenceDiagram
    participant You as You + MCP client
    participant HD as handoff-desk (on your computer)
    participant Desk as Desk folder / private git repo
    participant Agent as Your agent
    You->>HD: handoff_send("book the dentist")
    HD->>Desk: write Desk/2026-10-29 Item 01 - dentist.md (status: waiting)
    HD-->>Agent: optional doorbell email
    Agent->>Desk: read note, do the task, write "## Reply", status: done
    You->>HD: handoff_wait / handoff_read
    HD->>Desk: read (and pull, with git)
    HD-->>You: the agent's reply

More detail, including the folder layout and the git flow, is in docs/architecture.md.

Quick start (5 minutes, no real agent needed)

You need Node.js 22 or newer (this includes npm) and git. pnpm works too.

1. Create a demo desk. init creates Desk/, Inbox/, mail/ and a handoff.md template. Running it again never overwrites your edits. Nothing to install first; npx fetches the package from npm:

npx -y @voyageurworks/handoff-desk init ~/handoff-demo

2. Add the server to Claude Code (other clients: docs/clients.md). On macOS and Linux:

claude mcp add handoff-demo -e HANDOFF_DIR="$HOME/handoff-demo" -- npx -y @voyageurworks/handoff-desk

On Windows PowerShell, run npx through cmd /c and write the double dash in quotes (PowerShell 5.1 drops a bare --, and claude then reports missing required argument 'commandOrUrl'):

claude mcp add handoff-demo -e HANDOFF_DIR="$HOME/handoff-demo" '--' cmd /c npx -y '@voyageurworks/handoff-desk'

3. Start the stand-in agent in a second terminal and leave it running. It answers every waiting item with a fixed line. In macOS or Linux shells:

HANDOFF_DIR="$HOME/handoff-demo" npx -y @voyageurworks/handoff-desk stand-in

In Windows PowerShell:

$env:HANDOFF_DIR = "$HOME/handoff-demo"
npx -y @voyageurworks/handoff-desk stand-in

4. Try it. Start a new Claude Code session (servers load at startup) and say: "Hand this to my agent as a question using the handoff-demo tools: reply with pong." Claude calls handoff_send, then handoff_wait, and shows the stand-in's reply. Open ~/handoff-demo/Desk/ to see the note flip from status: waiting to status: done.

5. Clean up. Stop the stand-in (Ctrl+C) and run claude mcp remove handoff-demo. Delete ~/handoff-demo if you like.

Something not working? See docs/troubleshooting.md.

Building from source instead (contributors)

The same server, run from a clone of this repository. In the quick-start steps above, use node /absolute/path/to/handoff-desk/dist/main.js wherever they say npx -y @voyageurworks/handoff-desk.

1. Install and build (macOS, Linux and Windows):

git clone https://github.com/voyageurworks/handoff-desk.git
cd handoff-desk
npm install
npm run build

With pnpm: pnpm install && pnpm build.

Releases are published to npm from GitHub Actions with a provenance statement; npm install -g @voyageurworks/handoff-desk also installs a handoff-desk command.

2. Create a demo desk. init creates Desk/, Inbox/, mail/ and a handoff.md template. Running it again never overwrites your edits.

node dist/main.js init ~/handoff-demo

3. Add the server to Claude Code (other clients: docs/clients.md). Use the absolute path to dist/main.js (on Windows with forward slashes, for example C:/Users/you/handoff-desk/dist/main.js):

claude mcp add handoff-demo -e HANDOFF_DIR="$HOME/handoff-demo" -- node /absolute/path/to/handoff-desk/dist/main.js

In Windows PowerShell 5.1, write the double dash in quotes. PowerShell drops a bare --, and claude then reports missing required argument 'commandOrUrl':

claude mcp add handoff-demo -e HANDOFF_DIR="$HOME/handoff-demo" '--' node C:/absolute/path/to/handoff-desk/dist/main.js

4. Start the stand-in agent in a second terminal and leave it running. It answers every waiting item with a fixed line. In macOS or Linux shells:

cd handoff-desk
HANDOFF_DIR="$HOME/handoff-demo" node dist/main.js stand-in

In Windows PowerShell:

cd handoff-desk
$env:HANDOFF_DIR = "$HOME/handoff-demo"
node dist/main.js stand-in

Connect your client

Any client that can run a stdio MCP server works. You give it a command, its arguments and the environment variable HANDOFF_DIR.

ClientGuide
Claude Codeclaude mcp add (above)
Cursormcp.json, see docs/clients.md
VS Code (Copilot agent mode).vscode/mcp.json, see docs/clients.md
Codex (CLI and IDE)codex mcp add or config.toml, see docs/clients.md
Claude Desktopclaude_desktop_config.json, see docs/clients.md
Windsurf, Gemini CLI, otherssame shape, see docs/clients.md

Connect your agent

Pick the line that matches where your agent runs.

  1. On the same computer. The agent reads Desk/ directly. Nothing else to set up.
  2. In the cloud. A cloud agent cannot see your folder, so make the desk a private git repository the agent can read and push to. Put the desk folder inside a clone of it. Syncing turns on by itself (HANDOFF_SYNC=auto) when the folder is a git work tree with an upstream branch. Details, the exact note format and the rules to give the agent: docs/cloud-agents.md.
  3. Watching a mailbox. The optional doorbell email carries the whole request. Set the mail variables below. Never use your normal password: use an app password, ideally fetched by a command so no file holds it (docs/keeping-secrets.md).

Whichever you pick, give the agent the rules in your handoff.md and tell it to write its answer under ## Reply and set status: done.

Compatibility

AgentStatus
Bundled stand-in (stand-in command)Tested on every change
Operating systems and shellsTests run on Linux, macOS and Windows on every change. The quick start runs under bash and zsh on Linux and macOS, and in Windows PowerShell 5.1 by hand
Cursor, VS Code (Copilot), Claude Desktop, CodexThe config examples in docs/clients.md are launched by a test and complete an MCP handshake. The editors themselves are not run in CI
One real cloud agent, over git and emailFive rounds passed on 2026-10-26. A re-run the next day without the email doorbell was only partly answered, because that agent checks the desk on a schedule; with the doorbell on it is expected to react sooner but that has not been re-tested
Any other agent that can read markdown files in a folder or repositoryExpected to work, not tested. docs/live-acceptance.md is the checklist for trying yours

Use

Ask Claude: "Hand this to my agent: book the dentist for Friday at 3." Claude calls handoff_send, then handoff_wait or handoff_read to get the reply.

ToolWhat it does
handoff_sendErrand, question or status for the agent (note plus optional doorbell email)
handoff_statusOne-line status update
handoff_list, handoff_readSee items and read one in full
handoff_waitWait up to 50 seconds for the agent's answer (call again to keep waiting)
handoff_capabilitiesWhat your handoff.md says the agent may do alone, must ask first, or never do
handoff_inbox, handoff_inbox_replyRead and answer notes the agent left for Claude

If no doorbell is configured, handoff_send still writes the note and returns the email it would have sent, so Claude can send it another way.

Settings

Set these as environment variables in your MCP client's config.

VariableDefaultMeaning
HANDOFF_DIR~/handoffDesk folder
HANDOFF_MAIL_USERnoneSender address for the doorbell
HANDOFF_MAIL_APP_PASSWORDnoneApp password for that sender (never your normal password)
HANDOFF_MAIL_PASSWORD_COMMANDnoneA command that prints the app password, run only when a doorbell is sent, so no file holds it (password manager, encrypted store; see docs). Used when HANDOFF_MAIL_APP_PASSWORD is not set
HANDOFF_ENV_FILEnonePath to a private file of NAME=value lines (any setting in this table). Keeps the app password out of your MCP client's config. Real environment values win over the file. Keep the file outside the desk repository and readable only by you
HANDOFF_MAIL_TOnoneThe agent's mailbox
HANDOFF_SMTP_HOST, HANDOFF_SMTP_PORTsmtp.gmail.com, 465Mail server
HANDOFF_MAIL_DIR<HANDOFF_DIR>/mailWhere email copies go
HANDOFF_TZsystem zoneTime zone for timestamps
HANDOFF_SYNCautoauto: sync through git when HANDOFF_DIR is a work tree with an upstream. git: require it (an error otherwise). off: local folder only
HANDOFF_REMOTEnoneClone this repository into HANDOFF_DIR the first time a desk tool is used
HANDOFF_GIT_NAME, HANDOFF_GIT_EMAILthe repository's git config, else handoff-deskIdentity for the desk's commits
HANDOFF_INBOX_DIRInboxFolder where the agent leaves notes for Claude
HANDOFF_SUBJECT_PREFIXHandoffSubject of the doorbell email: [<prefix> errand #3] ...

Try it without a real agent

The quick start uses the stand-in. To rehearse the cloud path, clone your private desk repository a second time, set HANDOFF_DIR to that second clone and run node dist/main.js stand-in --git. It reaches the desk only through the git remote, like a cloud agent would. stand-in --once answers what is waiting and exits.

Safety

  • Anything that looks like a password, code, token or key is refused before it is written or emailed. This is pattern matching, not a guarantee: do not put secrets in requests.
  • Use a private repository for a git-synced desk. Every task and reply is pushed to its remote and kept in its history.
  • Do not put an access token inside HANDOFF_REMOTE (a URL like https://token@host/...): git stores the URL in plain text in the clone's config. Use your normal git credential helper or an SSH key instead.
  • Your agent acts with your authority, and some agents act on your behalf in ways that bind you. Read handoff.md before relying on it, and keep the "ask first" and "never" lists honest.
  • Text from web pages or emails is not your instruction. Say so in your handoff.md (the template does).
  • Check your agent's own terms of service before you automate anything around it: many restrict automation, minimum age or commercial use.

Limits

  • There is no hosted mode and no push notification in 1.0. A cloud agent reaches the desk through git (see above); nothing else carries its reply back.
  • The agent must be able to read the desk (folder, or git repository) or the doorbell email, and to write its reply into the note (and push it, for a cloud agent). If it cannot, handoff_wait times out.
  • Nothing here is instant: the agent has to notice the note or email, do the task, and push.
  • One real cloud agent has been tried so far (five rounds on 2026-10-26: an errand, a question, a status line, a request that needed approval and was declined, and a page with an injected instruction that was ignored). Without the email doorbell, an agent that only checks the desk on a schedule answers late or not within handoff_wait's 50 seconds. Other agents are untested. docs/live-acceptance.md is the checklist for trying yours.
  • On a network that swallows packets, one git step can take up to a minute before it gives up, so a call can run longer than your client allows. Run it again: nothing is lost, and a note that was committed goes up with the next call.
  • If two senders file the same item number at the same moment, the one that pushes second renames its own note. For a short time the remote can hold both under one number; handoff_read then shows the older note with a warning.
  • Notes are plain text on your disk and, with git, in your repository's history; anyone with access can read them.

Troubleshooting

docs/troubleshooting.md covers the usual problems: no tools showing up, handoff_wait timing out, a refused request, a silent doorbell and git sync questions.

Development

pnpm install
pnpm check   # type-check
pnpm test    # full suite, including an end-to-end test over real stdio

See CONTRIBUTING.md. Please read SECURITY.md before reporting a security problem, and follow the code of conduct.

License

MIT

版本与发布记录

@voyageurworks/handoff-desk 共发布 4 个版本,首次发布于 2026/11/02;过去 12 个月发布了 4 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.0.3latest2026/11/03今天
1.0.22026/11/03今天
1.0.02026/11/021 天前
0.0.0-stage2026/11/021 天前

关于 @voyageurworks/handoff-desk 的常见问题

@voyageurworks/handoff-desk 是什么?

将克劳德代码或光标中的任务交给个人代理,该代理读取标记笔记文件夹。

如何安装 @voyageurworks/handoff-desk?

在项目目录运行 npm install @voyageurworks/handoff-desk,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 handoff-desk,可以用 npx handoff-desk 直接运行。

@voyageurworks/handoff-desk 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/voyageurworks__handoff-desk 是否存在。

@voyageurworks/handoff-desk 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@voyageurworks/handoff-desk 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@voyageurworks/handoff-desk 可以商用吗?

@voyageurworks/handoff-desk 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@voyageurworks/handoff-desk 还在维护吗?

最新版本 1.0.3 发布于 2026/11/03(今天);至今共发布 4 个版本,其中过去 12 个月发布了 4 个;首次发布于 2026/11/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。