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 集成