MCP x402 - Evidence-Backed Web Verification

io.github.Diogoup26由 GitHub 帳號 Diogoup26 發布v1.2.12更新於 Nov 22, 2026

Evidence-backed pre-purchase checks for offer terms, seller trust and policy compliance.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取商業與電商

概覽

AI 產生的概覽

遠端 MCP 伺服器,抓取單一公開網頁並針對最多 10 條明確條件給出附證據的判定,另提供頁面分析與通用 AI 問答。

可以做什麼
  • 針對一個公開頁面核驗 1 至 10 條條件,回傳已確認、已否定或不確定,並附引用證據、核驗編號與頁面雜湊
  • 抓取並分析單一公開 HTTP 或 HTTPS 頁面,輸出摘要、事實、風險與建議動作
  • 回答不需要連網檢索的通用問題
  • 在不抓取、不呼叫模型、不付款的情況下預覽報價、賣家或政策核驗的結果格式
適用情境
適合在代理信任、購買或依據某個頁面行動之前,需要核對該頁面上的報價條款、保固、退貨、賣家身分或政策措辭,並要求引用證據而非自由摘要的情境。
執行需求
遠端 streamable HTTP 端點;未宣告需要帳號、API 金鑰或請求標頭。付費工具需透過 Base 主網的 USDC x402 付款,由呼叫端用戶端控制的錢包結算。
安裝前請注意
四個工具中有三個按次收費:通用問答 0.02 USDC,頁面分析與條件核驗各 0.05 USDC,皆從錢包鏈上支付。伺服器會代為抓取任意公開網址,並把頁面內容與提示詞送往 OpenAI。只有預覽工具免費,且不抓取、不付款。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MCP x402 - Evidence-Backed Web Verification,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

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

{
  "mcpServers": {
    "x402-evidence-backed-web-verification": {
      "type": "http",
      "url": "https://mcp-x402-production.up.railway.app/mcp"
    }
  }
}

README

[MCP x402 logo]

MCP x402 — Evidence-Backed Web Verification for AI Agents

[AllMCPs Verified]

Verify a seller, product, offer, policy, or claim before an agent acts

Give an AI agent a public HTTP(S) page and 1 to 10 concrete conditions. The verificar_condicoes tool returns an evidence-based decision for every condition:

  • confirmado — the page clearly supports the condition.
  • rejeitado — the page clearly contradicts the condition.
  • incerto — the available page evidence is insufficient.

Each verification includes the final source URL, page title, timestamp, condition-by-condition explanation, quoted evidence when available, a unique verificationId, and a SHA-256 pageHash.

Designed for

  • AI purchasing and procurement agents;
  • offer, warranty, returns and availability checks;
  • seller identity and authorization checks;
  • policy and terms compliance checks;
  • commercial automation that requires evidence before taking action.

Three buyer decisions

Buyer needSelect this tool when the agent must decide
Offer termsWhether an offer satisfies warranty, returns, price or delivery requirements before purchase
Seller trustWhether the page identifies the seller and supports authorization or registration claims
Policy complianceWhether terms or policies contain required cancellation, privacy or support conditions

Use the free preview_verification MCP tool or the free HTTP endpoint POST /preview/verify-conditions first when the buyer needs to inspect the complete result contract without fetching a page, calling OpenAI or making a payment. Use verificar_condicoes for a fresh verification of a real public URL.

Simple x402 integration

  • Free preflight validation before payment.
  • $0.05 USDC per verification on Base mainnet.
  • No account or subscription required.
  • Available through MCP and HTTP.
  • Ready-to-run buyer included in this repository.
  • Bazaar discovery metadata enabled on the paid HTTP and MCP surfaces.

Free static result demonstration

The following example is fictitious and performs no request, OpenAI call, or payment. It shows the complete result contract an agent receives for 0.05 USDC when using verificar_condicoes.

Example input:

json
{  "url": "https://shop.example/offers/refurbished-laptop",  "condicoes": [    "The offer includes a 12-month warranty.",    "The return period is at least 30 days.",    "The seller is an authorized manufacturer reseller."  ],  "contexto": "Pre-purchase seller verification."}

