Path402 — Tokenised Web Content for AI Agents

io.github.b0ase由 GitHub 帳號 b0ase 發布v1.3.2更新於 Oct 24, 2026

AI agents discover, acquire, and re-serve tokenised web content via the $402 protocol

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 代理在 $402 協定上探索、定價、購買、轉讓並轉售代幣化網頁路徑,需搭配 BSV 錢包使用。

可以做什麼
探索與評估代幣化 $位址:探查價格、供給量、收入拆分與巢狀路徑,批次探索,評估投資報酬並檢視不同供給量下的價格表。購買與管理代幣:購買代幣並取得受限內容,設定支出預算,檢視錢包餘額與持倉,轉讓代幣並檢視交易紀錄。提供內容並獲利:列出可提供的內容,向請求方分送內容以取得收入,並註冊新的 $位址作為發行方。驗證與結算付款:核驗各支援鏈上的付款證明,結算跨鏈付款並管理 BSV 銘文證明。
適用情境
當代理需要自主購買付費或代幣化網頁內容的存取權、管理代幣持倉、向其他代理轉售存取權,或透過 $402/x402 服務驗證與結算加密貨幣付款時使用。
執行需求
透過 npx 在本機執行(需要 Node.js)。需要連線至 Path402 API 的網路存取,可用 PATH402_API_URL 設定(預設 PATH402_WALLET_WIF 中的 BSV 錢包私鑰;支出受 PATH402_DEFAULT_BUDGET 限制。README 另有一個獨立的 path402d 常駐程式用於索引與提供內容。
安裝前請注意
PATH402_WALLET_WIF 是控制真實資金的 BSV 錢包私鑰;README 另提到 PATH402_WALLET_KEY 簽章金鑰。相關工具會用真實加密貨幣(聰)購買代幣、轉讓代幣與結算付款,PATH402_AUTO_ACQUIRE 可開啟自動購買。代幣價格、投資報酬預測與收入說法來自該服務,具投機性。請求與付款資料會傳送至所設定的 API 端點。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Path402 — Tokenised Web Content for AI Agents,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

path402

Turn AI agents into autonomous economic actors. Run a $402 network node.

This package includes:

  • MCP Server — AI agent tools for Claude, GPT, etc.
  • path402d Daemon — Index tokens, serve content, earn rewards

[npm version] [License: Open BSV]


Quick Start

Installation

bash
npm install -g path402

Run path402d Daemon

bash
path402d start

This starts a $402 network node that:

  • INDEX — Reads BSV blockchain, tracks all $402 tokens
  • VALIDATE — Confirms token ownership before serving
  • SERVE — Delivers content to verified token holders
  • EARN — Receives $402 rewards via PoW20

path402d CLI Commands

bash
path402d start           # Start the daemonpath402d status          # Check if runningpath402d stop            # Stop the daemonpath402d config          # Show configurationpath402d mine            # Start PoW20 mining (experimental)path402d --help          # Full help

Why Run path402d?

PoW forces operators into the open. Big nodes can't hide.

The purpose of PoW20 is NOT just to reward work—it's to force operators into visibility:

  • Computational cost → Capital investment → Scale
  • Scale → Physical presence → Regulatory visibility
  • Big nodes must identify themselves

No anonymous propaganda dealers running underground BitTorrent clients with no accountability.


MCP Server (for AI Agents)

bash
npx path402

Claude Desktop Integration

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "path402": {      "command": "npx",      "args": ["path402"],      "env": {        "PATH402_API_URL": "https://path402.com",        "PATH402_DEFAULT_BUDGET": "10000"      }    }  }}

First Conversation

You: "Discover what's available at $example.com"
Claude: [Uses path402_discover to probe the $address]        Found 3 nested tokens:        - $example.com/$blog (500 sats, 0 supply)        - $example.com/$api (1000 sats, 0 supply)        - $example.com/$premium (2500 sats, 0 supply)
You: "Evaluate if $example.com/$blog is worth acquiring"
Claude: [Uses path402_evaluate and path402_economics]        ROI Analysis:        - Current price: 500 sats        - Breakeven: 1 serve at current rates        - Projected ROI: 340% over 30 days        Recommendation: ACQUIRE (high confidence)
You: "Acquire 10 tokens"
Claude: [Uses path402_acquire]        Acquired 10 $example.com/$blog tokens        Total cost: 5,000 sats        New balance: 10 tokens

The $402 Protocol

What is $402?

$402 turns URL paths into tokenized markets. Any path prefixed with $ becomes an economic object:

