Byte Protocol

io.github.0rkz由 GitHub 帳號 0rkz 發布v0.13.0更新於 Oct 24, 2026

PayPerByte — per-byte data for AI agents: x402 USDC on Base, EIP-712-attested. No token.

已驗證Streamable HTTP可網頁執行金融安全與監控資料與分析

概覽

AI 產生的概覽

讓助理接入 PayPerByte 資料來源:探索發布者、透過 x402 以 USDC 逐次購買資料、訂閱鏈上資料流,並驗證資料憑證。

可以做什麼
  • 搜尋與檢視資料源目錄:依主題尋找發布者、查看資料源價格與頻率、發布者 schema、網路統計、訂閱狀況與內容漂移健康度
  • 查詢 Arbitrum Sepolia 上的 USDC 與 ETH 餘額,以及某錢包是否已訂閱某發布者
  • 透過 x402 閘道逐次購買單一資料封包或簽章裁決結果
  • 在鏈上資料流層訂閱、取消訂閱、註冊為發布者並發布資料
  • 向事實預言機發布者提問,取得附引用的簽章答案
  • 在依據資料行動前,以鏈上 EIP-712 憑證驗證收到的資料內容
適用情境
適合助理需要付費且可追溯來源的外部資料(例如天氣、行情、安全或商戶篩選裁決),並希望在據此行動前先做驗證的情境。若要在 PayPerByte 網路上發布或訂閱資料流,也可使用。
執行需求
可作為遠端端點使用,也可透過 npx byte-mcp-server 在本機執行(需 Node.js)。唯讀工具不需憑證。寫入與購買類工具需要 PRIVATE_KEY;可選 RPC_URL、INDEXER_URL、BYTE_GATEWAY_URL、BYTE_GATEWAY_ATTESTER 與 MAX_PAYMENT_USDC。需能連線至閘道、索引服務與 Arbitrum Sepolia RPC。
安裝前請注意
PRIVATE_KEY 會為 byte_buy_data 簽署真實的 Base 主網 USDC 付款,並為訂閱、發布、查詢簽署測試網交易;請使用只存放可支配資金的專用錢包。未設定 MAX_PAYMENT_USDC 時支出沒有上限。BYTE_GATEWAY_ATTESTER 固定值過期可能導致付款後購買失敗。訂閱預設會把 USDC 授權額度設為最大值,除非選擇略過。憑證只證明交付完整性,不保證資料正確。

安裝

在 SourceWeft 中

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

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

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

{
  "mcpServers": {
    "byte-protocol": {
      "type": "http",
      "url": "https://mcp.payperbyte.io/mcp"
    }
  }
}

README

PayPerByte MCP Server

Smithery listing · [0rkz/byte-mcp-server MCP server]

A Model Context Protocol server that gives AI agents direct access to PayPerByte — cryptographically attested, provenance-verifiable data feeds for AI agents (the X-BYTE-Attestation receipt proves delivery-integrity — these are exactly the bytes PayPerByte served and attested under the BYTE Library domain — not that an independent data publisher signed them, and not that the data is correct). Agents discover feeds, pay-per-call via x402 (settled in USDC on Base mainnet), or subscribe to on-chain streams (Arbitrum Sepolia testnet). Every paid x402 response carries an EIP-712 PayloadAttestation receipt (X-BYTE-Attestation header) the agent verifies before acting. No tokens, no API keys, no off-chain accounts.

Two rails — read this before setting PRIVATE_KEY.

  • x402 pay-per-call (byte_buy_data): Base mainnet (eip155:8453), REAL USDC. Paid feeds settle real money — every price is quoted in the 402 challenge and listed per feed at https://x402.payperbyte.io/feeds. Example: the Merchant Screen Oracle returns a signed ALLOW/WARN/BLOCK check on a merchant's domain and payout address, backed by a signed EIP-712 attestation over the exact response bytes, run before an agent settles an x402 payment to it. Authenticity and delivery-integrity, not a correctness guarantee on the verdict itself — and on the domain, address and price you supply; it does not observe or constrain the address you ultimately settle to. Use a dedicated wallet holding only what you intend to spend.
  • On-chain subscribe/publish/query layer (BYTE Library contracts + indexer): Arbitrum Sepolia testnet (chain 421614), MockUSDC. Mainnet for this layer is gated on an external security audit. The EIP-712 attestation signing domain stays anchored at 421614 regardless of which rail you paid on.

One PRIVATE_KEY serves both rails. Never reuse a key holding funds you can't afford to spend.

Quick start

bash
npx -y byte-mcp-server

Wire it into your MCP client (Claude Desktop config below), then your agent can:

  • Discover feeds: "List the PayPerByte catalog" / "Search publishers for weather"
  • Screen a counterparty before you pay it (x402, no setup): "Screen this domain and payout address before I settle" → real USDC on Base mainnet at the price the 402 challenge quotes, signed ALLOW/WARN/BLOCK verdict from the Merchant Screen Oracle with an attestation receipt
  • Try it cheap first: "Get the weather" / "Any earthquakes over M4 today?" → real USDC at each feed's listed price (https://x402.payperbyte.io/feeds), same attestation receipt on every response — a low-cost way to see verify-before-act work before spending on a verdict
  • Subscribe to a stream (testnet): "Subscribe me to the earthquakes feed" → auto-approves MockUSDC for ongoing settlement on Arbitrum Sepolia
  • Query a fact-oracle (testnet): post a signed EIP-712 question to a registered fact-oracle publisher for an on-chain signed answer with citations — when a fact-oracle publisher is live (none is broadcasting today; the tool times out until one registers and broadcasts)

The live catalog is at x402.payperbyte.io/feeds — cryptographically attested, provenance-verifiable feeds across weather, markets, code, security, and knowledge.

Verify before acting (ForeSeal)

See the whole verify-before-act loop in one command — no install, no signup, no wallet:

bash
npx @foreseal/demo

It runs locally (no real USDC) and shows an agent ACT on genuine bytes and REFUSE four attacks — a tampered byte, a forged signature, a missing receipt, a forked signing domain — in about a second.

The same primitive ships as two packages you can drop into your own stack:

  • Kit — @payperbyte/sdk: the buyer verifies a receipt before acting.
  • Gate — @foreseal/gate: a seller stamps a verifiable receipt on any x402 endpoint.

Two paradigms: subscribe vs. buy

ModeToolRailBest forPricing
Buy (x402)byte_buy_dataBase mainnet — real USDCOne-off needs (single snapshot or verdict for this user query)Per-feed, quoted in the 402 challenge; live list with prices: https://x402.payperbyte.io/feeds
Subscribebyte_subscribeArbitrum Sepolia — testnet MockUSDCContinuous streams (every weather update, every new earthquake)Per-publisher, set in the publisher's on-chain schema — read it with byte_get_publisher

Buy is zero-setup, pay-as-you-go, and live with real settlement; subscribe delivers every broadcast on the audit-gated testnet layer. Pick by access pattern.

Buying a verdict (POST oracle)

GET data feeds need only a feed. Any feed whose method includes POST (live list: https://x402.payperbyte.io/feeds) takes the query as a body — byte_buy_data switches the call from GET to POST automatically. The verdict oracles — feeds that return a signed ALLOW/WARN/BLOCK — are merchant-screen, address-reputation, sanctions-screen, pkg-verdict, reasoning-verdict:

jsonc
// byte_buy_data tool call — screen a merchant/counterparty before settling{  "feed": "merchant-screen",  "body": { "domain": "example.com", "address": "0x1234…abcd", "observed_price_atomic": "<atomic price the MERCHANT you are screening quoted you>" }}

The paid response returns the signed verdict and an inline verify-before-act result over the X-BYTE-Attestation receipt:

jsonc
{  "feed": "merchant-screen",  "paid": true,  "price": "$0.100000",   // illustrative — the amount the 402 challenge quoted at buy time  "txHash": "0x…",  "data": { "answer": { "verdict": "ALLOW", "reasons": ["…"] }, "attestation": { "…": "…" } },  "verification": { "gatewayVerified": true, "hashMatch": true, "signerMatch": true,                    "reason": "gateway delivery verified — these exact bytes were signed by the pinned gateway attester […receipt deadline note appended]" }}

Act only when verification.gatewayVerified === true — the receipt proves the gateway delivered these exact bytes, not that the data is correct. Other POST bodies: address-reputation {domain,address}, sanctions-screen {address|name}, pkg-verdict {ecosystem,package[,version]}, reasoning-verdict {subject}. Omit body entirely for GET data feeds (weather, earthquakes, …).

Tools (15 total)

Discovery (read-only, no wallet)

ToolDescription
byte_search_publishersSearch publishers by topic and sort order
byte_list_feedsList the active feed catalog with prices and frequencies
byte_get_publisherOn-chain info for one publisher (status, subscribers, messages, USDC revenue, schema)
byte_get_network_statsNetwork-wide stats: publishers, messages, total fees settled
byte_check_subscriptionIs subscriber subscribed to publisher?
byte_list_my_subscriptionsAll active subscriptions for a wallet — last 7d/30d messages + USDC spend
byte_subscription_healthContent-drift signal for a publisher: stable / moderate / significant / unknown
byte_get_token_balancesUSDC + ETH balances on Arbitrum Sepolia
byte_verify_payloadVerify-before-act. Recompute keccak256 of the bytes your agent received and check them against the publisher's on-chain EIP-712 PayloadAttestation — anchor with an expectedHash you hold or the settlement txHash (which also recovers the signer and confirms it's the named publisher). If verified: false, don't act on the data — either the bytes differ from what was attested, or verification wasn't possible (no attestation found, signer mismatch, or neither expectedHash nor txHash supplied). The reason field says which

Subscribe to a stream (requires PRIVATE_KEY)

ToolDescription
byte_subscribeSubscribe to a publisher's stream. Auto-bundles USDC approve(max) unless skipAllowance: true (closes a silent-payment-failure footgun where the contract's allowance-skip path delivered data with amount=0)
byte_unsubscribeUnsubscribe — takes effect next block
byte_register_publisherRegister as a data publisher (schema + on-chain registration). v1 is first-party only; stake = 0
byte_publish_dataPublish a payload to a subscriber via DataStream (settles fee in USDC). See migration notice above re: r2

Buy on-demand (requires PRIVATE_KEY)

ToolDescription
byte_buy_dataBuy one packet from any feed via the x402 gateway — real USDC on Base mainnet. No subscription, no allowance. Signs EIP-3009 transferWithAuthorization against the 402 challenge; the facilitator settles on-chain. Returns the data + tx hash inline
byte_query_factAsk a slashable fact-oracle publisher a question. Signed EIP-712 request (binds query to your wallet so leaked queries can't burn your escrow); the answer is broadcast on-chain to your address with citations. Requires a live fact-oracle publisher — none is broadcasting today, so the call times out until one registers.

Configuration

Claude Desktop

Edit ~/.config/claude/claude_desktop_config.json (Linux) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

json
{  "mcpServers": {    "payperbyte": {      "command": "npx",      "args": ["-y", "byte-mcp-server"],      "env": {        "PRIVATE_KEY": "0x...",        "RPC_URL": "https://sepolia-rollup.arbitrum.io/rpc"      }    }  }}

PRIVATE_KEY is optional — read-only tools work without it. Add it to enable subscribe, publish, buy, and query.

Claude Code

bash
claude mcp add payperbyte -- npx -y byte-mcp-server

Environment variables

VariableRequiredDefaultDescription
PRIVATE_KEYonly for write/buy/query tools—EOA key. Signs real Base-mainnet USDC for byte_buy_data and testnet txs for subscribe/publish/query — use a dedicated wallet
RPC_URLnohttps://sepolia-rollup.arbitrum.io/rpcArbitrum Sepolia RPC (the on-chain read/subscribe layer)
INDEXER_URLnohttps://feeds.payperbyte.ioPayPerByte indexer API
BYTE_GATEWAY_URLnohttps://x402.payperbyte.iox402 gateway base URL (used by byte_buy_data)
BYTE_GATEWAY_ATTESTERnocurrent gateway attester (0xB48CCc9e3ab67041e3b5D09700138E45cda6AeA8, rotated 2026-08-19)Attester address byte_buy_data pins the delivery receipt against. If the gateway rotates before this package updates, set this to the new receipt.attester from /.well-known/agent.json — a stale pin fail-closes buys AFTER payment settles
MAX_PAYMENT_USDCno— (uncapped)Server-side spend cap for byte_buy_data, in decimal USDC (e.g. 0.25). When set, any 402 quote above the cap is refused before signing; unset means no cap — a dedicated thin wallet remains the hard backstop

Network

Two rails, honestly stated:

  • x402 payment rail (byte_buy_data): Base mainnet (eip155:8453). Paid feeds settle real USDC through the gateway at x402.payperbyte.io; each paid 200 returns an X-BYTE-Attestation EIP-712 receipt over the exact response bytes.
  • On-chain layer (subscriptions, broadcasts, fact-oracle escrow, indexer): Arbitrum Sepolia (chain 421614). Mainnet for the BYTE Library contracts is gated on an external security audit. The EIP-712 PayloadAttestation signing domain is anchored on 421614 regardless of the payment rail.

Contract addresses are pinned in the bundled config; the npm release ships ready-to-use defaults. No token.

Development

bash
git clone https://github.com/0rkz/byte-mcp-server.gitcd byte-mcp-servernpm installnpm run build && npm start

License

MIT — see LICENSE.

Starter kit

Optional paid kit ($39): the buyer-side agent kit — an agent that buys and verifies feeds, with drop-in Claude Desktop / Claude Code / Cursor config and a free 30-minute readiness call included. The npm packages are and stay free MIT — the kit sells the assembled setup.

Links

來源:README.md,提交 f3a33de

工具

15

byte_search_publishers

Search publishers

Search PayPerByte publishers by topic and sort order. Returns publisher addresses, topics, subscriber counts, message counts, and price-per-KB.

輸入參數limitquerysortBy

byte_get_publisher

Get publisher info

Get on-chain info for a specific PayPerByte publisher: status, subscriber and message counts, USDC revenue, and the registered schema (size bounds, cadence, price-per-KB).

輸入參數address必填

byte_get_network_stats

Get network stats

Get PayPerByte network-wide statistics: total publishers, messages streamed, and total subscriber fees settled in USDC.

無需輸入參數。

byte_check_subscription

Check subscription

Check if an address is subscribed to a specific publisher on PayPerByte.

輸入參數publisher必填subscriber必填

byte_get_token_balances

Get token balances

Get USDC and ETH balances for an address on Arbitrum Sepolia (the on-chain testnet layer — MockUSDC settles subscriptions and fact-oracle queries there). Does NOT show the Base-mainnet USDC balance that byte_buy_data spends.

輸入參數address必填

byte_list_feeds

List feeds

List all active data feeds in the PayPerByte catalog with topics, price-per-call, and frequency (pricePerKB is a deprecated alias).

無需輸入參數。

byte_list_my_subscriptions

List my subscriptions

List every active subscription for a given wallet address. Each entry has the publisher address, topic, status, when you subscribed, messages received in 7/30 days, USDC spent in 7/30 days, and the timestamp of the last message received. Use this to see what you're currently paying for and decide whether to unsubscribe.

輸入參數indexerUrlsubscriber必填

byte_subscription_health

Subscription health

Get the content-drift signal for a publisher. Compares their last 7 days of publishing activity (cadence, message count) against their 23-day baseline (days 8-30). Returns 'stable' (steady publishing), 'moderate' (20-50% cadence shift or 24-48h silence), 'significant' (>50% shift or >48h silence), or 'unknown' (new publisher, insufficient baseline). Use this to detect when a publisher you subscribe to has pivoted content or gone dormant.

輸入參數publisher必填indexerUrl

byte_unsubscribe

Unsubscribe

Unsubscribe from a publisher's data feed. Takes effect next block: no more billing, no more data flow. Reversible — you can resubscribe later via byte_subscribe. Use this when a publisher has pivoted content (check with byte_subscription_health first) or when you simply don't want the feed anymore. Requires PRIVATE_KEY for the connected wallet.

輸入參數publisher必填

byte_subscribe

Subscribe

Subscribe to a PayPerByte publisher's data feed. By default also sets USDC allowance to DataStreamLib to type(uint256).max so the subscription doesn't silently lose payments when allowance depletes (the contract's allowance-skip path emits DataStreamed with amount=0 on transferFrom failure rather than reverting). Pass skipAllowance: true to opt out and set a finite cap manually. Requires PRIVATE_KEY.

輸入參數publisher必填skipAllowance

byte_register_publisher

Register publisher

Register as a data publisher on PayPerByte. Registers a schema and the publisher on-chain. Requires PRIVATE_KEY. PayPerByte v1 publishers are first-party and unstaked — leave stake at '0'; a non-zero USDC stake is approved to DataRegistry first if you choose to post one.

輸入參數stake必填topic必填maxSize必填frequency必填pricePerKB必填expectedSize必填

byte_publish_data

Publish data

Publish data to a subscriber via the PayPerByte DataStream contract. Hashes the payload, records size on-chain, and settles the fee in USDC. Requires PRIVATE_KEY.

輸入參數data必填maxFee必填subscriber必填

byte_query_fact

Query fact

Query a PayPerByte fact-oracle publisher for a signed answer with citations. Posts the question to a registered fact-oracle publisher (topic='fact-oracle'), waits for the on-chain BroadcastStreamed response, and returns the answer plus structured citation URLs. The signed receipt proves which publisher produced the answer (provenance + tamper-evidence), NOT that the answer is correct — ground your output in the cited sources, not in a truth guarantee. Availability: this requires a registered fact-oracle publisher actively broadcasting; if none is live the call returns a timeout rather than an answer.

輸入參數question必填topic_filtermax_byte_costmin_publisher_pqssubscriber_address必填max_response_latency_ms

byte_buy_data

Buy data

Buy a single data packet from any PayPerByte feed via the x402 payment gateway. No subscription, no allowance, no prior on-chain setup — pay-per-call USDC settlement. The MCP server signs an EIP-3009 transferWithAuthorization on behalf of the wallet whose PRIVATE_KEY is configured, the x402 facilitator submits the tx, and the data comes back inline with the on-chain settlement tx hash. Use byte_subscribe instead if you want a continuous stream of broadcasts from a publisher. The catalog of available feed slugs lives at https://x402.payperbyte.io/feeds (free GET). GET data feeds (weather, earthquakes, …) need only `feed`; the POST oracles (see https://x402.payperbyte.io/feeds for the live list and each feed's `method`) additionally require a JSON `body` (the query) — supplying `body` switches this call to POST. Requires PRIVATE_KEY env var on the MCP server and USDC on the configured wallet. NOTE: paid feeds settle REAL USDC on Base mainnet (eip155:8453) — the exact price is quoted in the 402 challenge and listed per feed at https://x402.payperbyte.io/feeds — the signed EIP-712 attestation over the exact response bytes proves delivery, not that a verdict itself is correct. Use a dedicated wallet holding only what you intend to spend.

輸入參數bodyfeed必填

byte_verify_payload

Verify payload (verify-before-act)

Verify-before-act: confirm a data payload an agent is about to act on actually matches what the publisher cryptographically attested to on-chain. Recomputes keccak256 of the received bytes and compares it to the on-chain EIP-712 PayloadAttestation hash. ALWAYS call this on BYTE-sourced data before acting on it; if verified=false the bytes were tampered/corrupted in transit and MUST NOT be used. Anchor the check with EITHER expectedHash (an on-chain payloadHash you already hold, e.g. from byte_query_fact / byte_buy_data) OR txHash (the settlement tx — also recovers the attestation signer and confirms it is the named publisher). Read-only; no wallet or payment required.

輸入參數data必填txHashhashModeexpectedHash

版本歷史

1
  1. v0.13.0最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

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

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