Skip to main content
Glama
claude.ai chat (phone / web)             Claude Code (desktop / CLI)
  "handoff this"   "any reports?"          /pickup       /handoff
        │                ▲                    ▲             │
        ▼                │                    │             ▼
┌──────────────────────────────────────────────────────────────────┐
│  handoff-mcp: Cloudflare Worker + D1, GitHub sign-in             │
│  H-7K2 handoffs · R-7K2 reports · per-repo notes                 │
└──────────────────────────────────────────────────────────────────┘
  • Handoffs (H-7K2) are self-contained briefs: goal, context, decisions, open questions, done-when checks. Status goes pending → claimed → done / blocked. A claim nobody touches for 24 hours goes back to pending.

  • Reports (R-7K2) are what Code sends back. Answering a blocked handoff's questions from your phone puts it back to pending for the next /pickup.

  • Project notes are lasting facts per repo (setup, commands, conventions). Notes under the repo * apply everywhere. /pickup loads them with the task.

  • Repos are matched by git remote, however it is spelled: git@github.com:Me/x.git, https://github.com/me/x and github.com/me/x are the same repo. Without a remote, the folder name is used (local/<name>).

It runs on the Cloudflare Workers free plan. Each person deploys their own copy, so nobody else holds your data.

1. Deploy the server

You need a Cloudflare account and Node 20 or newer.

  1. Create a GitHub OAuth app at https://github.com/settings/developers → New OAuth App:

    • Homepage URL: https://handoff-mcp.<your-subdomain>.workers.dev

    • Authorization callback URL: https://handoff-mcp.<your-subdomain>.workers.dev/callback

    Keep the client ID and generate a client secret. The server only uses GitHub to learn who signed in (public profile, no scopes) and does not keep the GitHub token.

  2. Create the storage and configure:

    npm install
    cp wrangler.example.jsonc wrangler.jsonc
    npx wrangler login
    npx wrangler kv namespace create OAUTH_KV
    npx wrangler d1 create handoff

    Put the two ids into wrangler.jsonc (git ignores it, so your deployment details stay out of the repo), and set vars:

    • PUBLIC_URL: https://handoff-mcp.<your-subdomain>.workers.dev

    • ALLOWED_GITHUB_USERS: your GitHub login (comma-separated for several; * lets anyone with GitHub sign in and get their own private space).

  3. Set secrets, create the tables, deploy:

    npx wrangler secret put GITHUB_CLIENT_ID
    npx wrangler secret put GITHUB_CLIENT_SECRET
    npx wrangler secret put COOKIE_SECRET        # 32+ random characters
    npm run db:migrate:remote
    npm run deploy

Opening PUBLIC_URL in a browser shows the connector URL.

Related MCP server: agent-bridge

2. Connect claude.ai

  1. In claude.ai, open Settings → Connectors → Add custom connector and enter https://handoff-mcp.<your-subdomain>.workers.dev/mcp. Sign in with GitHub when asked. Connectors you add on the web also work in the mobile app.

  2. In each claude.ai Project, add one line to the project instructions naming its main repo. It is the default: a conversation that is about another repo (one attached to it, or named in it) hands off to that repo instead.

    repo: github.com/<owner>/<name>
    When I say "handoff" or "send to Code", use the handoff connector.
  3. Optional but recommended: upload the handoff-chat skill. Chats don't get slash commands, so this skill is what makes "handoff this" in a chat as dependable as /handoff in Claude Code: it holds the checklist for a good brief, how to pick the repo, and how to follow up on reports.

    npm run build:skill    # writes dist/handoff-chat.zip

    In claude.ai, open the skills section of Settings (under Capabilities), upload dist/handoff-chat.zip, and turn it on. Skills you enable on claude.ai also sync into Claude Code; there the plugin's commands take precedence, as the skill itself says.

