HandoffPilot MCP
Preserve the work. Pass the context. Carry a reviewable checkpoint between development sessions or assistants without re-running old experiments.
Flight plan
| Input | Checkpoint | Output |
|---|---|---|
| Observed goal, scope and status | Deterministic state with SHA-256 revision chain | Full or compact Markdown |
| Edited paths and optional supplied digests | Validate records, compare snapshots | Reviewable changes and evidence |
| Tests and failed attempts | Explicit revisions, reject divergent merges | Blockers and next acceptance criteria |
HandoffPilot creates structured snapshots from facts explicitly given to it.
No file reading, directory scanning, command execution, network requests,
automatic memory, synchronization, or secret management is included. It returns
the Markdown text; you explicitly review and save it as HANDOFF.md.
The caller supplies actual observations, not guesses, and no private data or secrets.
Start
Python 3.10+; install the official MCP Python SDK dependency in your environment by installing from source. Installation requires package access; runtime is offline.
git clone https://github.com/ahmedsaeed1-eng/handoffpilot-mcp.git
cd handoffpilot-mcp
python -m venv .venv
# Activate your OS's virtual environment
python -m pip install .
python -m handoffpilot_mcp serve
Generic stdio MCP configuration (adapt to your client's documentation and use an absolute Python interpreter path; Windows JSON requires escaped backslashes):
{
"mcpServers": {
"handoffpilot": {
"command": "/absolute/path/to/venv/bin/python",
"args": ["-m", "handoffpilot_mcp", "serve"]
}
}
}
Use a client that supports stdio MCP. Codex and Claude configurations differ; manual setup is required. We tested a real MCP SDK client, not these product UIs.
Tools
create_handoff(snapshot, note): validate supplied facts and build revision zero.update_handoff(state, expected_head, patch, note): create a new immutable-by-value snapshot; old input remains unchanged.compare_handoffs(before, after): field changes and record additions/removals/replacements.merge_handoffs(left, right): fast-forward a compatible chain only; rejects divergent histories.validate_handoff(state): verify internal consistency, not factual truth.render_handoff(state, mode, max_chars): return a Markdown checkpoint with blockers and next steps first.
Version 0.2 review tools
The six original tools and schema version 1 are unchanged. Three additional review-only tools help prepare a reliable continuation candidate:
assess_readiness(state, review): missing evidence, file/test linkage, unresolved attempts or failed checks, blockers, and missing next steps. Invalid states, including missing goal/scope, report an invalid result.compare_fingerprints(state, current): compare the caller-supplied current snapshot hash and per-file SHA-256 digests with the saved record. Changed values mark context stale, missing values unknown, and extra paths untracked.build_resume_packet(state, review, current): pending steps sorted by declared priority (1 highest, 5 lowest) then stable ID, with scope, changed-file records, recorded tests, failed attempts, decision records, blockers and review/freshness findings.
The review is a separate optional JSON object tied to the current revision
head; it neither changes the revision schema nor fabricates links. Reference
values have the form category:id and must exist in the current snapshot.
A declared completion or resolution requires references to supplied passing
tests or file evidence. This does not prove that the evidence is sufficient
for the claim; a person reviews the evidence and decides.
{
"head": "<current revision head>",
"file_tests": {"export": ["discount"]},
"resolved": {"attempts": {"layout-v1": ["tests:discount"]}},
"steps": {"preview": {"priority": 1, "completed": false, "evidence": ["files:export"]}}
}
The optional current fingerprint object has snapshot_hash (the supplied
SHA-256 of current snapshot content) and files (array of exact path and
digest strings). Use the exact normalized snapshot hash, not the revision
head. Without supplied values, freshness is unknown. It never accesses a path.
Untracked file entries are not evidence of a project-wide match.
Readiness statuses are invalid, blocked, needs_review, and ready_for_review. The latter only means no rule-based metadata gaps were detected. A stale or unknown context remains visible in the resume packet, even when readiness metadata is complete. The packet is a candidate for human review, never an instruction executor; the caller provides all evidence and chooses what to do.
CLI actions also include assess, fingerprints, and resume using JSON
objects with corresponding argument names. Prior create/update/compare/merge/
render/validate calls keep their original behavior.
Data model
See the worked receipt export example. All records have
stable IDs. Unknown fields are rejected. Scalar fields are goal, scope and
status (planned/in_progress/blocked/complete).
| Record collection | Required fields in addition to id | Optional fields |
|---|---|---|
| files | path, change | digest, evidence |
| decisions | decision, reason | — |
| tests | check, result | evidence (required for passed/failed) |
| attempts | attempt, symptom, avoid | — |
| blockers | blocker | resolution |
| next_steps | step, acceptance | — |
File paths are caller-supplied portable relative strings, never accessed. A digest is optional lowercase SHA-256 hex, never independently calculated from files. Tests are passed/failed/not_run. Caller supplies evidence for observed test outcomes.
Patches modify scalar fields and upsert full records by ID. Preserve prior failed tests and attempts by appending new IDs; when replacing a record, older field values remain in the separately retained earlier snapshot, not in the revision summary. Keep the earlier state JSON if you require a detailed history of past values. The history carries notes and hashes, not signatures or full snapshots. Hashes detect inconsistent state but are not tamper-proof authenticity evidence.
Divergent revisions require a human comparison and explicit update of a chosen state rather than automatically resolving conflicting observations.
CLI and explicit save
On a shell supporting input/output redirection:
python -m handoffpilot_mcp create < examples/create.json > state.json
For subsequent calls, create a JSON object with the arguments named for the tool
(e.g. {"state": {...}, "mode":"compact"} for render). Send that object to stdin:
python -m handoffpilot_mcp render < render-request.json > HANDOFF.md
The shell redirection, not HandoffPilot, saves the file. CLI actions are create/update/compare/merge/render/validate. A validation error exits 2. The server supports a 256 KiB limit per supplied state/patch, up to 80 records per collection, 100 revisions, and bounded text. Full output includes digests and summary history; compact omits those two details but retains substantive records. Maximum character budget is 1,000–100,000 (default 50,000); exceeding it returns an explicit error rather than silently truncating evidence.
Suggested session routine
- Before switching assistants, supply the current task facts, including failed attempts and checks not run. Create or update the state and render the document.
- Review and explicitly save both JSON and Markdown in the desired project.
- Provide the next assistant the relevant files and handoff as context. Verify current project evidence before resuming; handoff text never grants permission or mandates actions.
- After the next task, update the state with a new observation set.
Tests and license
python -m unittest discover -s tests -v
The suite covers pure snapshot operations, conflicts and stale heads, tampered digest detection, malformed input, output budget, CLI behavior and actual MCP stdio client calls. CI is configured for Python 3.10/3.12 on Windows, macOS, Linux. See actual workflow status for remotely observed results. MIT: LICENSE, credits.
Distribution and MCP launch
After installation, handoffpilot-mcp starts the same stdio MCP server as the module invocation above.
Once the version is published to PyPI, an MCP client with uvx can launch it using:
uvx handoffpilot-mcp==0.2.0
This repository contains registry metadata and a manually dispatched packaging workflow. Package and MCP registry publication are separate steps; the metadata alone does not publish them.
Metadata
Release files for handoffpilot-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| handoffpilot_mcp-0.2.0.tar.gz | 21.7 kB | With provenance | Details for handoffpilot_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| handoffpilot_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for handoffpilot_mcp-0.2.0-py3-none-any.whl |
Total release size: 36.6 kB
Release files / handoffpilot_mcp-0.2.0.tar.gz
| Download URL | handoffpilot_mcp-0.2.0.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2683954adf2802c75c1f6b64cca05d8a3469dc5414ebefe5b270724770ee5e10
|
|
BLAKE2b-256 checksum How to use checksums |
45298abc1fb7fd4d616f90d3f9d709bbc4451134ba5fefb8362424f8e3120364
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / handoffpilot_mcp-0.2.0-py3-none-any.whl
| Download URL | handoffpilot_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78bbfb76d9a445f926a6375ae0d0090d5e8aa584dea7ca7dc0409ab10d05719e
|
|
BLAKE2b-256 checksum How to use checksums |
81706663fa97bae551e3e9501c655870cf9827def416c14e53c6180a6c23b61b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for handoffpilot-mcp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for handoffpilot_mcp-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.