Privi Verify

io.github.canoydario847-cloud由 GitHub 账号 canoydario847-cloud 发布v0.4.0更新于 Oct 29, 2026

Manufacturing lot verification and chain of custody for AI agents, paid per call in USDC (x402).

已验证Streamable HTTP可网页运行金融安全与监控商业与电商

概览

AI 生成的概览

Privi Verify 让助手核查制造批次的来源、流转记录与记录完整性,付费调用通过 x402 以 USDC 结算。

可以做什么
  • 列出 Privi 工具、各自价格与付款方式
  • 查询标签、证书或文件上的记录指纹是否存在
  • 验证批次:产品、首次与最近一次流转事件、召回状态与记录完整性
  • 获取批次完整有序的事件历史及指纹,并做整链完整性检查
  • 以制造商身份追加流转事件(收货、生产、检验、发货、转移、召回)
  • 查询 PRIVI 代币价格、兑换台流动性、资金池及可选兑换报价
适用场景
适合需要确认制造批次来源、追溯其流转链路,或判断记录事后是否被篡改的场景,例如供应链核查、审计与召回检查。
运行要求
通过 streamable HTTP 连接的远程 MCP 端点;免费工具无需账号或密钥。付费工具需要支持 x402 的钱包与 Base 上的 USDC(默认测试网 base-sepolia),并在请求元数据中附带已签名付款。记录事件需要运营方签发的 Authorization Bearer 写入密钥。
安装前请注意
付费工具按次收取 USDC(验证批次与流转链),结算后不可撤回,结算失败则拿不到结果。款项直接进入运营方的收款钱包,付款前请确认网络与价格。记录事件会写入批次历史,需要写入密钥;通过 stdio 运行时本地写入须显式开启。线上端点据说明为测试网。

安装

在 SourceWeft 中

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

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

交给智能体安装

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

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

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

其他 MCP 客户端

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

{
  "mcpServers": {
    "privi-verify": {
      "type": "http",
      "url": "https://privi-verify.onrender.com/mcp"
    }
  }
}

README

Privi Verify MCP

An MCP server that lets AI agents check where a manufactured lot came from and whether its records were changed after the fact, paid per call in USDC on Base using x402.

Works with any MCP client: Claude, ChatGPT, Cursor, VS Code, and custom agents.

Live (testnet): https://privi-verify.onrender.com/mcp · demo lots DEMO-STEEL-0001, DEMO-FOOD-0001

Built by Privi World Co (Port Huron, Michigan) as the agent-facing side of Privi ChainFlow.

Tools

ToolPriceWhat it does
privi_pricingfreeLists tools, prices, network, and the payout wallet
privi_lookup_fingerprintfreeChecks whether a record fingerprint (from a label, certificate or document) exists
privi_verify_lot$0.01Lot summary: product, first and latest custody events, recall status, record integrity
privi_chain_of_custody$0.05Full ordered event history with fingerprints and an integrity check
privi_record_eventAPI keyManufacturers append events: received, produced, inspected, shipped, transferred, recalled

Prices are set with environment variables.

How records stay honest

Each event's fingerprint is a SHA-256 of its contents plus the previous event's fingerprint in the same lot. Editing or deleting any past event breaks every fingerprint after it, and both verify tools report exactly where the chain broke.

Each lot's latest fingerprint is anchored on the Privi blockchain every few minutes (see On-chain checkpoints), so anyone can check it without trusting Privi.

On-chain checkpoints

Every 5 minutes the server anchors the latest fingerprint of each lot that changed on the Privi blockchain through Privi Anchor. Audit results include onchain_checkpoint: the anchored position, transaction, and Merkle proof, plus an anchor_verify call anyone can run. If stored history no longer matches what was anchored, the audit fails even when every local hash was recomputed consistently. Set PRIVI_ANCHOR_KEY (an Anchor API key) to turn it on; PRIVI_ANCHOR_INTERVAL changes the period (seconds, default 300).

How payment works (x402 over MCP)

Follows the x402 v2 MCP transport spec:

  1. The agent calls a paid tool. The server answers isError: true with a PaymentRequired object listing price, network, USDC contract and the payTo wallet.
  2. The agent's wallet signs a USDC authorization and retries with it in _meta["x402/payment"].
  3. The server checks the payment matches the price, has the facilitator verify it, runs the tool, has the facilitator settle it, and returns the result with the receipt in _meta["x402/payment-response"].