$example.com              → Site-level token$example.com/$api         → API access token$example.com/$api/$premium → Premium tier token

Each token has:

  • Price curve (ascending bonding curve by default)
  • Supply counter (increases with each acquisition)
  • Holder registry (who owns what)
  • Revenue distribution (issuer/facilitator split)

Ascending Bonding Curve

Price is determined by remaining treasury, not speculation:

price = base_price / √(treasury_remaining + 1)
TreasuryPrice% Sold
500M10 sats0%
100M22 sats80%
10M71 sats98%
1M224 sats99.8%
1K7,072 sats99.9998%

Key insight: Early buyers always get better prices. This creates natural incentives for discovery and early adoption.

Self-Funding Agents

Agents can become economically self-sustaining:

  1. Acquire tokens at current price
  2. Serve content to other agents/users
  3. Earn revenue from serving
  4. Reinvest profits into more tokens

The ascending bonding curve mathematically guarantees that early acquirers can achieve positive ROI through serving.


Complete Tool Reference

Discovery & Evaluation

ToolDescription
path402_discoverProbe a $address for pricing, supply, revenue model, and nested paths
path402_batch_discoverDiscover multiple $addresses in a single call
path402_evaluateAssess ROI viability before purchasing
path402_economicsDeep financial analysis: breakeven, projections, scenarios
path402_price_scheduleView how price changes across supply levels
path402_discover
javascript
// Input{  address: "$example.com/$api"}
// Output{  address: "$example.com/$api",  exists: true,  pricing: {    model: "alice_bond",    base_price_sats: 1000,    current_price_sats: 45,    treasury_remaining: 499500000  },  supply: {    total: 500000,    max: null  },  revenue_split: {    issuer_bps: 8000,    facilitator_bps: 2000  },  nested: [    "$example.com/$api/$premium",    "$example.com/$api/$enterprise"  ],  content_type: "application/json",  description: "API access credits"}
path402_evaluate
javascript
// Input{  address: "$example.com/$api",  amount: 100,  budget_sats: 10000}
// Output{  recommendation: "ACQUIRE",  confidence: 0.85,  analysis: {    total_cost_sats: 4500,    within_budget: true,    avg_price_per_token: 45,    breakeven_serves: 5,    projected_roi_30d: 0.34,    risk_level: "low"  },  reasoning: "Early position in growing market. Favorable price curve."}

Acquisition & Wallet

ToolDescription
path402_acquirePurchase tokens and receive gated content
path402_set_budgetConfigure agent spending parameters
path402_walletView balance, holdings, and net financial position
path402_transferTransfer tokens to another address
path402_historyView transaction history
path402_acquire
javascript
// Input{  address: "$example.com/$api",  amount: 100}
// Output{  success: true,  acquired: 100,  total_cost_sats: 4500,  avg_price: 45,  new_balance: 100,  content: {    type: "api_key",    value: "sk_live_xxx...",    expires: null  },  txId: "bsv_abc123..."}
path402_wallet
javascript
// Output{  balance_sats: 45000,  holdings: [    {      address: "$example.com/$api",      balance: 100,      avg_cost: 45,      current_value: 4800,      unrealized_pnl: 300    }  ],  total_value_sats: 49800,  total_cost_sats: 49500,  net_pnl_sats: 300,  serving_revenue_sats: 1200}

Serving & Revenue

ToolDescription
path402_serveDistribute content and earn revenue
path402_servableList all content the agent can serve
path402_registerRegister a new $address as issuer
path402_serve
javascript
// Input{  address: "$example.com/$api",  requester: "agent_xyz",  amount: 1}
// Output{  served: true,  tokens_consumed: 1,  revenue_earned_sats: 40,  remaining_balance: 99,  content_delivered: true}
path402_servable
javascript
// Output{  servable: [    {      address: "$example.com/$api",      balance: 99,      serves_remaining: 99,      revenue_per_serve: 40,      total_potential_revenue: 3960    }  ],  total_serves_available: 99,  total_potential_revenue_sats: 3960}

x402 Facilitator Tools

ToolDescription
x402_verifyVerify payment proof from any supported chain
x402_settleSettle cross-chain payment via facilitator
x402_inscriptionGet or create BSV inscription proof
x402_verify
javascript
// Input{  payment_proof: "0xabc123...",  network: "base",  expected_amount: 1000,  expected_recipient: "0x..."}
// Output{  valid: true,  network: "base",  amount_sats: 1000,  recipient: "0x...",  sender: "0x...",  txId: "0x...",  timestamp: "2026-02-02T10:00:00Z",  facilitator: "path402.com"}