Example result:

json
{  "source": "https://shop.example/offers/refurbished-laptop",  "title": "Refurbished Laptop Offer — Example Seller",  "verifiedAt": "2026-01-01T00:00:00.000Z",  "decisao": {    "decisao": "incerto",    "condicoes": [      {        "condicao": "The offer includes a 12-month warranty.",        "estado": "confirmada",        "prova": "Includes a 12-month limited warranty.",        "explicacao": "The offer explicitly states the warranty duration."      },      {        "condicao": "The return period is at least 30 days.",        "estado": "rejeitada",        "prova": "Returns accepted within 14 days of delivery.",        "explicacao": "The stated 14-day return period contradicts the required minimum of 30 days."      },      {        "condicao": "The seller is an authorized manufacturer reseller.",        "estado": "incerta",        "prova": null,        "explicacao": "The page provides no evidence of manufacturer authorization."      }    ],    "resumo": "The warranty is confirmed, the return-period requirement is rejected, and reseller authorization remains uncertain."  },  "verificationId": "00000000-0000-4000-8000-000000000000",  "pageHash": "sha256:0000000000000000000000000000000000000000000000000000000000000000"}

This demonstrates the distinction between supporting evidence, contradictory evidence, and absence of evidence. The real paid result uses the fetched page, current timestamp, a unique verificationId, and the SHA-256 hash of the page content.

Screen a shortlisted refurbished laptop

Apply the local decision example to the buyer's original request and the parsed verification response for the same offer. To try it offline, assign the example input and result above to request and verification in a Node.js module in the repository root.

js
import { decideOffer } from "./examples/offer-decision.mjs";const decision = decideOffer(request.condicoes, verification);console.log(decision.action, decision.reasons);

The laptop is excluded because its quoted 14-day return period contradicts the required 30 days. A quoted contradiction excludes the offer even if another requirement is unclear. All mandatory terms need quoted support to recommend. Missing, duplicated or inconclusive evidence sends the offer to review when there is no supported contradiction. This local step makes no payment or purchase.

Free MCP preview tool

preview_verification is a free, model-callable MCP tool. It performs no live web request, OpenAI call or payment. Choose one of these values:

  • offer_terms
  • seller_trust
  • policy_compliance

It returns a realistic structured input and result, identifies the paid verificar_condicoes tool and provides the exact next step. Preview calls are logged separately and never counted as paid demand or revenue.

Live endpoints

  • MCP: https://mcp-x402-production.up.railway.app/mcp
  • Free MCP preflight: POST https://mcp-x402-production.up.railway.app/preflight/mcp
  • Free verification preflight: POST https://mcp-x402-production.up.railway.app/preflight/verify-conditions
  • Free static HTTP preview: POST https://mcp-x402-production.up.railway.app/preview/verify-conditions
  • Paid verification: POST https://mcp-x402-production.up.railway.app/verify-conditions
  • Health: GET https://mcp-x402-production.up.railway.app/health

The service also provides paid public URL analysis and general AI consultation through analisar_url and consultar_ia.

Live Service

  • Base URL: https://mcp-x402-production.up.railway.app
  • Health check: GET /health
  • MCP endpoint: POST /mcp
  • Paid URL analysis: POST /analyze
  • Price: $0.05 USDC per paid request
  • Network: Base mainnet (eip155:8453)

Production Status

  • Production deployment active on Railway
  • x402 version 2 payment flow
  • Base mainnet payments (eip155:8453)
  • Paid HTTP endpoints return valid x402 challenges with Bazaar metadata
  • MCP and HTTP payment, execution, settlement, and delivery confirmed on-chain
  • MCP Bazaar metadata advertises the public HTTPS MCP server URL
  • CDP native MCP catalog indexing is not yet claimed as confirmed; upstream tracking: coinbase/cdp-sdk#764

MCP Tools

Decision verification

verificar_condicoes — $0.05 USDC

A paid decision-verification tool for agents.

Give it a public URL and one or more concrete conditions. It returns a decision based only on evidence extracted from that page:

  • confirmado — the page clearly proves the condition.
  • rejeitado — the page clearly contradicts the condition.
  • incerto — the page does not provide enough evidence.

Each result includes the final source URL, page title, verification timestamp, condition-by-condition explanation, and a short quoted proof where available.

Example conditions:

  • “The page identifies the seller.”
  • “The product is available in Portugal.”
  • “The page shows a price in euros.”
  • “The document states that the service supports x402.”

This is designed for agents that need an evidence-based decision before taking the next action.

ToolDescriptionPrice
preview_verificationReturns a static structured example for offer, seller or policy verification. No network retrieval or OpenAI call.Free
consultar_iaSends a prompt to the OpenAI Responses API.$0.02 USDC
analisar_urlFetches and analyzes a public HTTP or HTTPS page.$0.05 USDC
verificar_condicoesVerifies concrete conditions on a public page and returns evidence-based decisions.$0.05 USDC

Technology

  • Node.js and TypeScript
  • Express
  • Model Context Protocol
  • OpenAI Responses API
  • x402 payments
  • viem
  • Cheerio
  • Railway

Security

  • HTTPS provided by Railway
  • Helmet security headers
  • Rate limit of 100 requests per 15 minutes
  • Structured request logs with unique request IDs
  • Host validation and Railway health-check support
  • Restricted OpenAI API key with access only to /v1/responses
  • Environment files and secrets excluded from Git

Environment Variables

Server

VariableRequiredDescription
OPENAI_API_KEYYesOpenAI project API key.
OPENAI_MODELNoOpenAI model. Defaults to gpt-5-mini.
HOSTNoListening host. Defaults to 0.0.0.0.
PORTNoListening port. Defaults to 3000.
RAILWAY_PUBLIC_DOMAINRailwayAutomatically supplied by Railway.
PUBLIC_SERVICE_URLNoCanonical public HTTPS origin used in discovery metadata. Railway derives it automatically from RAILWAY_PUBLIC_DOMAIN; the production URL is the fallback.
OBSERVABILITY_SALTRecommendedStable secret salt used only to pseudonymize source/client fingerprints across restarts.

Local Buyer

VariableRequiredDescription
EVM_PRIVATE_KEYYesPrivate key of the Base mainnet buyer wallet. Never commit this value.
JOURNEY_IDNoExisting correlation ID to reuse; otherwise the buyer generates one.

Example local .env.test file:

env
EVM_PRIVATE_KEY=your_private_key_here

Local Development

Install dependencies:

bash
npm install

Start the development server:

bash
npm run dev

Build the project:

bash
npm run build

Start the compiled server:

bash
npm start

Health Check

The health endpoint is public and does not require payment:

bash
curl https://mcp-x402-production.up.railway.app/health

Railway Log Diagnostics

Railway currently accepts --since for historical HTTP logs but rejects --until. On Windows PowerShell, export a bounded application and HTTP log window without using the broken flag:

powershell
.\scripts\export-railway-window.ps1 `  -StartUtc "2026-08-22T16:31:22.401228537Z" `  -EndUtc "2026-08-23T06:21:18.045229877Z" `  -OutputPrefix "railway-diagnostic"

The script retrieves logs from the lower bound and applies the upper UTC bound locally using ordinal ISO-8601 comparison, which preserves Railway's nanosecond timestamps. It writes raw captures plus bounded app and http NDJSON files.

Analyze both bounded files while reading and validating every physical line:

bash
npm run logs:analyze -- \  --since "2026-08-22T16:31:22.401228537Z" \  --pretty \  --out railway-diagnostic-report.json \  railway-diagnostic-app.ndjson railway-diagnostic-http.ndjson

The report includes per-file coverage, empty/valid/invalid line counts, timestamp bounds, separation of Diogo-*, RailwayHealthcheck, known probes or indexers and potentially external traffic, journey reconstruction and funnel stopping points. It joins application railwayRequestId values to Railway HTTP requestId values, understands HTTP clientUa, groups server-generated journey IDs by fingerprint and temporal proximity, and counts only accepted normalized feedback. It deliberately does not treat an isolated 402 as purchase intent and does not infer human identity or motivation from request metadata.

Ready-to-Run x402 Buyer

The repository includes ready-to-run buyers for applications and AI agents. The MCP buyer connects to the live service, validates the x402 payment requirements against Base mainnet USDC and a maximum payment of $0.05, signs the payment, retries the same tool call, and prints the settlement receipt and result.

Clone and prepare the buyer:

bash
git clone https://github.com/Diogoup26/mcp-x402.gitcd mcp-x402npm install

Create a local .env.test file in the project root:

env
EVM_PRIVATE_KEY=0xYOUR_64_HEX_CHARACTER_PRIVATE_KEY

Never commit .env.test or expose the private key.

Build the project:

bash
npm run build

The following commands authorize real x402 payments on Base mainnet:

  • consultar_ia: $0.02 USDC
  • analisar_url: $0.05 USDC
  • verificar_condicoes: $0.05 USDC

HTTP URL Analysis

bash
npm run analyze -- "https://example.com" "Summarize this page."

HTTP Decision Verification

bash
npm run verify -- "https://example.com" "The page identifies the seller."

MCP URL Analysis

bash
npm run mcp:analyze -- "https://example.com" "Summarize this page."

MCP AI Consultation

bash
npm run mcp:consult -- "Reply only with: MCP OK"

MCP Decision Verification

bash
npm run mcp:verify -- "https://example.com" "The page identifies the seller."

A successful MCP payment prints:

  • PAGAMENTO MCP: success
  • the settlement receipt
  • the tool response

The MCP buyer never prints the private key and rejects any payment that:

  • is not on Base mainnet;
  • does not use the configured Base USDC contract;
  • exceeds $0.05 USDC.

Machine-Readable Payment Continuation

The discovery document at GET /.well-known/x402 and every successful free preflight response publish a complete continuation sequence. A compatible agent no longer has to infer what to do after the first unpaid request:

  1. run the free preflight and keep its x-journey-id;
  2. send the validated request without a payment signature;
  3. read and verify the payment-required requirements;
  4. authorize only the expected network, asset, amount and recipient;
  5. retry the identical request with the x402 payment payload;
  6. verify both delivery and the settlement receipt.

REST metadata recommends @x402/fetch; MCP metadata recommends @x402/mcp. Paid responses also link back to the discovery instructions through x-payment-instructions. They additionally publish an RFC 8288 Link header with the registered payment and help relations, so generic HTTP agents can discover the same machine-readable continuation and optional feedback path without depending on project-specific headers. The flow never requests a private key, Railway or GitHub credentials, or an OpenAI key.

Optional Conversion Feedback

Every paid HTTP or MCP response advertises x-feedback-endpoint and the allowed normalized reason, stage, and intent values. The free preflight responses include the same information in a feedback block. Feedback is submitted to POST /feedback, contains no free text, and never includes a private key, prompt, URL, page content, or payment payload.

The three buyers accept:

text
--feedback-reason <research_only|no_wallet|unsupported_network|insufficient_funds|spending_not_authorized|price|insufficient_value|integration_error|other>--feedback-stage <discovery|preflight|payment|execution|delivery>--feedback-intent <research|analyze_page|verify_conditions|general_question|evaluate_service|other>

When --feedback-reason is supplied without --feedback-stage, the stage defaults to payment and the buyer does not authorize a payment. The HTTP buyers first receive the unsigned 402 challenge, submit the explicit feedback, and stop. The MCP buyer stops after its free preflight and submits the explicit feedback without requiring a wallet.

Example: report that the price stopped an evaluation, without paying:

bash
npm run analyze -- "https://example.com" "Summarize this page." --feedback-reason price --feedback-intent evaluate_service

To submit explicit feedback after a completed delivery, select that stage:

bash
npm run mcp:consult -- "Reply only with: MCP OK" --feedback-reason other --feedback-stage delivery --feedback-intent general_question

Buyers automatically submit only integration_error, and only for an objectively detected technical failure such as failed discovery/preflight, an HTTP 5xx result, a paid MCP tool error, or a missing settlement receipt after a payment was made. They never infer price, research_only, no_wallet, or another human or commercial motivation.

Controlled Smoke Test (No Payment)

After deployment, validate discovery, preflight, the OpenAPI feedback contract, normalized feedback submission, HTTP 402 challenges and feedback headers, HTTP method handling, MCP initialization, tool discovery and the MCP x402 challenge:

bash
npm run buildnpm run smoke

Use SERVICE_URL to target another deployment. The test uses one persistent x-journey-id, sends User-Agent: Diogo-Smoke/1.2.9, verifies that the MCP x402 challenge advertises the public HTTPS endpoint with type=mcp and the correct toolName, and never creates or signs a payment.

The three payment buyers now perform discovery and a free preflight before the paid request, using the same persistent journey ID throughout. Set JOURNEY_ID to reuse an existing journey; otherwise each buyer creates and prints one. The MCP buyer additionally requires the exact advertised price, Base USDC, Base mainnet, and the configured service recipient before it can sign.

Funnel Observability

The server emits structured events for MCP tool attempts, x402 challenges, payment verification, execution, settlement and final tool outcome. It does not log tool arguments or payment payloads. Settlement logs include the public network and transaction identifier so completed purchases can be counted and deduplicated.

Rejected MCP requests include safe protocol diagnostics such as method, content type, Accept, JSON-RPC shape and the SDK error classification. All events include the request and journey correlation fields when available. Calls to a known paid tool that never reach its payment wrapper additionally emit mcp_pre_payment_rejection, classified as invalid method, content type, JSON-RPC envelope, arguments, transport/protocol rejection, or an otherwise unreached handler. Argument values and payment payloads are never logged. OpenAI usage events inherit the same request, journey, client, and source correlation. Railway's X-Railway-Request-Id, edge POP, and request-start time are also recorded, while client source fingerprints use Railway's stable X-Real-IP value and remain pseudonymized with OBSERVABILITY_SALT.

Deployment

The main branch is connected to Railway. Every successful push triggers a new deployment. Railway uses:

bash
npm run buildnpm start

The deployment health-check path is /health.

License

ISC

來源:README.md,提交 f06bdc0

工具

4

preview_verification

Preview an evidence-backed verification for free

Use this free static preview before paying for verificar_condicoes. Choose offer_terms to inspect warranty, returns and availability; seller_trust to inspect seller identity and authorization; or policy_compliance to inspect required policy terms. It performs no web request, OpenAI call or payment and returns a realistic structured example plus the exact paid next step. PT: Pré-visualização gratuita e estática da verificação.

輸入參數useCase

consultar_ia

General AI consultation

Use for general questions that do not require live web retrieval. Returns a concise model answer and does not fetch URLs or verify current facts. Use analisar_url for a source-bounded page report and verificar_condicoes for evidence-backed decisions. PT: Use para perguntas gerais sem pesquisa web em tempo real.

輸入參數prompt必填

analisar_url

Analyze a public web page

Use to fetch one public HTTP or HTTPS page and return a source-bounded report with summary, facts, risks and recommended actions. The optional objective controls focus but is never evidence. It does not consult other sources; use verificar_condicoes for condition-by-condition decisions. PT: Analisa uma página pública sem usar fontes externas.

輸入參數url必填objetivo

verificar_condicoes

Verify conditions with evidence

Use before an agent trusts, buys or acts to test 1 to 10 explicit conditions against one public HTTP or HTTPS page. Best fits offer and warranty checks, seller identity or authorization checks, and policy compliance checks. Returns confirmed, rejected or uncertain for every condition with textual evidence when available, plus source, verifiedAt, verificationId and pageHash. Missing evidence produces uncertain, not a false confirmation. Use preview_verification first when the buyer needs a free example. PT: Verifica condições com prova auditável.

輸入參數url必填contextocondicoes必填

版本歷史

3
  1. v1.2.12最新Nov 1, 2026
  2. v1.2.10Nov 1, 2026
  3. v1.2.9Sep 16, 2026

評分

已滿足適用檢查項的 90%

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

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

    請在儲存庫或註冊中心條目中宣告授權條款。