Preflight Review
<!-- mcp-name: io.github.mqfarooqi1/preflight-review -->
# Preflight Review
[](https://github.com/mqfarooqi1/Preflight-MCP/actions/workflows/ci.yml)



**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, someone should ask: who approves its riskiest action, who
can stop it, and what happens when it gets an input it was never meant to see?
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, not opinion.** A test result needs a named owner and a control
first, and the recommendation comes from the results alone.
- **A human decides.** The decision is recorded separately and freezes the
review. A plain *approve* needs every check passed; anything still open has
to be approved with conditions or held, and the brief says what was open.
- **Revisions keep history.** A changed workflow starts a linked review that
lists what changed and asks for fresh evidence.
- **A brief that cannot be forged.** Text a reviewer records is rendered as
plain text, so a pasted line cannot add a section or a disguised link to the
client's copy.
- **Runs locally, or stores nothing.** Reviews live in SQLite on your machine,
or, for hosting, travel with the client as signed records.
## Quick start
Python 3.11 to 3.15. Run it with [uv](https://docs.astral.sh/uv/), no install
step needed:
```sh
uvx preflight-review-mcp --version
```
Add it to Claude Code:
```sh
claude mcp add preflight -- uvx preflight-review-mcp
```
Or to Claude Desktop, in `claude_desktop_config.json`:
```json
{
"mcpServers": {
"preflight": { "command": "uvx", "args": ["preflight-review-mcp"] }
}
}
```
Without uv: `pip install preflight-review-mcp`, then use the command
`preflight-review-mcp`. From source: `pip install
git+https://github.com/mqfarooqi1/Preflight-MCP`. If the client cannot find the
command, give it the full path of the executable, or the Python it was installed
into with the arguments `-m preflight_mcp`.
Then try:
> 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.
To watch a whole review run through a real MCP client, in both storage modes:
```sh
python examples/demo.py
```
## 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 a
template: `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.
3. **Test the control** in your test environment and record what happened,
with a ticket, log or run reference. Failed or inconclusive checks come back
for a retest.
4. **Decide.** A named reviewer records approve, approve with conditions, or
hold. The review freezes.
5. **Hand over the brief.** `client_brief` exports the decision, the workflow
and every check with its evidence, in Markdown.
6. **When the workflow changes,** `revise_workflow` starts a linked review.
| Recommendation | When |
|---|---|
| **blocked** | a blocker check has not passed |
| **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 |
| `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 of a changed workflow |
| `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, and the read-only ones are marked
as such, so a client does not have to ask before calling them. Mistakes come
back as plain explanations: an unknown check lists the real ones, 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. 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:
```sh
python -c "import secrets; print(secrets.token_hex(32))"
```
Preflight then stores nothing. Each tool takes the current review record and
returns the updated one, signed with HMAC-SHA256. A record edited anywhere but
in Preflight's own tools, such as an outcome flipped to passed or a decision
deleted to unfreeze it, no longer matches its signature and is refused. This is
the mode for platforms whose copies keep no disk between runs. A complete
review is about 3 KB. The signature cannot stop a client from going back to an
older record it was given earlier, so the brief prints the record's signature
and its last-updated time.
## What Preflight does not do
It does not run your workflow, call external systems, or check evidence
against them: it records what reviewers report. It does not authenticate
reviewers; the reviewer's name is whatever the caller supplies. Store
references and observations in it, not customer records or secrets.
## Development
```sh
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
TDQS
Scored across 10 tools
Each tool has a largely distinct role: template listing, review starting/listing/revising, per-check recording, and final output are separable. The closest pairs are review_record vs client_brief (same data, different rendering) and start_review vs revise_workflow, which descriptions clarify but not perfectly.
Seven tools follow a clear verb_noun pattern (list_templates, start_review, record_control, revise_workflow), but next_question, review_record, and client_brief break it with noun-first or bare-noun names. Readable overall, but the convention is not uniform.
Ten tools is a well-scoped set for a guided review workflow, with each tool covering a distinct step from template discovery through recording evidence to final brief. No tool feels redundant or padded.
The surface covers the full review lifecycle: discover templates, start/resume, step through checks, record control/test/decision, revise for changes, and export. Minor gaps exist around editing or withdrawing an already recorded result and archiving/closing stale reviews.