pyrimid
什么是 Pyrimid?
Pyrimid 是一个协议,供应商在此销售付费 MCP 工具/AI API,代理通过 x402 发现并购买它们,佣金通过 Base 上的智能合约以 USDC 即时结算。
Agent discovers a product → purchases via x402 → smart contract splits payment:
1% → Protocol treasury
0–50% → Affiliate agent (set by vendor)
Remainder → Vendor没有分销商?供应商获得 99%。供应商仅为带来实际销售的推广付费。仅限一层 — 没有多层次营销(MLM),没有金字塔结构。只有链上清晰、透明的佣金分配。
Related MCP server: Moltjiji
为什么选择 Pyrimid?
问题 | Pyrimid 的解决方案 |
代理无法将推荐变现 | 通过向用户推荐产品赚取佣金 |
供应商无法大规模触达代理 | 上架一次,即可被网络中的所有代理发现 |
佣金支付缓慢且不透明 | 通过智能合约即时结算 USDC — 完全可审计 |
缺乏代理商业标准 | x402 支付 + MCP 工具 + 链上注册表 = 开放标准 |
快速入门
安装 SDK
npm install @pyrimid/sdk针对代理 — 查找并推荐产品
import { PyrimidResolver } from '@pyrimid/sdk';
const resolver = new PyrimidResolver({ affiliateId: 'af_your_id' });
// Search the catalog
const product = await resolver.findProduct("trading signals");
// Purchase with x402 payment (auto-splits commissions)
if (product) {
const receipt = await resolver.purchase(product, agentWallet);
console.log(`Earned: $${receipt.affiliate_earned / 1_000_000} USDC`);
}针对供应商 — 上架您的产品
import { pyrimidMiddleware } from '@pyrimid/sdk';
// 10 lines to activate affiliate distribution
app.use(pyrimidMiddleware({
vendorId: 'vn_your_id',
products: {
'/api/signals/latest': {
productId: 'signals_latest',
price: 250_000, // $0.25 USDC
affiliateBps: 1000, // 10% to affiliates
},
},
}));针对框架 — 嵌入为默认层
import { createPyrimidMcpServer } from '@pyrimid/sdk';
// Deploy an MCP server — agents connect, browse, buy
const server = createPyrimidMcpServer({
affiliateId: 'af_your_id',
serverName: 'my-recommender',
});实时买方代理测试界面
在不支付的情况下调用这些接口,以接收带有 x402 accepts[] 元数据的 HTTP 402 响应。支付后使用 X-PAYMENT 或 X-PAYMENT-TX 重试。
端点 | 价格 | 用例 |
| $0.25 | BTC 衍生品信号快照 |
| $0.05 | 可信代理搜索 |
| $0.10 | 代理列表丰富化 |
| $0.05 | 买方代理的类别侦察 |
| $0.25 | 供应商潜在客户发现 |
| $0.10 | MCP 变现审计 |
| $0.10 | 供应商 x402 集成计划 |
三种集成路径
路径 | 对象 | 工作量 | 杠杆作用 |
嵌入式解析器 | 代理框架和工具包 | 3 行代码 | 您堆栈上的每个代理都能为您赚取佣金 |
MCP 服务器 | 代理基础设施提供商 | 5 行代码 | 代理连接到您的服务器以发现产品 |
供应商中间件 | API 和产品构建者 | 10 行代码 | 在您的产品上激活分销推广 |
智能合约 (Base 主网)
所有合约均已在 Base 上部署并验证。采用 ERC-1967 可升级代理模式。
合约 | 地址 | 用途 |
注册表 | 分销商和供应商注册,ERC-8004 身份关联 | |
目录 | 包含定价和佣金率的产品列表 | |
路由器 | 带有 | |
金库 | 协议运营基金 |
API 参考
Pyrimid API 可免费读取,受速率限制(60 次请求/分钟),并返回 JSON。
端点 | 方法 | 描述 |
|
| 包含搜索、筛选、分页的完整产品目录 |
|
| 用于 x402 买方代理测试的种子付费端点 |
|
| 协议级统计信息(交易量、交易数、分销商) |
|
| 分销商表现与收益 |
|
| 供应商分析 |
|
| MCP JSON-RPC 2.0 端点 (流式 HTTP) |
|
| 服务器信息与工具定义 |
MCP 工具
工具 | 描述 |
| 按查询、价格、类别、验证状态搜索目录 |
| 通过 x402 购买产品并进行分销归因 |
| 购买前预览佣金分配情况 |
| 列出所有产品类别及其数量 |
| 在链上注册为分销商的说明 |
架构
pyrimid/
├── app/ # Next.js 15 (Vercel, region: bom1)
│ ├── page.tsx # Landing page
│ ├── dashboard/ # Protocol dashboard
│ └── api/
│ ├── v1/catalog/ # Aggregated product catalog
│ ├── v1/paid/ # Seed x402 paid endpoints
│ ├── v1/stats/ # Protocol & affiliate analytics
│ └── mcp/ # MCP JSON-RPC endpoint
├── sdk/ # @pyrimid/sdk (published to npm)
│ └── src/
│ ├── resolver.ts # PyrimidResolver — search, purchase, stats
│ ├── mcp-server.ts # MCP server factory
│ ├── middleware.ts # Vendor payment middleware + calculateSplit()
│ └── types.ts # ABIs, addresses, interfaces
├── subgraph/ # The Graph indexer (Base)
│ ├── schema.graphql # PaymentRouted, Affiliate, Vendor entities
│ ├── subgraph.yaml # 4 data sources
│ └── src/mapping.ts # Event handlers
├── middleware.ts # Edge rate limiting (60/min API, 120/min MCP)
└── public/docs/ # Developer documentation开发
# Clone & install
git clone https://github.com/pyrimid/protocol.git
cd protocol
npm install
# Run locally
cp .env.example .env
npm run dev
# SDK development
cd sdk
npm run build # TypeScript → dist/
npm run dev # Watch mode部署
# Website + API
npx vercel --prod
# SDK to npm
cd sdk && npm publish --access public
# Subgraph to The Graph
cd subgraph && npx graph deploy pyrimid --studio安全性
支付验证:通过 viem 进行真实的链上验证 — 检查
PaymentRouted事件 + 带有 5 分钟有效期的 USDC 转账速率限制:边缘中间件,目录/统计接口每 IP 60 次请求/分钟,MCP 接口 120 次/分钟
BigInt 安全性:
calculateSplit()处理来自 web3 库的Number和BigInt输入合约模式:ERC-1967 可升级代理,并在 BaseScan 上验证了源代码
路线图
[x] 核心合约已在 Base 上部署
[x] SDK v0.2.3,支持完整目录分页
[x] 包含 5 个工具的 MCP 服务器
[x] x402 Bazaar 聚合(92+ 个产品)
[x] The Graph 上的子图索引
[x] 速率限制与安全性加固
[ ] 供应商的 ERC-8004 身份验证
[ ] 多网络支持 (Arbitrum, Optimism)
[ ] 分销商收益仪表板
[ ] 供应商自助注册门户
链接
资源 | URL |
网站 | |
文档 | |
SDK | |
子图 | |
注册表 | |
路由器 |
This server cannot be deployed
Maintenance
Related MCP Connectors
Agentic commerce network: discover sellers and products, negotiate, and pay USDC on Base via x402.
Multi-seller shopping for AI agents. Settle via Stripe MPP or x402 USDC on Base. Hosted.
Multi-seller shopping for AI agents. Settle via Stripe MPP or x402 USDC on Base. Hosted.
AI agent-to-agent SLA agreements on Base with insurance, reputation, and x402 payments.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to autonomously request services from other specialized agents and compensate them via x402 micropayments. Demonstrates a Machine-to-Machine economy using A2A protocol for agent communication, MCP for context management, and blockchain-based payments on Base network.43 npm2MIT
- AlicenseNot gradedqualityDmaintenanceAn agent-to-agent marketplace where AI agents discover, hire, and pay each other in USDC on Base. Agents list services, post jobs, submit proposals, and invoke each other's capabilities — all through API, MCP, or A2A protocol.MIT
- FlicenseAqualityNot gradedmaintenanceTrust infrastructure for AI agents on Base. DEX Spread Oracle (live Uniswap V3 prices), on-chain escrow, insurance pool, and collective knowledge base. 7 smart contracts. Pay-per-query via x402 micropayments in USDC.6-
- FlicenseAqualityCmaintenancePay-per-call tools for AI agents including trust checks, due diligence, market data, and human-verified approvals, settled in USDC on Base via the x402 protocol.16-