mcpField
P
Path402 — Tokenised Web Content for AI Agents

Path402 — Tokenised Web Content for AI Agents

本地服务
github.com/b0ase金融数据126 周前更新

关于 Path402 — Tokenised Web Content for AI Agents

path402 将面向 AI Agent 的 MCP 服务与守护进程结合,后者索引 $402 代币、验证所有权并提供受限内容。其工具涵盖代币发现、获取、钱包管理和内容服务,面向代币化网络市场。

主要功能

  1. 01发现并评估代币化路径
  2. 02获取代币和受限内容
  3. 03管理预算与钱包持仓
  4. 04提供内容并赚取奖励
  5. 05查看付款凭证与结算

适用场景

  1. 01发现并评估付费研究来源
  2. 02管理团队对代币化 API 的访问
  3. 03向其他 Agent 提供已获取内容
  4. 04跟踪代币持仓与支出

MCP 相关

提供 MCP 工具,用于发现和评估 $402 代币、获取内容、管理钱包、提供内容及处理 x402 付款操作。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"b0ase-path402": {
"command": "npx",
"args": [
"-y",
"path402"
],
"env": {
"PATH402_API_URL": "<PATH402_API_URL>",
"PATH402_DEFAULT_BUDGET": "<PATH402_DEFAULT_BUDGET>",
"PATH402_WALLET_WIF": "<PATH402_WALLET_WIF>"
}
}
}
}
启动命令npx -y path402
需要配置的环境变量
PATH402_API_URLBase URL of the Path402 API server (default: https://path402.com)
PATH402_DEFAULT_BUDGETDefault spending budget in satoshis for token acquisitions
PATH402_WALLET_WIF密钥BSV wallet private key (WIF format) for on-chain acquisitions

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npmpath4021.3.2

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

path402

将 AI Agent 转变为自主的经济参与者。运行一个 $402 网络节点。

此软件包包含:

  • MCP Server — 为 Claude、GPT 等提供 AI Agent 工具
  • path402d Daemon — 索引代币、提供内容并赚取奖励

npm 版本 许可证:Open BSV


快速入门

安装
npm install -g path402
运行 path402d Daemon
path402d start

这会启动一个 $402 网络节点,它将:

  • 索引 — 读取 BSV 区块链,追踪所有 $402 代币
  • 验证 — 在提供服务前确认代币所有权
  • 提供服务 — 向已验证的代币持有者交付内容
  • 赚取收益 — 通过 PoW20 获得 $402 奖励
path402d CLI 命令
path402d start           # Start the daemon
path402d status          # Check if running
path402d stop            # Stop the daemon
path402d config          # Show configuration
path402d mine            # Start PoW20 mining (experimental)
path402d --help          # Full help
为什么运行 path402d?

PoW 迫使运营者公开身份。大型节点无法隐匿。

PoW20 的目的不仅仅是奖励工作,而是迫使运营者公开身份:

  • 计算成本 → 资本投入 → 规模
  • 规模 → 实际存在 → 监管可见性
  • 大型节点必须表明身份

不会有匿名宣传品贩子在地下运行 BitTorrent 客户端且不承担任何责任。


MCP Server(面向 AI Agent)

npx path402
Claude Desktop 集成

将以下内容添加到你的 claude_desktop_config.json:

{
  "mcpServers": {
    "path402": {
      "command": "npx",
      "args": ["path402"],
      "env": {
        "PATH402_API_URL": "https://path402.com",
        "PATH402_DEFAULT_BUDGET": "10000"
      }
    }
  }
}
首次对话
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

$402 协议

什么是 $402?

$402 将 URL 路径转化为代币化市场。任何以 $ 为前缀的路径都会成为经济对象:

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

每种代币都有:

  • 价格曲线(默认采用递增的联合曲线)
  • 供应量计数器(每次购买时递增)
  • 持有者登记表(谁拥有什么)
  • 收入分配(发行方/促成方分成)
递增联合曲线

价格由剩余金库决定,而非投机行为:

price = base_price / √(treasury_remaining + 1)
金库价格已售比例
500M10 sats0%
100M22 sats80%
10M71 sats98%
1M224 sats99.8%
1K7,072 sats99.9998%

关键见解:早期买家总能获得更优惠的价格。这会自然形成探索和早期采用的动力。

自我供资的 Agent

Agent 可以实现经济上的自给自足:

  1. 按当前价格购买代币
  2. 向其他 Agent/用户提供内容
  3. 通过提供服务赚取收入
  4. 将利润再投资于更多代币

递增联合曲线从数学上保证,早期购买者可以通过提供服务获得正 ROI。


完整工具参考

发现与评估
工具说明
path402_discover探测一个 $address,了解其定价、供应量、收入模式和嵌套路径
path402_batch_discover在一次调用中发现多个 $address
path402_evaluate购买前评估 ROI 可行性
path402_economics深入的财务分析:盈亏平衡点、预测和情景分析
path402_price_schedule查看价格如何随供应量变化
path402_discover
// 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
// 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."
}
购买与钱包
工具说明
path402_acquire购买代币并获取受限内容
path402_set_budget配置 Agent 支出参数
path402_wallet查看余额、持仓和净财务状况
path402_transfer将代币转给另一个地址
path402_history查看交易历史
path402_acquire
// 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
// 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
}
服务与收入
工具说明
path402_serve分发内容并赚取收入
path402_servable列出 Agent 可以提供的所有内容
path402_register注册新的 $address 作为发行方
path402_serve
// 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
// 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 促进工具
工具描述
x402_verify验证来自任何受支持链的付款证明
x402_settle通过促进服务结算跨链付款
x402_inscription获取或创建 BSV 铭文证明
x402_verify
// 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"
}

