Preflight

io.github.dainidude由 GitHub 帳號 dainidude 發布v0.1.0更新於 Nov 14, 2026

Pay-per-call smart-contract security: scans, tx simulation, and token risk via x402 (USDC on Base).

發布方自己的服務:Preflight

已驗證Streamable HTTP可網頁執行金融安全與監控

概覽

AI 產生的概覽

遠端 MCP 伺服器,讓助理按次付費進行智慧合約安全檢查:Solidity 掃描、交易模擬與代幣風險判定。

可以做什麼
  • 掃描 Solidity 原始碼並回傳附嚴重程度評分的安全判定
  • 針對合約模擬交易,回傳回滾原因、gas 用量、餘額變化與發現項目,支援快速與深度模式
  • 在交易前檢查代幣合約的蜜罐行為、轉帳稅率與擁有者權限
  • 查詢服務資訊與價格表
適用情境
適合助理審查 Solidity 合約、在送出交易前做預檢,或在交易前篩選代幣,且你願意按次以 Base 上的 USDC 付費。
執行需求
遠端 streamable HTTP 端點,不需安裝套件或本機執行環境。未宣告驗證或請求標頭。付費工具需透過 x402 以 Base 主網 USDC 付款,因此需要能簽署 x402 付款且有資金錢包;價格查詢工具免費。
安裝前請注意
多數工具每次呼叫都會花真實資金(Base 主網 0.01 至 0.25 USDC),涉及錢包或簽章能力;README 提到真實付款需使用有資金的臨時錢包。合約原始碼與交易資料會傳送給第三方服務。判定結果僅供參考,不能取代你自己的審查。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Preflight,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.dainidude%2Fpreflight/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "preflight": {
      "type": "http",
      "url": "https://preflight--preflight-api-mcp.modal.run/mcp"
    }
  }
}

README

Preflight — x402-paid smart-contract pre-flight security API

Pay-per-call security scans and transaction simulations for AI agents. POST Solidity source or a transaction, receive a severity-scored, EIP-712-attested verdict: looks_ok | review | block. Payments over the x402 protocol (HTTP 402 + real USDC on Base mainnet).

Built from the product plan in dud3-vault/LLM/2026-11-08 - x402 Product Plans.md by hermes + omp + crush + opencode in a 4-pane Herdr session.

Try it

bash
# no wallet needed (server DEV_MODE=1):uv run uvicorn preflight.api.app:app --port 8000 &uv run python client/pay_client.py --dev
# real x402 payment (funded burner, $0.01):uv run python client/pay_client.py
# the handshake, by hand:curl -i -X POST http://127.0.0.1:8000/v1/scan -H 'Content-Type: application/json' \  -d '{"source":"contract A {}"}'# → 402, PAYMENT-REQUIRED header (base64 JSON requirements)# → retry with PAYMENT-SIGNATURE header → verdict + PAYMENT-RESPONSE

Endpoints & prices

RoutePrice
POST /v1/scan — single-file security scan (solc+Slither + 5 custom DeFi detectors)$0.01
POST /v1/sim — transaction pre-flight simulation (RPC eth_call, revert decode)$0.05
POST /v1/scan/project — multi-file project scan$0.10
POST /v1/address-risk — address risk heuristics$0.005
GET / GET /health GET /metrics GET /llms.txt GET /.well-known/x402.jsonfree

First 10 scans/day per client are free (funnel). 10 req/min per payer.

Architecture

client/pay_client.py        paying demo agent (402 → x402.client pay → retry)src/preflight/  core/    pipeline (solc+Slither), custom detectors, scoring,           simulation (RPC eth_call + revert decoding)  api/     FastAPI app, real x402 middleware (x402 pkg, x402.org facilitator),           cache (source-hash LRU), ratelimit, metrics  mcp/     MCP server: preflight_check, preflight_sim, preflight_pricingpublic/    llms.txt + .well-known/x402.json (discovery)
  • Payments: x402 package v2 — exact scheme, USDC, Base mainnet (CDP facilitator with KYT/OFAC); facilitator verifies + settles; server never holds custody.
  • Attestations: EIP-712 over (source_sha256, verdict, findings_root) — buyers can prove what we said.
  • Determinism: static analysis + eth_call simulation; verdicts are reproducible.

Listing

Docs

  • AGENTS.md — ownership map & interface contract
  • docs/LAUNCH.md — launch checklist, tunnel, mainnet flip, operating notes
  • docs/STATUS_*.md — per-area build reports

Test

bash
uv run pytest tests/ -m "not network"   # offline suiteuv run pytest tests/ -m network          # live-RPC + real paid flows (spends test USDC)

來源:README.md,提交 65594af

工具

4

preflight_check

Scan Solidity source and return a security verdict. This is a paid call ($0.01 USDC on Base mainnet) that flows through x402; in dev mode (DEV_MODE=1) no payment is required.

輸入參數source必填contract_name

preflight_sim

Simulate a transaction against a contract and return revert reason, gas used, balance deltas, and severity-scored findings. mode='quick' costs $0.05 (eth_call); mode='deep' costs $0.25 (anvil local fork with gas, balance_delta_wei, and internal_calls). Paid in USDC on Base mainnet via x402; DEV_MODE=1 skips payment.

輸入參數to必填datamodevalue_wei

preflight_token_risk

Check a token contract before trading it. Returns a honeypot transfer verdict, transfer tax percentage, and owner privileges as a severity-scored ScanReport. Paid call ($0.05 USDC on Base mainnet) via x402; DEV_MODE=1 skips payment.

輸入參數address必填

preflight_pricing

Return the Preflight service info and price list (free).

無需輸入參數。

版本歷史

1
  1. v0.1.0最新Nov 14, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Preflight 整合