Prime-Agent x402 Intelligence

io.github.abovebeyond4north-netizen由 GitHub 帳號 abovebeyond4north-netizen 發布v0.3.0更新於 Oct 24, 2026

Discover and quote x402-paid Base intelligence products.

已驗證Streamable HTTP可網頁執行金融商業與電商

概覽

AI 產生的概覽

遠端 MCP 伺服器,用來列出並報價以 x402 付費的 Base 情報產品,回傳購買連結但不花費資金。

可以做什麼
  • 列出付費產品及其價格、能力標籤與購買連結範本
  • 對單一代幣產品報價,回傳確切的 x402 購買連結且不花費資金
  • 僅提供免費的探索層;鏈狀態、代幣中繼資料與代幣脈絡等付費內容仍位於受 x402 保護的 HTTP 路由之後
適用情境
當助理需要了解有哪些付費 Base 情報產品與其價格,或需要為人員或代理準備一個透過 x402 付款的購買連結時使用。它本身不交付付費資料。
執行需求
無需安裝:它是遠端 Streamable HTTP 端點。未宣告驗證、環境變數或請求標頭。購買所報價的產品需要買方另外具備支援 x402 的錢包與預算政策。
安裝前請注意
這些工具是唯讀的,不會花費資金,但報價連結指向會實際收費的 x402 付費路由。付費回應是部分的:持有者涵蓋範圍被標示為缺失,市場數據來自第三方 DEX Screener 觀察值,而非經核驗的鏈上核算。價格與目錄項目應視為賣方提供的資訊。

安裝

在 SourceWeft 中

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

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

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

{
  "mcpServers": {
    "prime-agent-x402-intelligence": {
      "type": "http",
      "url": "https://prime-agent-x402-intelligence.onrender.com/mcp/"
    }
  }
}

README

Prime-Agent x402 Intelligence: first slice

Three configured paid Base routes (/chain/status, /token/metadata/{address}, and /token/context/{address}) share a SQLite evidence cache. The context response explicitly marks holder, liquidity, and activity coverage as absent. An offline /token/verdict function returns insufficient_evidence; it is not offered as a paid route until those sources exist. No simulated payment is counted as revenue.

Local core test

Run python3 -m unittest discover -s tests -v in this directory. No third-party libraries are needed for the core or offline audits. After installing requirements.txt and httpx2, run python3 -m unittest discover -s tests/integration -v to verify all three route challenges, an invalid retry, and mock acceptance and settlement paths using a local fake facilitator. The invalid retry reaches /verify and never calls /settle. On mock success, the handler runs between /verify and /settle; on mock settlement failure, paid content is withheld. The fake deliberately does not validate signatures or move funds.

Paid server

Install requirements.txt in a Python 3.11+ environment. Set PRIME_PAY_TO to the operator's real Base address, PRIME_FACILITATOR_URL to a facilitator confirmed to support x402 v2 exact Base, PRIME_BASE_RPC_URL to a Base mainnet RPC endpoint, PRIME_EVIDENCE_DB to a writable SQLite file path, and PRIME_DELIVERY_JOURNAL to a writable JSONL file in a private directory. Start with uvicorn server:app --host 127.0.0.1 --port 8000. Startup fails when required configuration is absent. There is no free access switch.

The x402 middleware is responsible for payment challenge, verification and settlement. The intelligence core checks Base chain ID, pins reads to an EIP-1898 block hash with requireCanonical, and checks the block by number again before returning composed token facts. Providers without EIP-1898 support fail closed. RPC responses over 512,000 bytes are rejected. A later reorganization remains possible: each response identifies its observed block rather than claiming finality. All three unsigned challenges, a rejected retry, mock settlement success and failure, and the absence of the unfinished verdict route have passed in CI on Python 3.11 and 3.12. The middleware price patterns use x402's :address syntax while FastAPI handlers use {address}. A production browser-wallet request has now completed the x402 flow for /chain/status: the server observed a paid retry, returned HTTP 200 protected content, and PayAI subsequently listed the route in its Bazaar catalog. This bootstrap transaction proves the integration path, not organic demand or profitability. Exact transaction-to-delivery reconciliation remains a separate audit requirement.

The outer delivery journal records a transaction reference, configured route price and payee, facilitator-reported payer, and SHA-256 of the response bytes after ASGI send completion when a 200 response carries a successful settlement header. It never stores the payment signature. An unsigned challenge or failed settlement produces no paid journal record. A server-side send event does not establish that the buyer received content; the header, journal, and reported payer are not independent settlement evidence. If a journal write fails, the already sent response remains available and an error is logged, leaving an explicit audit gap. Protect and back up the journal; this is an operational event log, not a tamper-proof ledger.

Receipt evaluation

Run python3 evaluate.py --receipts receipts.jsonl --costs costs.jsonl. Receipt records need status, transaction, network, amount_usd, payer; cost records need amount_usd. Outputs are explicitly named reported_*: this calculation deduplicates seller claims but does not independently verify settlement or costs. It does not count merely verified authorizations.

