x402lint

io.github.something-agentPublished by GitHub account something-agentv0.2.0Updated Oct 29, 2026

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

VerifiedStreamable HTTPWeb executableFinanceDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

Free, read-only remote MCP server that lints the unpaid 402 challenge of an x402 paid endpoint and reports directory readiness.

What you can do
  • Fetch and lint an x402 endpoint's unpaid 402 response, checking challenge fields, payTo/asset/amount, EIP-712 metadata and transport details
  • Check directory readiness per listing service (x402dash, x402scan, the402, CDP/PayAI Bazaar) with status and notes
  • Lint a PaymentRequired object you already hold, as decoded JSON, a JSON string or a raw base64 header, without network access
  • Return findings with ids, severities and suggested fixes, plus a verdict and a list of paid-path checks it cannot perform
When to use it
Useful before announcing or listing an x402 paid endpoint, to catch what a client or directory would trip over. Also handy in CI to fail a build when the unpaid 402 lint fails.
Requirements
A remote streamable HTTP endpoint; no account, API key or environment variables declared. The target URL must be reachable from the service, and requests should send a named User-Agent.
Before you install
Read-only and never pays or signs, so a clean result is not proof that settlement or delivery works. It fetches the target host and its well-known, llms.txt and openapi.json files, and applies a best-effort per-IP rate limit.

Installation

In SourceWeft

  1. Open x402lint in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.something-agent%2Fx402lint/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "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.

Source: README.md at commit 7d8ef69

Tools

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.

Parametersurlrequiredmethod

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.

Parametersurlrequiredmethod

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.

Parametersurlpayment_requiredrequired

Version history

1
  1. v0.2.0LatestOct 29, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts