PayStage Preflight

io.github.base-buzz由 GitHub 帳號 base-buzz 發布v0.2.3更新於 Nov 12, 2026

Evaluate x402 PaymentRequired against a local spending policy before an agent pays

發布方自己的服務:Preflight

已驗證STDIO僅桌面金融安全與監控

概覽

AI 產生的概覽

本機 stdio MCP 伺服器,在代理付款前用 JSON 消費策略檢核 x402 PaymentRequired 內容,回傳 pay、review 或 do_not_pay。

可以做什麼
  • 評估付款請求:用本機策略檢核 x402 PaymentRequired 內容,取得 pay、review 或 do_not_pay 三種判定之一。
  • 套用消費規則:允許的網路、資產與收款地址,單次與單工作階段金額上限,人工審核門檻,以及最大逾時。
  • 將格式錯誤或違反策略的請求判為 do_not_pay,將超過人工門檻的請求判為 review。
適用情境
當代理能發起 x402 付款,而你想在資金流出前用可重現的本機檢查攔阻或升級不符合規則的付款時使用。
執行需求
需要 Node.js 與 npx 以 stdio 方式在本機執行這個 npm 套件,並需要一個策略 JSON 檔案,其絕對路徑透過 PAYSTAGE_POLICY_PATH 指定。判定過程不需要帳號、API 金鑰或網路存取。
安裝前請注意
判定僅供參考:它本身不付款也不保管資金,用戶端必須真正遵守 pay、review 與 do_not_pay。策略寫錯(網路、資產、收款地址或上限)會直接改變被核准的付款,請仔細核對策略檔案。README 說明此套件會讀取策略檔案與 PAYSTAGE_POLICY_PATH,並提到相關套件使用 PAYSTAGE_RPC_URL。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@paystage/preflight

Evaluate an x402 PaymentRequired against a local spending policy before your agent pays. Returns one of three verdicts: pay, review, or do_not_pay.

  • Local-first — policy lives in a JSON file on your machine. No secrets, no network calls to decide.
  • MCP-native — runs as a stdio MCP server so Claude Desktop, Cursor, and any MCP client can call it as a tool.
  • Deterministic — same input + same policy ⇒ same verdict.

Install

Run directly with npx (no global install):

bash
npx -y @paystage/preflight

Or add it to your MCP client config.

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "paystage-preflight": {      "command": "npx",      "args": ["-y", "@paystage/preflight"],      "env": {        "PAYSTAGE_POLICY_PATH": "/absolute/path/to/policy.json"      }    }  }}

Cursor

Add to .cursor/mcp.json:

json
{  "mcpServers": {    "paystage-preflight": {      "command": "npx",      "args": ["-y", "@paystage/preflight"],      "env": {        "PAYSTAGE_POLICY_PATH": "/absolute/path/to/policy.json"      }    }  }}

Example policy.json

json
{  "version": 1,  "name": "standard",  "allowed_networks": ["eip155:8453", "eip155:84532"],  "allowed_assets": [    "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",    "0x036CbD53842c5426634e7929541eC2318f3dCF7e"  ],  "allowed_pay_to": ["0x209693Bc6afc0C5328bA36FaF03C514EF312287C"],  "max_amount_per_call": "1.00",  "max_amount_per_session": "10.00",  "require_human_above": "0.50",  "max_timeout_seconds": 300,  "default_verdict": "review"}

Amounts are human-readable USDC (e.g. "0.50" = 0.50 USDC). Networks use CAIP-2 identifiers.

Verdicts

VerdictMeaning
payWithin policy — safe to proceed automatically.
reviewAllowed but above a human threshold — ask a human before paying.
do_not_payViolates policy (network, asset, payTo, amount, timeout, or malformed).

Supply chain and access

Socket.dev scores this package on what it can do, not what it does with it, so the flags it raises are worth explaining rather than removing:

FlagWhy it is there
Filesystem accessReads the policy JSON you point it at (policy_path / PAYSTAGE_POLICY_PATH). Nothing is written.
Environment variable accessPAYSTAGE_POLICY_PATH only (and PAYSTAGE_RPC_URL via auth-watch).
Network access, URL stringsNone in this package. The RPC endpoints you may see in the tree belong to @paystage/auth-watch.

No shell, no eval, no telemetry, no key custody. The full table is in SECURITY.md; the deny list is published with a citation per entry in KNOWN_DRAINERS.md.

Links

來源:packages/preflight/README.md,提交 1b92c54

工具

1

evaluate_mcp_payment

Evaluate an x402 PaymentRequired payload against a PayStage spending policy before paying

輸入參數policypolicy_pathpayment_required必填

版本歷史

1
  1. v0.2.3最新Nov 12, 2026

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Preflight 整合