Skip to main content

Preflight Review

CI Python 3.11 to 3.15 MCP MIT licence

Launch-readiness reviews for AI agents and automations, as an MCP server.

Before a workflow that drafts customer replies, searches internal documents or moves data goes live, ask who approves its riskiest action, who can stop it, and what happens when it receives an unexpected input. Preflight asks those questions one at a time, blockers first, records the evidence for each answer, keeps the human sign-off separate from the checks, and exports a brief you can hand to a client.

  • Blocker-first checklist. Approval boundary, rollback, scope and silent failure on every review, plus checks for the kind of workflow it is.
  • Evidence and retests. Each test result needs a named owner and a control. The recommendation comes from the current results, and the brief retains earlier attempts.
  • A human decides. The decision is recorded separately and freezes the review. The brief captures the findings that were open at sign-off.
  • Linked revisions. A changed workflow starts a review that shows the old and new values and asks for fresh evidence.
  • Plain-text evidence in the brief. Preflight escapes recorded text before inserting it into Markdown, so pasted evidence cannot add sections or links.
  • Two storage modes. Local mode stores reviews in SQLite. In stateless mode, the client carries signed review records between calls.

Quick start

Preflight supports Python 3.11 to 3.15. Check the package version with uv.

uvx preflight-review-mcp --version

Add it to Claude Code with this command.

claude mcp add preflight -- uvx preflight-review-mcp

For Claude Desktop, add the server to claude_desktop_config.json.

{
  "mcpServers": {
    "preflight": { "command": "uvx", "args": ["preflight-review-mcp"] }
  }
}

To use pip, run python -m pip install preflight-review-mcp, then configure your stdio-capable client to run preflight-review-mcp. To install directly from GitHub, use python -m pip install git+https://github.com/mqfarooqi1/Preflight-MCP. If the client cannot find the command, use the full path of the executable or of the Python you installed it into with the arguments -m preflight_mcp.

Try this request in your MCP client.

Start a customer-support launch review for a workflow that drafts refund replies from our support policy. An agent reviews each draft. Our support lead can disable the workflow. Ask one question at a time. Use synthetic evidence for this demo and label it as such.

Try the demo

From the repository root, install Preflight and run the synthetic refund review through a real stdio MCP session in both storage modes.

python -m pip install .
python examples/demo.py

The demo records an approval failure, updates the control, records a passing retest, and links a follow-up review. It uses a temporary database for local mode. Read the sample client brief or see what changed in 0.2.0.

Use Preflight in Codex

In a trusted project, add this to .codex/config.toml and replace the example paths. The database setting is optional. See the Codex MCP configuration guide.

[mcp_servers.preflight]
command = "/absolute/path/to/python"
args = ["-m", "preflight_mcp"]

[mcp_servers.preflight.env]
PREFLIGHT_DB = "/absolute/path/to/client-reviews.sqlite3"

For a virtual environment named .venv, the Python executable is .venv/bin/python on macOS and Linux and .venv/Scripts/python.exe on Windows. TOML accepts forward slashes in Windows paths or backslashes in single quotes.

Start from a skill

Copy the six folders in skills/ into .agents/skills/ in the project you want to review. Keep each folder with its SKILL.md. Open the project in Codex and invoke $preflight to start, resume, or compare a review. In another Agent Skills client, import the folders according to its skill setup. Codex skills guide

Skill Use it to
preflight Choose where to begin or pick up an existing review.
preflight-scope Define the workflow and pick a template.
preflight-challenge Identify risks and define checks.
preflight-verify Record observed outcomes and follow up on failed or inconclusive checks.
preflight-handoff Export a brief and capture an explicit human decision.
preflight-compare Review what changed and identify the evidence the revision needs.

The skills also guide an unsaved draft in the conversation when the MCP server is unavailable.

Start from an MCP prompt

In local mode, clients that expose MCP prompts can use any of these entry points. You can also call the tools from a plain-language request. In stateless mode, use the tools with the current signed record.

Prompt Arguments Use it to
launch_review template (default customer_support) Start scoping a workflow.
continue_review review_id Resume the next open check from saved state.
client_handoff review_id Draft a private brief with findings and any recorded decision.