Configuration

Environment Variables

VariableDefaultDescription
PATH402_API_URLhttps://path402.comAPI endpoint
PATH402_DEFAULT_BUDGET10000Default budget in sats
PATH402_WALLET_KEY-Wallet signing key (for payments)
PATH402_AUTO_ACQUIREfalseAuto-acquire when recommended
PATH402_MAX_SINGLE_SPEND5000Max sats per single acquisition
PATH402_LOG_LEVELinfoLogging verbosity

Advanced Configuration

json
{  "mcpServers": {    "path402": {      "command": "npx",      "args": ["path402"],      "env": {        "PATH402_API_URL": "https://path402.com",        "PATH402_DEFAULT_BUDGET": "50000",        "PATH402_AUTO_ACQUIRE": "true",        "PATH402_MAX_SINGLE_SPEND": "10000",        "PATH402_WALLET_KEY": "your-wallet-key",        "PATH402_LOG_LEVEL": "debug"      }    }  }}

Use Cases

1. Content Discovery Agent

Agent explores the $402 namespace, discovering valuable content:

1. path402_batch_discover(["$news.com", "$research.org", "$data.io"])2. path402_evaluate() on promising finds3. path402_acquire() undervalued tokens4. path402_serve() to users who request content

2. API Gateway Agent

Agent manages API access for a team:

1. path402_acquire("$api.service.com", 1000)2. path402_wallet() to track usage3. path402_serve() when team members need API calls4. path402_acquire() more when balance runs low

3. Research Agent

Agent gathers information from paywalled sources:

1. path402_discover() research databases2. path402_economics() to evaluate cost/benefit3. path402_acquire() access to valuable sources4. Compile research using acquired content

4. Revenue-Generating Agent

Agent that pays for itself:

1. path402_acquire() tokens at low prices2. path402_servable() to list inventory3. path402_serve() to other agents4. path402_wallet() to track profits5. Reinvest profits into more tokens

Supported Networks

NetworkStatusAssets
BSVPrimaryBSV, BSV-20 tokens
BaseSupportedUSDC, ETH
SolanaSupportedUSDC, SOL
EthereumSupportedUSDC, ETH, USDT

BSV is the settlement layer. Payments from other chains are verified and inscribed on BSV for permanent proof.


API Reference

PATH402.com Endpoints

$PATH402 Token (PATH402's own token)

EndpointMethodDescription
/api/token/statsGET$PATH402 statistics & pricing
/api/token/buyPOSTAcquire $PATH402 tokens
/api/token/holdingGETUser's $PATH402 holdings

Multi-Tenant Marketplace (any $address)

EndpointMethodDescription
/api/tokensGETList all registered tokens
/api/tokensPOSTRegister new $address
/api/tokens/[address]GETToken details + price schedule
/api/tokens/[address]POSTAcquire tokens
/api/tokens/holdingsGETUser's holdings (all tokens)
/api/tokens/transferPOSTTransfer tokens
/api/tokens/historyGETTransaction history

x402 Facilitator (payment verification)

EndpointMethodDescription
/.well-known/x402.jsonGETDiscovery document
/api/x402/verifyPOSTVerify payment
/api/x402/settlePOSTSettle payment
/api/x402/inscriptionGET/POSTInscription management
/api/x402/statsGETFacilitator statistics

Development

Running Locally

bash
git clone https://github.com/b0ase/path402cd path402npm installnpm run dev

Testing

bash
npm testnpm run test:integration

Building

bash
npm run build

Roadmap

v1.0.0 (Current)

  • ✅ 10 core tools
  • ✅ ascending bonding curve pricing
  • ✅ Budget management
  • ✅ Simulated acquisition/serving

v1.1.0 (In Progress)

  • 🔲 Live HTTP client for path402.com
  • 🔲 x402 facilitator tools (verify, settle, inscription)
  • 🔲 Real payment integration

v1.2.0 (Planned)

  • 🔲 Transfer and history tools
  • 🔲 Multi-agent coordination
  • 🔲 Persistent storage

v1.3.0 (Planned)

  • 🔲 Creator tools (register)
  • 🔲 Advanced analytics
  • 🔲 Agent marketplace integration

Contributing

Contributions welcome! Please read our Contributing Guide.

bash
# Fork the repogit checkout -b feature/your-feature# Make changesnpm testgit commit -m "Add your feature"git push origin feature/your-feature# Open a PR

License

Open BSV License version 4


Links


Support

來源:README.md,提交 eade257

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.3.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分