关于 Path402 — Tokenised Web Content for AI Agents
path402 将面向 AI Agent 的 MCP 服务与守护进程结合,后者索引 $402 代币、验证所有权并提供受限内容。其工具涵盖代币发现、获取、钱包管理和内容服务,面向代币化网络市场。
主要功能
- 01发现并评估代币化路径
- 02获取代币和受限内容
- 03管理预算与钱包持仓
- 04提供内容并赚取奖励
- 05查看付款凭证与结算
适用场景
- 01发现并评估付费研究来源
- 02管理团队对代币化 API 的访问
- 03向其他 Agent 提供已获取内容
- 04跟踪代币持仓与支出
MCP 相关
提供 MCP 工具,用于发现和评估 $402 代币、获取内容、管理钱包、提供内容及处理 x402 付款操作。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
npx -y path402PATH402_API_URLBase URL of the Path402 API server (default: https://path402.com)PATH402_DEFAULT_BUDGETDefault spending budget in satoshis for token acquisitionsPATH402_WALLET_WIF密钥BSV wallet private key (WIF format) for on-chain acquisitions本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
path402
将 AI Agent 转变为自主的经济参与者。运行一个 $402 网络节点。
此软件包包含:
- MCP Server — 为 Claude、GPT 等提供 AI Agent 工具
- path402d Daemon — 索引代币、提供内容并赚取奖励
快速入门
安装
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)
| 金库 | 价格 | 已售比例 |
|---|---|---|
| 500M | 10 sats | 0% |
| 100M | 22 sats | 80% |
| 10M | 71 sats | 98% |
| 1M | 224 sats | 99.8% |
| 1K | 7,072 sats | 99.9998% |
关键见解:早期买家总能获得更优惠的价格。这会自然形成探索和早期采用的动力。
自我供资的 Agent
Agent 可以实现经济上的自给自足:
- 按当前价格购买代币
- 向其他 Agent/用户提供内容
- 通过提供服务赚取收入
- 将利润再投资于更多代币
递增联合曲线从数学上保证,早期购买者可以通过提供服务获得正 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_URL | https://path402.com | API 端点 |
PATH402_DEFAULT_BUDGET | 10000 | 默认预算,单位为 sats |
PATH402_WALLET_KEY | - | 钱包签名密钥(用于付款) |
PATH402_AUTO_ACQUIRE | false | 在建议时自动获取 |
PATH402_MAX_SINGLE_SPEND | 5000 | 单次获取的最大 sats 数 |
PATH402_LOG_LEVEL | info | 日志详细程度 |
高级配置
{
"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/stats | GET | $PATH402 统计数据和定价 |
/api/token/buy | POST | 获取 $PATH402 代币 |
/api/token/holding | GET | 用户持有的 $PATH402 代币 |
多租户市场(任意 $address)
| 端点 | 方法 | 描述 |
|---|---|---|
/api/tokens | GET | 列出所有已注册的代币 |
/api/tokens | POST | 注册新的 $address |
/api/tokens/[address] | GET | 代币详情和价格计划 |
/api/tokens/[address] | POST | 获取代币 |
/api/tokens/holdings | GET | 用户持有的代币(所有代币) |
/api/tokens/transfer | POST | 转移代币 |
/api/tokens/history | GET | 交易历史 |
x402 促进服务(付款验证)
| 端点 | 方法 | 描述 |
|---|---|---|
/.well-known/x402.json | GET | 发现文档 |
/api/x402/verify | POST | 验证付款 |
/api/x402/settle | POST | 结算付款 |
/api/x402/inscription | GET/POST | 铭文管理 |
/api/x402/stats | GET | 促进服务统计数据 |
开发
本地运行
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
许可证
链接
- 网站:path402.com
- 白皮书:path402.com/whitepaper
- 交易所:path402.com/exchange
- 文档:path402.com/docs
- GitHub:github.com/b0ase/path402
Support
- Issues: GitHub Issues
- Email: [email protected]
- Twitter: @b0ase
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。