Then, in a chat: "handoff this to Code", "any reports?", "what's the status of H-7K2?", "answer H-7K2: use 5 minutes", "remember that the broker is on 10.0.0.5".

3. Set up Claude Code

The tools. If Claude Code is signed in with your claude.ai account (the default, and always the case in the Claude desktop app's Code tab), the connector from step 2 is already there: claude.ai connectors sync into Claude Code. Nothing to do.

If you use Claude Code with an API key instead, add the server yourself and sign in with /mcp:

claude mcp add --transport http --scope user handoff https://handoff-mcp.<your-subdomain>.workers.dev/mcp

Don't do both, or every tool shows up twice.

The plugin adds the /pickup, /handoff, /note commands and the session-start notice. It carries no server config of its own, so it works with either setup above.

  1. Install it from this repo:

    claude plugin marketplace add <owner>/handoff-mcp
    claude plugin install handoff@handoff
  2. Optional, for the "📬 handoffs waiting" line when a session starts: run /handoff-setup and put the two values it gives you in ~/.claude/settings.json:

    {
      "env": {
        "HANDOFF_URL": "https://handoff-mcp.<your-subdomain>.workers.dev",
        "HANDOFF_TOKEN": "hk_..."
      }
    }

    That token can only read the list of pending handoffs.

Commands

Command

What it does

/pickup

Claims the pending handoff for this repo. With several, lists them so you choose.

/pickup H-7K2

Claims that one, from any folder.

/pickup --all

Lists pending handoffs in every repo.

/handoff [done|blocked|paused]

Reports on the handoff this session is working on. With none, hands the session over to claude.ai so you can carry on from your phone.

/note <fact>

Saves a lasting note for this repo (--global for all repos). /note list, /note forget <topic>.

/handoff-setup

Creates the token for the session-start hook.

MCP tools

Tool

Purpose

handoff_create

New handoff, from chat or Code, for the other side

handoff_list

Open handoffs by default; filter by repo, target, status

handoff_get

Full brief, thread and notes, without claiming

handoff_claim

Start work (by id, or the single pending one for a repo)

handoff_report

done, blocked with questions, or in_progress

handoff_reply

Answer questions; reopens blocked (or, if asked, done) handoffs

handoff_cancel

Drop a handoff

repos_list

Repos with open handoffs and notes

notes_get, note_save, note_delete

Project notes

hook_token

Create, list or revoke session-start hook tokens

The server also sends usage instructions to clients when they connect, so claude.ai knows how to write a good brief without extra setup.

Security

  • Every row is scoped to your GitHub user id, so a shared deployment (ALLOWED_GITHUB_USERS=*) keeps users apart.

  • Sign-in uses @cloudflare/workers-oauth-provider: dynamic client registration, PKCE, a consent page that shows which app is asking and where the sign-in goes, and browser-bound state for the consent and GitHub steps.

  • Hook tokens are stored as SHA-256 hashes and can only read pending handoff titles.

  • Anything you put in a handoff or note is stored in your Cloudflare D1 database. Don't put secrets in them.

Development

cp .dev.vars.example .dev.vars
npm run db:migrate:local
npm run dev
npm test          # node:test against SQLite with the real migrations
npm run typecheck

On Windows, if wrangler fails with internal error for local D1, the project path is too long for the local database file. Add --persist-to C:\wr (any short folder) to both the migrate and dev commands.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      The self-hosted MCP bridge between Claude Chat and Claude Code.
      46
      AGPL 3.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables coordinating Claude Code and Codex across separate Git worktrees with shared issue ownership, file reservations, messages, and explicit handoffs.
      280 PyPI
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to route JSON-RPC and SSE traffic through a Cloudflare Workers relay that adds project-scoped persistent context, multi-tenant isolation, per-tenant rate limiting, opt-in edge caching, and durable request logging while transparently proxying everything else to upstream MCP servers. It also serves local tools for storing project notes, recalling recent activity, and retrieving session summaries as Markdown.
      1
      MIT