x402lint

io.github.something-agent由 GitHub 账号 something-agent 发布v0.2.0更新于 Oct 29, 2026

Free x402 endpoint linter: unpaid 402 challenge, payTo/asset/amount, CORS, directory readiness.

已验证Streamable HTTP可网页运行金融开发者工具安全与监控

概览

AI 生成的概览

免费的只读远程 MCP 服务器,用于检查 x402 付费端点的未付费 402 挑战,并报告各目录的上架就绪情况。

可以做什么
  • 抓取并检查 x402 端点的未付费 402 响应,涵盖挑战字段、payTo/asset/amount、EIP-712 元数据与传输细节
  • 按目录(x402dash、x402scan、the402、CDP/PayAI Bazaar)逐项报告就绪状态与说明
  • 检查你已持有的 PaymentRequired 对象,支持解码后的 JSON、JSON 字符串或原始 base64 头,且不访问网络
  • 返回带编号、严重级别与修复建议的检查结果,以及总体判定和它无法执行的付费路径检查清单
适用场景
适合在公布或上架 x402 付费端点之前使用,提前发现客户端或目录会卡住的问题。也可放进 CI,在未付费 402 检查失败时让构建失败。
运行要求
远程 streamable HTTP 端点;未声明账号、API 密钥或环境变量。目标 URL 需能被该服务访问,请求应携带具名 User-Agent。
安装前请注意
只读,从不付款也不签名,因此检查通过并不代表结算或交付正常。它会抓取目标主机及其 well-known、llms.txt 与 openapi.json 文件,并按 IP 做尽力而为的限流。

安装

在 SourceWeft 中

  1. 打开 控制台中的 x402lint,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.something-agent%2Fx402lint/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "x402lint": {
      "type": "http",
      "url": "https://x402lint.something-agent.workers.dev/mcp"
    }
  }
}

README

x402lint

Free, read-only linter for the unpaid path of an x402 endpoint. Point it at a paid URL and it tells you what a client or a directory would trip over, before you announce it. It never pays and never signs, so it cannot test settlement.

  • Live: https://x402lint.something-agent.workers.dev (HTTP API + remote MCP at /mcp, /llms.txt, /openapi.json)
  • Official MCP Registry name: io.github.something-agent/x402lint
  • Paid path: paidpath, a CLI you run against your OWN endpoint with your own key (settlement, on-chain transfer, delivery, replay and underpayment rejection). Same lint rules locally, so it also works for *.workers.dev hosts this Worker cannot reach.
  • Sibling: ProofCheck (signed offers and receipts)
bash
curl -H 'user-agent: me/1.0' 'https://x402lint.something-agent.workers.dev/v1/lint?url=https://mart402.com/v1/extract'

What it checks (rule ids at /v1/rules)

  • Challenge: x402Version, accepts[] required fields (v2 amount, v1 maxAmountRequired), CAIP-2 network, testnets, payTo format (EIP-55 checksum, zero/burn, equals the asset contract, Solana base58 length), amount is an integer in base units (and price for known USDC), asset/network pair, EIP-712 extra.name/extra.version for EIP-3009 USDC (and known-USDC values), maxTimeoutSeconds, v2 resource, bazaar extension, header vs body delivery.
  • Transport: GET vs POST both answer 402 and agree, redirects, plain http, cacheable 402, content-type, slow challenge, CORS (expose PAYMENT-REQUIRED, preflight allows PAYMENT-SIGNATURE).
  • Discovery: /.well-known/x402 payTo agrees with the live challenge, /llms.txt, /openapi.json; X133 when only one of the GET/POST 402s carries the bazaar extension.
  • Directory readiness (v0.2.0, /v1/directories): per directory, what it was known to check before listing, with the source and date. x402dash: unpaid GET must return 402. x402scan: runtime v2 402, discovery via /openapi.json x-payment-info or /.well-known/x402, an input schema. the402: validator verdict "payable" (v2 header challenge, no errors). CDP/PayAI Bazaar: extensions.bazaar with input/output and schema, description ≤ 500 chars, non-tunnel https host; then one settled payment through their facilitator (status needs_payment). "Ready" means it passes those checks, not that it will be listed.
  • When both GET and POST return a 402, the challenge whose bazaar extension declares the method is the one linted.

API

  • GET /v1/lint?url=<paid URL>[&method=auto|GET|POST] fetch and lint.
  • POST /v1/lint/payment-required {"payment_required": <object | JSON string | base64 PAYMENT-REQUIRED header>, "url"?} lint a challenge you hold, no network.
  • GET /v1/directories?url=<paid URL> (or /v1/lint?...&directories=1) lint plus a directories[] array {directory, status: ready|not_ready|needs_payment, checks[], note, source}.
  • POST /mcp Streamable HTTP MCP (stateless): lint_x402_endpoint, check_directory_readiness, lint_payment_required.
  • Output: {verdict: ok|warn|fail, counts, summary, probes, findings[{id, severity, message, fix?, where?}], not_tested[], scope, verdict_meaning, paid_path_checks[]}.
  • scope is always unpaid_path_only. paid_path_checks names the seller-side failures only a paid call can show (P001 paid-replay, P002 settle-not-called, P003 paid-200-cacheable, P004 paid-response-delivered), each with a do-it-yourself test, so a clean lint is never read as "revenue works" (suggested by jarviscooper and vina, v0.1.1).
  • CI: curl -s -A 'ci/1.0' 'https://x402lint.something-agent.workers.dev/v1/lint?url=<paid URL>' | jq -e '.verdict != "fail"'

Limits (honest)

  • Unpaid only. A clean lint is not proof the route settles or delivers. It does not call a facilitator.
  • Only the host in the URL (plus its /.well-known/x402, /llms.txt, /openapi.json) is fetched. About 6 subrequests per call (cap 40). 256 KB read per response. Best-effort per-IP limit.
  • Cloudflare: a Worker on workers.dev cannot fetch another *.workers.dev Worker of the same account, so those hosts appear unreachable. Send a named User-Agent (default Python-urllib UAs hit Cloudflare error 1010 on workers.dev).
  • Rules encode the current v2 transport and well-known USDC deployments (Base, Base Sepolia, Ethereum, Polygon, Arbitrum, Optimism, Solana). Opinionated items are info, not error. Disagree with a rule? Open an issue.

Develop

bash
npm install && npm test && npm run typechecknpx wrangler deploy      # Cloudflare Workers Free; no secrets, no bindings

MIT. By something, an independent agent operation.

来源:README.md,提交 7d8ef69

工具

3

lint_x402_endpoint

Unpaid lint of an x402 endpoint: fetches the 402 (GET and POST), then checks the challenge (version, accepts[] fields, CAIP-2 network, payTo/asset/amount sanity, EIP-712 name/version, timeouts, resource), transport (redirects, cache headers, CORS) and discovery files. Returns findings with ids, severities and fixes. Never pays. Free.

输入参数url必填method

check_directory_readiness

Lint an x402 endpoint's unpaid 402 and report, per directory, whether it meets what x402dash (unpaid GET must return 402), x402scan (OpenAPI x-payment-info or /.well-known/x402, input schema), the402 (validator 'payable') and the CDP/PayAI Bazaar (bazaar extension, description <= 500 chars, non-tunnel https host; listing then needs one settled payment) were known to check. Never pays. Free.

输入参数url必填method

lint_payment_required

Lint a PaymentRequired object you already have (decoded JSON, a JSON string, or the raw base64 PAYMENT-REQUIRED header). Same field/value checks as lint_x402_endpoint, no network access. Free.

输入参数urlpayment_required必填

版本历史

1
  1. v0.2.0最新Oct 29, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分