配置

环境变量
变量默认值描述
PATH402_API_URLhttps://path402.comAPI 端点
PATH402_DEFAULT_BUDGET10000默认预算,单位为 sats
PATH402_WALLET_KEY-钱包签名密钥(用于付款)
PATH402_AUTO_ACQUIREfalse在建议时自动获取
PATH402_MAX_SINGLE_SPEND5000单次获取的最大 sats 数
PATH402_LOG_LEVELinfo日志详细程度
高级配置
{
  "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"
      }
    }
  }
}

使用场景

1. 内容发现 Agent

Agent 探索 $402 命名空间,发现有价值的内容:

1. path402_batch_discover(["$news.com", "$research.org", "$data.io"])
2. path402_evaluate() on promising finds
3. path402_acquire() undervalued tokens
4. path402_serve() to users who request content
2. API 网关 Agent

Agent 为团队管理 API 访问:

1. path402_acquire("$api.service.com", 1000)
2. path402_wallet() to track usage
3. path402_serve() when team members need API calls
4. path402_acquire() more when balance runs low
3. 研究 Agent

Agent 从付费墙保护的来源收集信息:

1. path402_discover() research databases
2. path402_economics() to evaluate cost/benefit
3. path402_acquire() access to valuable sources
4. Compile research using acquired content
4. 创收 Agent

能够自给自足的 Agent:

1. path402_acquire() tokens at low prices
2. path402_servable() to list inventory
3. path402_serve() to other agents
4. path402_wallet() to track profits
5. Reinvest profits into more tokens

支持的网络

网络状态资产
BSV主要网络BSV、BSV-20 代币
Base支持USDC、ETH
Solana支持USDC、SOL
Ethereum支持USDC、ETH、USDT

BSV 是结算层。来自其他链的付款会在 BSV 上验证并铭刻,以提供永久证明。


API 参考

PATH402.com 端点

$PATH402 代币(PATH402 自有代币)

端点方法描述
/api/token/statsGET$PATH402 统计数据和定价
/api/token/buyPOST获取 $PATH402 代币
/api/token/holdingGET用户持有的 $PATH402 代币

多租户市场(任意 $address)

端点方法描述
/api/tokensGET列出所有已注册的代币
/api/tokensPOST注册新的 $address
/api/tokens/[address]GET代币详情和价格计划
/api/tokens/[address]POST获取代币
/api/tokens/holdingsGET用户持有的代币(所有代币)
/api/tokens/transferPOST转移代币
/api/tokens/historyGET交易历史

x402 促进服务(付款验证)

端点方法描述
/.well-known/x402.jsonGET发现文档
/api/x402/verifyPOST验证付款
/api/x402/settlePOST结算付款
/api/x402/inscriptionGET/POST铭文管理
/api/x402/statsGET促进服务统计数据

开发

本地运行
git clone https://github.com/b0ase/path402
cd path402
npm install
npm run dev
测试
npm test
npm run test:integration
构建
npm run build

路线图

v1.0.0(当前)
  • ✅ 10 个核心工具
  • ✅ 递增式联合曲线定价
  • ✅ 预算管理
  • ✅ 模拟获取/提供服务
v1.1.0(进行中)
  • 🔲 面向 path402.com 的实时 HTTP 客户端
  • 🔲 x402 促进工具(验证、结算、铭文)
  • 🔲 实际付款集成
v1.2.0(计划中)
  • 🔲 转移和历史记录工具
  • 🔲 多 Agent 协作
  • 🔲 持久化存储
v1.3.0(计划中)
  • 🔲 创作者工具(注册)
  • 🔲 高级分析
  • 🔲 Agent 市场集成

贡献

欢迎贡献!请阅读我们的贡献指南。

# Fork the repo
git checkout -b feature/your-feature
# Make changes
npm test
git commit -m "Add your feature"
git push origin feature/your-feature
# Open a PR

许可证

Open BSV License version 4


链接


Support

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。