How a review runs

  1. Start with what triggers the workflow, the data it reads, the actions it can take, who approves them, and how it is stopped and undone. Pick from customer_support, document_search or internal_operations.
  2. Answer the next question. next_question returns one open check at a time, blockers first. Name an owner and the control. Add a custom check if the template misses a risk.
  3. Test the control in your test environment and record what happened, with a ticket, log or run reference. Update a failed control before retesting. Pass the tested control_version as expected_control_version to reject results for a control that changed since the test. If evidence is pending, pass the check ID in deferred_check_ids to skip the question for this session while keeping the finding open. blocked_by_deferral means the remaining checks were deferred.
  4. Decide. Record a named reviewer's explicit decision and reason. approve requires every check to pass. With findings open, the reviewer can choose approve with conditions or hold, and the decision records the open findings. Recording the decision freezes the review.
  5. Hand over the brief. client_brief exports the decision, the workflow and every check with its evidence and test history, in Markdown.
  6. Start a linked revision. Use revise_workflow when the workflow changes or provide a revision_reason to start a fresh evidence cycle after a recorded decision on the same workflow. If a custom check no longer applies, give the reason and pass its ID in omit_custom_check_ids. The original finding stays in the earlier review.
Recommendation When
blocked a blocker check is open
ready with conditions every blocker passed, other checks are open
ready for review every check passed

The recommendation is advice. The decision belongs to the named reviewer.

Tools

Tool What it does
list_templates the templates and the checks each one asks
start_review start a review and return its checklist
next_question the next open check and what to ask about it
add_review_check add a custom check to an open review
record_control name the owner and the control for a check
record_test record a test outcome and its evidence
record_decision store a named reviewer's decision and freeze the review
revise_workflow start a linked review with a fresh evidence cycle
review_record the whole review with its recommendation
client_brief the review as a Markdown brief
list_reviews saved reviews, newest first (local mode)

Every tool returns typed structured output. The server supplies read-only annotations for clients that use them. An unknown check error lists the valid checks, and an early approve names the checks still open.

Storage modes

Local (default). Reviews are kept in SQLite at ~/.preflight-review/reviews.sqlite3. Set PREFLIGHT_DB to an absolute path to keep a separate file per client. Reuse that database when resuming a review. Tools refer to reviews by review_id.

Stateless, for hosting. Start the server as preflight-review-mcp --mode stateless (or set PREFLIGHT_MODE=stateless), and set PREFLIGHT_SIGNING_KEY to a secret of at least 32 characters, the same for every copy of the server. Generate a signing key with this command.

python -c "import secrets; print(secrets.token_hex(32))"

In stateless mode, tools that load a review take the full signed object in the review argument. After a tool changes a review, keep the new review from its structured output and pass it back exactly as returned, signature included. Keep both records when creating a linked revision so you can compare them later. Preflight verifies the HMAC-SHA256 signature and rejects edited records. The client can still load any older signed version it holds. The brief prints the record's signature and last-updated time.

Reviewer responsibilities

Your team runs the workflow tests, verifies the evidence, confirms the reviewer's identity, and controls deployment. Preflight records the reported observations, references and decision. Keep customer records and secrets in their source systems.

Development

pip install -e ".[dev]"
pytest
ruff check src tests examples
python examples/demo.py

CI runs the tests and the demo on Linux, Windows and macOS with Python 3.11 to 3.15.

Licence

MIT

Metadata

Release files for preflight-review-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)

Source distribution for preflight-review-mcp 0.2.0
File Size Uploaded Provenance Actions
preflight_review_mcp-0.2.0.tar.gz 44.0 kB With provenance Details for preflight_review_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for preflight-review-mcp 0.2.0
File Interpreter ABI Platform Actions
preflight_review_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for preflight_review_mcp-0.2.0-py3-none-any.whl

Total release size: 68.3 kB

Release files / preflight_review_mcp-0.2.0.tar.gz

Download URL preflight_review_mcp-0.2.0.tar.gz
Size 44.0 kB
Tags Source
SHA-256 checksum
How to use checksums
18adac565fa806d0ebda6562f06e64f09626c80c7ec835be9370205f3e5b2718
BLAKE2b-256 checksum
How to use checksums
7e9550e28bcf8c544565ccea434514b06cf6d3f70d04a7ca7cfe8466ea5dfd0f
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 Dec 1, 2026.

Transparency log

Release files / preflight_review_mcp-0.2.0-py3-none-any.whl

Download URL preflight_review_mcp-0.2.0-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba667d3c4cc2d5f86929f3acb4ef857ed32999078d070fe7bf2d925a7c3d9bd0
BLAKE2b-256 checksum
How to use checksums
177d51290d25872155f850840f74f945bd395b3c24955a474f6c4ac409493df8
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 Dec 1, 2026.

Transparency log

Security for preflight-review-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.

Select from 2 files

Attestation for preflight_review_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 Dec 1, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page