If settlement fails, the agent gets no result. Payments go straight to the PRIVI_PAY_TO wallet; the server never holds funds or private keys.

Run it

bash
pip install .cp .env.example .env        # set PRIVI_PAY_TO and PRIVI_WRITE_KEYSpython scripts/seed_demo.py # optional demo lots (or set PRIVI_SEED_DEMO=1)privi-verify-mcp            # HTTP on :8000, MCP endpoint at /mcp

Over stdio (e.g. Claude Desktop):

json
{  "mcpServers": {    "privi-verify": {      "command": "privi-verify-mcp",      "args": ["--stdio"],      "env": { "PRIVI_PAY_TO": "0xYourWallet", "PRIVI_NETWORK": "base-sepolia" }    }  }}

Remote clients connect to https://<your-host>/mcp. GET /health returns status.

Make a test payment

scripts/test_payment.py pays the live server exactly the way an AI agent would, using a throwaway Base Sepolia wallet (free testnet USDC, no real money):

bash
pip install eth-accountpython scripts/test_payment.py --new-wallet   # prints a test wallet address# get testnet USDC at https://faucet.circle.com (Base Sepolia), then:python scripts/test_payment.py                 # pays $0.01, verifies DEMO-STEEL-0001, prints the tx link

The key is saved to .agent-wallet (git-ignored). The script refuses to pay on mainnet unless you pass --allow-mainnet.

Deploy

The Dockerfile runs on Railway, Render, Fly or any container host:

  • Set PRIVI_PAY_TO, PRIVI_WRITE_KEYS and PRIVI_NETWORK.
  • Mount a volume at /data so the SQLite database survives redeploys.
  • Start on base-sepolia with testnet USDC. Switch to base only after a full test payment works, and set PRIVI_FACILITATOR_URL to a production facilitator, since the public one is testnet only.

Recording events

bash
curl https://<your-host>/mcp \  -H 'Content-Type: application/json' \  -H 'Accept: application/json, text/event-stream' \  -H 'Authorization: Bearer <your-write-key>' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"privi_record_event",       "arguments":{"lot_code":"LOT-0001","event_type":"produced","location":"Port Huron, MI",                    "actor":"Your Plant","product":"Bracket A-12","quantity":"800 pcs"}}}'

Develop

bash
pip install -e ".[dev]"pytest

Tests cover the payment flow (missing, mismatched, invalid and failed-settlement payments), tamper detection, and write authorization, using a stand-in facilitator.

Roadmap

  • Per-manufacturer accounts and dashboards (Privi ChainFlow)
  • Postgres storage for multi-instance hosting
  • Listings in MCP directories

License

MIT © 2026 Dario Canoy, Privi World Co

来源:mcp-server/README.md,提交 9b023bb

工具

6

privi_token_market

PRIVI token market

PRIVI on Base: price, how much PRIVI and USDC the Privi swap desk holds (so whether a swap can fill), any Uniswap v3 / Aerodrome pools, and optionally a swap quote. Every paid Privi tool also accepts PRIVI. Free.

输入参数sideamount

privi_pricing

Privi pricing

List Privi Verify tools, what each costs, and how payment works.

无需输入参数。

privi_lookup_fingerprint

Look up a record fingerprint

Check whether a record fingerprint (from a label, certificate or document) exists in Privi. Free.

输入参数fingerprint必填

privi_verify_lot

Verify a lot

Verify a lot: product, first and latest custody events, recall status, and whether its record history is intact. Paid per call via x402.

输入参数lot_code必填

privi_chain_of_custody

Chain of custody

Full ordered event history for a lot with each event's fingerprint, plus an integrity check of the whole chain. Paid per call via x402.

输入参数lot_code必填

privi_record_event

Record a lot event

Append an event to a lot's history (manufacturers only). Requires 'Authorization: Bearer <key>' with a key from PRIVI_WRITE_KEYS. Over stdio, writes are allowed only when PRIVI_ALLOW_LOCAL_WRITES=1.

输入参数actor必填notesproductlocation必填lot_code必填quantityevent_type必填

版本历史

2
  1. v0.4.0最新Oct 29, 2026
  2. v0.1.0Oct 20, 2026

评分

已满足适用检查项的 90%

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

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

    请在仓库或注册中心条目中声明许可证。