you send
Variants to beat in baseline_assets, who it is for, and optional verified_facts / banned_claims.
Preflight decide picks the real winner 7 times out of 10, 14% more often than Claude Fable 5.2. 72.3% (402/556) against 63.3% (352/556) on 139 real Meta image ad pairs.
One endpoint, 3 tools, private to your account. evolve writes stronger messaging or image briefs and ranks them. decide compares versions side by side and returns a prediction_id. report grades real outcomes and rebates 100% of verified requests.
# 1. Install the Agent Skills (Claude Code, Cursor, Codex):
npx skills add MikeKovetsky/preflight
# 2. Connect the hosted MCP server (OAuth 2.1, free $10 balance):
claude mcp add --transport http preflight https://preflight.tech/api/mcp
# Optional: static API key instead of OAuth:
# claude mcp add --transport http preflight https://preflight.tech/api/mcp --header "Authorization: Bearer $PREFLIGHT_API_KEY"# Claude.ai / Claude Desktop / ChatGPT (Custom Connector, OAuth 2.1):
# Settings -> Connectors -> Add custom connector -> paste URL:
https://preflight.tech/api/mcp
# Or Claude Desktop via claude_desktop_config.json (API key):
{
"mcpServers": {
"preflight": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://preflight.tech/api/mcp",
"--header",
"Authorization: Bearer pf_live_YOUR_KEY"
]
}
}
}{
"mcpServers": {
"preflight": {
"url": "https://preflight.tech/api/mcp",
"headers": {
"Authorization": "Bearer ${env:PREFLIGHT_API_KEY}"
}
}
}
}# ~/.codex/config.toml
[mcp_servers.preflight]
url = "https://preflight.tech/api/mcp"
bearer_token_env_var = "PREFLIGHT_API_KEY"{
"mcpServers": {
"preflight": {
"type": "http",
"url": "https://preflight.tech/api/mcp",
"headers": {
"Authorization": "Bearer ${PREFLIGHT_API_KEY}"
}
}
}
}curl -s https://preflight.tech/api/mcp \
-H "Authorization: Bearer $PREFLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {
"name": "decide",
"arguments": {
"surface": "landing_page",
"goal": "maximize free-trial signups",
"audience": "US B2B finance leads at 50-500 person companies",
"variants": [
{"id": "v1_baseline", "is_baseline": true, "text": "Modern cloud accounting for growing finance teams"},
{"id": "v2_proof_cta", "text": "Close your books in 3 days, not 3 weeks. Free 14-day trial."}
]
}
}
}'import json, os, urllib.request
payload = json.dumps({
"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {
"name": "decide",
"arguments": {
"surface": "ad",
"audience": "US skincare shoppers browsing Instagram",
"variants": [
{"id": "ad_01", "media": ["https://preflight.tech/sample/ad_01_thumb.jpg"]},
{"id": "ad_02", "media": ["https://preflight.tech/sample/ad_02_thumb.jpg"]},
],
},
},
}).encode()
req = urllib.request.Request(
"https://preflight.tech/api/mcp",
data=payload,
headers={
"Authorization": f"Bearer {os.environ['PREFLIGHT_API_KEY']}",
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream",
},
)
with urllib.request.urlopen(req, timeout=120) as resp:
body = json.loads(resp.read())
res = body["result"]
if res.get("isError"):
raise RuntimeError(res["content"][0]["text"])
out = res["structuredContent"]
print(out["verdict_status"], out["verdict_reason"])
for item in out["items"]:
print(item["rank"], item["id"], item["hybrid_score"])preflight-mcp v0.16.0 · Streamable HTTP · OAuth 2.1 & Bearer keys · Claude, ChatGPT, Cursor, Codex & CI
evolvecurl -s https://preflight.tech/api/mcp \
-H "Authorization: Bearer $PREFLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {
"name": "evolve",
"arguments": {
"surface": "ad_copy",
"audience": "US B2B finance leads at 50-500 person companies",
"baseline_assets": ["Close your books in 3 days, not 3 weeks"],
"verified_facts": ["Month-end close in 3 days"]
}
}
}'Variants to beat in baseline_assets, who it is for, and optional verified_facts / banned_claims.
Ranked final_winners and a prediction_id receipt. Winner must beat baseline in a fresh 4-answer check (evolve benchmark).
report tool, on the live endpointPress Run to call the live endpoint.decide returnsPreflight compares two variants side by side, in both orders, and forces a choice. You get a ranked list, verdict_status (DECISIVE_WIN when all 4 answers on the top two agree, TIED_LOW_SIGNAL when it is too close to call), the reason and suggested changes.
Returned on every decide and evolve run with pre-registered variant hashes. Pass it back to report after your live test settles to grade accuracy and claim a 100% credit rebate.
tools/listCompare 2 to N variants side by side and pick the likely winner. Returns a prediction_id receipt for outcome rebates.
~$0.07 per requestPick the likely winner among 2..N user-facing variants using blind forced-choice pairwise comparison. Two variants are shown side by side in both presentation orders, with 4 answers on the deciding pair. verdict_status='DECISIVE_WIN' only when all 4 answers agree, else TIED_LOW_SIGNAL (too close to call). Returns ranked items (rank, hybrid_score win share, metadata.judge), a prediction_id receipt for report, and when feedback=true (default), meta.judge.why_winner (up to 3 reasons the winner leads) plus next_mutations (up to 3 concrete changes to strengthen the runner-up). Works across still image ads, landing page / UI / paywall / pricing screenshots, live public URLs (fetch_url=true), emails, headlines, CTAs, and product concepts. Passing a single variant returns an error (pass 2+ variants to compare, or call evolve to write and compare alternatives). Video variants are unsupported and return an explicit error.
evolve to generate alternatives from 1 baseline). Pass plain strings for fast copy/CTA comparisons, or objects: {id, label?, is_baseline?, media=[{url_or_path, role?}] or [url], url?, text?, headline?, subheadline?, body?, cta?, description?, price?, problem?, solution?, current_alternative?, proof?, source_ad?, channel?, format?, device?, metadata?}.audience_url, a variant url, or the variant copy (one small extra model call) and returns them in meta.audience with meta.audience_inferred_from.audience is empty, Preflight reads this page (SSRF-guarded) to infer who the buyers are. Ignored when audience or context.brain.audience is set.landing_page_hero, ad_copy, google_rsa, modal, email) are normalized automatically.search_term_view) grounding Google Search RSA ads or Query->Ad->LP message match.decide and evolve). Accepts a plain text string (brief, product notes, landing page copy, customer reviews), a bare https:// website URL, a bare BusinessBrain JSON (projected dict or raw nodes graph), or any loose dict ({brain?, buyer_voice?, economics?, ...}). Preflight automatically distills long or messy context into a clean, neutral 1-2 line grounding for the judge (stripping marketing opinions) and echoes what it understood in meta.context_used.evolve.meta.judge.why_winner (up to 3 reasons the winner leads) and next_mutations (up to 3 changes that would make the runner-up stronger). Set false to skip feedback.feedback, still accepted. False on either one skips the feedback.Write stronger messaging or image briefs and rank them. Returns a prediction_id receipt; real-traffic lift is still being measured.
~$0.20 per loopNatural selection for copy and images, run before launch. For copy: runs a full multi-round write, lint, and rank loop in one call (decoupled unanchored fresh angles plus contrastive surgical edits, Challengers-vs-Leaders BTL ranking, Top-3 4-answer finalist shootout, and fresh 4-answer exit check). For images (cooperative mode, auto-triggered whenever any item in baseline_assets or candidates includes media, or when previous_state resumes an image run): Preflight does not generate images itself. Instead, each call executes one stateless round: it compares your rendered images visually head-to-head with the benchmarked vision judge and returns awaiting_render=true, render-ready next_briefs (visual prompt, linted on_image_text/copy, parent_id for edits), and state. Render next_briefs with your own image generator or design tool, then call evolve again with candidates + previous_state=state until awaiting_render is false (or pass finalize=true on your final batch). Candidates are compared with the direct forced-choice judge (both presentation orders) and the final winner must beat the baseline in a fresh 4-answer check, or overfit_warning is set; pass real past_results from the same audience when available to calibrate both writer and judge. Validate the top 2-3 diverse variants from final_winners in a live test. Supports surfaces: ui, cta, onboarding, paywall, pricing, modal, landing_page, landing_page_hero, brand, ad, ad_copy, google_rsa, concept.
media (e.g. ['https://...']) to trigger cooperative image evolution. May be empty on follow-up image rounds when previous_state is passed.context or audience_url is set).audience and context are empty, Preflight reads this page to infer the target buyers and extract neutral product facts identically to decide.decide and evolve). Accepts a plain text string (brief, product notes, landing page copy, customer reviews), a bare https:// website URL, a bare BusinessBrain JSON (projected dict or raw nodes graph), or any loose dict ({brain?, buyer_voice?, economics?, ...}). Preflight compiles it once: the judge gets the exact same clean, neutral 1-2 line grounding as decide (stripping marketing opinions), while the writer and compliance gates automatically extract all concrete facts, offers, numbers, buyer quotes, and banned claims. Returned in meta.context_used.cta, 30 for google_rsa).search_term_view queries for google_rsa or hero message match.next_briefs ({id, media: ['https://...'], on_image_text?, headline?, primary_text?, cta?, angle?, origin?, parent_id?}). Omitted copy/angle metadata is automatically restored from previous_state by matching id.state object returned by the previous cooperative image evolve call. Pass it back along with newly rendered candidates so Preflight continues round tracking, carried leaders, losing angles, and cumulative pairwise votes without re-judging prior pairs.next_briefs, run the Top-3 finalist shootout and fresh 4-answer exit check against the baseline, and return final winners (awaiting_render=false).verified_facts is non-empty, reject candidates introducing ungrounded numeric stats/prices/years.evolve then runs up to 3 rounds and stops as soon as a round leaves the top pick unchanged. Pass a number to run up to that many rounds instead; it still stops early on plateau or budget cap.keep_assets (default: 0.60).Submit real post-launch results for a prediction_id to grade accuracy and earn a 100% credit rebate (or grade a stateless evaluation at $0).
Free + 100% rebateSubmit real post-launch results ($0, zero-LLM) for a prior decide or evolve prediction_id to grade accuracy, verify same-era outcome hygiene, and earn an automatic 100% credit rebate when supplied variants match the pre-registered SHA-256 hashes (up to the monthly cap). For rebate eligibility, each variant row in outcomes must include exposure meeting at least one minimum (impressions >= 200, clicks >= 20, conversions >= 5, spend >= 10, or sample_size >= 100) and non-zero metric spread. Alternatively, omit prediction_id and pass evaluation for pure stateless NumPy grading.
impressions >= 200, clicks >= 20, conversions >= 5, spend >= 10, or sample_size >= 100) per row to unlock the 100% rebate.decide or evolve request. Required for automatic 100% credit rebates and account run-history grading.prediction_id. Verified against the pre-registered SHA-256 hashes to unlock the 100% credit rebate and opt-in to anonymized training data.public=true (e.g. 'SaaS pricing page hero').EvaluationResult from decide when grading locally without a prediction_id.Pay per request at cost (~$0.07/compare), 3× monthly plans from $20/mo, or 100% rebates via report