Run python3 verify_transfers.py --claims claims.jsonl --audit-rpc-url https://YOUR_BASE_RPC --pay-to 0xYOUR_PAYEE to corroborate inbound transfers against a separately configured Base RPC. Each JSONL claim needs status: "settled", network: "eip155:8453", asset set to Circle's Base USDC contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, transaction as a transaction hash, payer as an EVM address, and amount_atomic as a positive decimal integer string (for example "20000" for 0.02 USDC). The checker rejects failed, noncanonical at audit time, or fewer than 12 blocks deep transactions; it requires an exact ERC-20 Transfer to the independently configured payee and rejects duplicate log claims. matched_usdc_nominal represents transferred USDC units, not verified x402 revenue: an inbound transfer alone cannot link a payment to a delivered request or establish independent buyer identity. Block depth is not a guarantee of finality. No real claims or live RPC receipts have been audited here.

Run python3 audit_sales.py --journal "$PRIME_DELIVERY_JOURNAL" --audit-rpc-url "$PRIME_AUDIT_RPC_URL" --pay-to "$PRIME_PAY_TO" to correlate journaled responses with onchain transfers. Configure PRIME_AUDIT_RPC_URL separately from the serving RPC and direct it to Base mainnet. The offered route prices have one source in pricing.py: the joiner derives exact USDC atomic amounts from the price table and checks receipt success, block depth and hash, ERC-20 sender/payee/amount, duplicate request and transaction references, and the response digest format. Its result is named chain_correlated_response_events, not sales or settled revenue. Journal content, facilitator-reported payer, and route attribution remain seller-side evidence; this tool does not attest to client receipt, verify a payment signature, or establish profit. Running it with a live provider and real journal is still outstanding.

Bazaar discoverability

Every paid x402 v2 route declares the official Bazaar discovery extension. The 402 challenge includes a stable service name, endpoint-specific search tags, route-specific descriptions, callable input metadata, and output examples/schemas. Dynamic token routes declare the :address path parameter so facilitators can consolidate concrete token URLs under a single route template.

This makes the service discovery-ready, not automatically indexed. Catalog inclusion is facilitator-controlled and must be observed after a real paid request echoes the Bazaar extension through settlement. For a live deployment, verify all of the following before claiming discoverability:

  1. An unsigned public request returns a v2 PAYMENT-REQUIRED header whose decoded payload contains extensions.bazaar, an absolute public resource.url, serviceName: "Prime-Agent x402 Intelligence", and the expected tags.
  2. A real buyer echoes the Bazaar extension in its PAYMENT-SIGNATURE payload and settlement succeeds through the configured facilitator.
  3. If the facilitator returns EXTENSION-RESPONSES, decode it and confirm bazaar.status is success or processing; treat rejected as a failed discovery registration.
  4. Query the facilitator's discovery API, preferably GET /discovery/resources?payTo=<payee>, and confirm the public route appears. Allow for asynchronous indexing. Payment settlement by itself does not prove catalog inclusion.

The integration suite asserts that dynamic-route 402 responses contain Bazaar metadata and that mock paid retries echo the extension back to the facilitator boundary.

References: x402 FastAPI integration, x402 v2 specification, SDK changes.

Block-hash addressing: EIP-1898.

Agent discovery and MCP

The production service exposes a free discovery/control plane around the paid x402 data plane:

  • GET /catalog — product list, prices, route templates, capability tags, and purchase URL templates.
  • GET /capabilities.json — compatibility alias for machine capability crawlers.
  • GET /.well-known/ai-catalog.json — machine-readable catalog alias.
  • GET /llms.txt — concise agent-readable usage documentation.
  • GET /openapi.json — OpenAPI schema for the HTTP service.
  • GET /server.json — MCP Registry-compatible server metadata.
  • /mcp/ — MCP v2 Streamable HTTP endpoint.

The MCP server intentionally exposes only list_products and quote_token_product. These tools discover and quote paid products without spending funds and without returning paid intelligence. Buyers still obtain chain status, token metadata, or token context through the x402-protected HTTP routes under their own authorization and budget policy.

The repository also contains prime-agent-x402/server.json so the remote MCP server can be published to the official MCP Registry after the live MCP endpoint is verified. The registry entry is not claimed until publication is observed in the registry.

Enriched token context (0.3.0)

GET /token/context/{address} now composes canonical Base contract metadata with a bounded DEX Screener token-pairs observation. The DEX observation is cached for 60 seconds and reports, at most, 30 Base pairs with:

  • aggregate reported liquidity in USD,
  • aggregate reported 24-hour volume,
  • reported 24-hour buy/sell counts,
  • the highest-liquidity observed pair,
  • an evidence ID and explicit source note.

DEX Screener values are third-party reported market observations, not Prime-Agent-verified onchain accounting. The response says this explicitly and does not turn those values into a risk verdict. If the upstream source is unavailable or malformed, the paid response remains partial and sets liquidity/activity coverage false rather than inventing data.

Holder coverage remains false. Blockscout documents a token-holder API, but the zero-key Base instance path did not pass the independent cloud reliability probe used for this release. Prime-Agent therefore does not claim holder concentration evidence yet. A future holder source must pass availability, bounded-response, provenance, and failure-mode tests before coverage.holders can become true.

References: DEX Screener API reference, Blockscout token API.

來源:prime-agent-x402/README.md,提交 8b94a87

工具

2

list_products

List Prime-Agent x402 products, prices, capabilities, and purchase URL templates.

無需輸入參數。

quote_token_product

Quote one product and return the exact x402 purchase URL without spending funds.

輸入參數addressproduct必填

版本歷史

1
  1. v0.3.0最新Sep 26, 2026

評分

已滿足適用檢查項的 90%

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

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

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