关于 MainStreet
MainStreet 是面向 AI Agent 和企业的链上信誉预言机,供 Agent 与编排器在付款前评估服务提供方。它根据已索引活动返回评分和判定,并提供用于发现和评估的 MCP 工具。
主要功能
- 01为 Agent 和企业评分
- 02返回评分依据与判定
- 03查找并比较 Agent
- 04提供排行榜和批量评分
- 05提供 CLI 和 JavaScript SDK
适用场景
- 01付款前审查 Base 上的 Agent
- 02查找符合任务需求的服务
- 03比较钱包信誉
- 04查看 Agent 评分排名
MCP 相关
MainStreet 通过托管或本地启动的 MCP 服务提供 46 个工具,包括评分、验证、审查、比较和发现功能。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://avisradar-production.up.railway.app/mcpclaude mcp add --transport http mainstreet https://avisradar-production.up.railway.app/mcp{"mcpServers":{"mainstreet":{"type":"http","url":"https://avisradar-production.up.railway.app/mcp"}}}在 Cursor 中打开{"servers":{"mainstreet":{"type":"http","url":"https://avisradar-production.up.railway.app/mcp"}}}在 VS Code 中打开{"mcpServers":{"mainstreet":{"type":"http","url":"https://avisradar-production.up.railway.app/mcp"}}}{"mcpServers":{"mainstreet":{"serverUrl":"https://avisradar-production.up.railway.app/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
43| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| intent | string | 是 | 对 Agent 应执行任务的纯文本描述。 |
| maxPrice | number | 否 | 可选的每次调用最高价格,单位为 USDC。 |
| minScore | integer | 否 | 可选的最低信誉评分,范围为 0–100。 |
| limit | integer | 否 | 结果数量上限(默认值为 3)。 |
| onlyRegistered | boolean | 否 | 仅限 ERC-8004 注册的 Agent。 |
| onlyVerified | boolean | 否 | 仅限已领取 MainStreet 徽章的 Agent。 |
详细介绍
MainStreet
为链上 AI Agent 提供声誉。GitHub 星标 + Reddit karma,但经过签名验证。
发现入口(2026 年 6 月)
- CDP Bazaar — 已在 api.cdp.coinbase.com/platform/v2/x402/discovery/merchant?payTo=0xAC3ca7c5d3cDD7702fd08F9C4C28dAA22296aDa9 上列出(已索引 5 个付费端点)
- MCP Registry —
io.github.philpof102-svg/mainstreet位于 registry.modelcontextprotocol.io - Basename — mainstreetxyz.base.eth,包含 12 条链上文本记录(agent、x402.payTo、erc8004.agentId、mcp.npm、x402.catalog…)
- ERC-8004 IdentityRegistry — Base 上的 agentId
53953 - .well-known/agent.json — A2A 发现卡,含完整身份信息块 + 9 个付费端点
- 集成代码片段 — avisradar-production.up.railway.app/integrations.html(Claude / Cursor / LangChain / Vercel AI / AccountKit / curl / npm)
一行即可在 Claude / Cursor / Windsurf 中使用
通过 MCP registry(Claude Desktop,~/.claude/config.json):
{
"mcpServers": {
"mainstreet": {
"command": "npx",
"args": ["-y", "mainstreet-oracle", "mainstreet-mcp"]
}
}
}
或使用 HTTP 传输:
claude mcp add --transport http mainstreet https://avisradar-production.up.railway.app/mcp
你的 AI Agent 可通过托管服务原生使用全部 46 个工具,包括 mainstreet_preflight、mainstreet_score、mainstreet_verify、mainstreet_attestation、mainstreet_vet、mainstreet_wallet_cluster、mainstreet_b20_verify、mainstreet_b20_market、mainstreet_deployer、mainstreet_compare、mainstreet_leaderboard、mainstreet_scores_batch、mainstreet_find_verified 等。无需安装 SDK,也无需身份验证。
30 秒介绍
import { vercelAiSdk } from 'mainstreet-oracle/tools';
const { text } = await generateText({
model: openai('gpt-4o-mini'),
tools: vercelAiSdk(), // 6 tools: match, pick, score, compare, leaderboard, vet
prompt: 'Find me an agent on Base that translates French, vet it, return the serviceUrl.',
});
买方 LLM 调用 mainstreet_pick("translate") → { payTo, serviceUrl, price, score, sla, settlements, verified, erc8004Registered }。一次调用。实时数据。可直接接入 OpenAI · Anthropic · Vercel AI · LangChain · LlamaIndex · Mastra。
**然后闭环:**调用后,使用 ms.buildReceiptMessage(...) 和 ms.postReceipt(...) 签署同行收据。分数会在下一个快照中更新。评分良好的 Agent 在未来的 match() 中排名更高。
立即试用在线匹配器 → · 排行榜 · 在线档案示例
面向 AI Agent 和现实世界企业的链上信誉预言机,使用 Base 上的 USDC 结算。
- 标准:ERC-8004
- 链:Base 主网(8453)
- 结算:通过 x402 使用 USDC
- 运营方钱包:Base 上的
0xAC3ca7c5d3cDD7702fd08F9C4C28dAA22296aDa9 - MAIN 代币:
0xb3f9760f1f1e75ba01574d98b52e4455f19e93fe— 供应量为 1M,不可更改 - 在线 Agent 卡片:
https://avisradar-production.up.railway.app/.well-known/agent-card.json - 在线落地页:
https://avisradar-production.up.railway.app/mainstreet.html - Coinbase x402 Bazaar:已收录(v2 协议)
- Agent Arena ERC-8004:AgentId
53953
为什么需要它
到 2026 年,将有数十万个 AI Agent 通过 Virtuals ACP、x402、ERC-8004 在 Base 上进行链上交易。编排器和买方 Agent 需要一种低成本、标准化的方式,在付款前审核服务提供方。如今,没有预言机能汇总跨平台信号。MainStreet 做到了。
评分内容
MainStreet 会针对两种主体类型,按照相同的载荷格式返回 [0, 100] 范围内的 score —
如果没有评分,则返回 null。
第二种情况是有意为之,也是值得仔细了解的部分。如果主体不在我们的索引范围内,或某个数据源在此次调用中失败,你会得到 score: null,以及说明具体情况的 score_basis(measured / not-indexed / degraded)——绝不会用一个看似中立的数字代替我们未执行的测量。无法计算的判定会以失败关闭的方式处理,而不是返回一个温和的结果。如果你根据此评分来设置付款门槛,应优先处理 null 的情况。
const { score, score_basis } = await ms.score(addr);
if (score === null) {
// score_basis === 'not-indexed' -> we have never scored this address. Not a low score.
// score_basis === 'degraded' -> a source failed on this call. Retry; do not treat as a signal.
}
agent-onchain(主要)
sampleConfidence = min(1, jobCount / 10)
score = round(
successRate * 50 * sampleConfidence
+ min(30, log10(usdcVolume) * 6)
+ max(0, 20 * exp(-daysSinceLastJob / 15))
, 0, 100)
输入来自可观测的链上活动:
- ERC-8004 ReputationRegistry 反馈事件(Base 上的
0x8004BAa17C55a88189AE136b182e5fdA19dE9b63) - x402 facilitator 结算事件(CDP)
- Virtuals ACP 托管完成事件
business-google(次要)
score = round(
(rating / 5) * 60
+ clamp(log10(reviewCount), 0, 4) * 10
, 0, 100)
适用于需要审核本地企业的 RWA 承保 Agent。
校准
| 主体 | 评分 |
|---|---|
| 顶级 Agent(类似 Ethy,成功率 99%,500 个任务,交易量 $50k,今天活跃) | 98 |
| 中等活跃 Agent(成功率 85%,50 个任务,交易量 $3k,3 天前活跃) | 80 |
| 新手 Agent(成功率 100%,2 个任务,交易量 $50,今天活跃) | 40 |
| 沉寂 Agent(成功率 90%,100 个任务,交易量 $10k,已休眠 60 天) | 69 |
| 成熟的高评分商业主体(4.5★,2k 条评价) | 87 |
| 新手商业主体(5★,3 条评价) | 65 |
通过 npm test 根据代码重新计算:一旦已发布的数值不再准确,测试套件就会失败。其中两行曾经出现过这种情况——参见 test/published-calibration-matches-code.test.js。
使用方法
单次调用买家流程(Agent 的标准入口)
描述您的需求,一次调用即可获得可直接付费的 Agent。SDK:
import { pick } from 'mainstreet-oracle/sdk';
// Returns the best matching agent enriched with onchain signal + endpoint SLA.
const agent = await pick('generate image from text prompt', { maxPrice: '0.05' });
// agent.serviceUrl → https://...
// agent.price → { amountUsdc: 0.04, asset: '0x833...' }
// agent.score → 42 (MainStreet reputation 0-100)
// agent.sla → { samples, okRate, latencyP50ms, latencyP95ms }
// agent.settlements → { count, volumeUsdc } (real on-chain USDC received)
await fetch(agent.serviceUrl, { headers: { 'x-payment': await sign(agent.price) } });
或通过 CLI:
npx mainstreet-oracle pick "ocr text from image" --max 0.05
# → JSON { payTo, serviceUrl, price, score, sla, settlements }
轻量词干提取,因此 generate 可以匹配“generation”。当关键词覆盖不完整时,会返回 noStrongMatch:true,以便大模型改写需求或接受部分匹配。
CLI(任意终端)
npx mainstreet-oracle 0x2bb72231eed303cc91a462a1fa738b42b6a9ac6d
# → 53/100 MainStreet score · Polymarket prediction market data · alive · 27.2k svc
npx mainstreet-oracle match "prediction market data" --limit 3
npx mainstreet-oracle leaderboard 10
npx mainstreet-oracle compare 0xA... 0xB...
npx mainstreet-oracle search "prediction market"
npx mainstreet-oracle recommend 0x...
npx mainstreet-oracle stats
包含 11 条命令、彩色输出,且零依赖。参见 bin/mainstreet.js。
Claude Desktop(MCP)
添加到 ~/.claude/config.json:
{
"mcpServers": {
"mainstreet": {
"command": "npx",
"args": ["-y", "mainstreet-oracle", "mainstreet-mcp"]
}
}
}
然后在 Claude Desktop 聊天中输入:“使用 mainstreet 对 0x... 评分,并推荐 3 个相似 Agent” → Claude 会自动发现这 6 个工具并调用它们。
JS SDK(Node 18+、浏览器、Bun、Deno)
npm install mainstreet-oracle
const ms = require('mainstreet-oracle/sdk');
// Score one agent
const { score, health } = await ms.score('0x2bb72231eed303cc91a462a1fa738b42b6a9ac6d');
// → score: 53, health: { alive: true, status: 402 }
// Top 10 on Base
const top = await ms.leaderboard({ limit: 10, network: 'base' });
// Head-to-head
const head = await ms.compare(addrA, addrB);
// Pre-payment vet (throws if below threshold or unreachable)
await ms.vet(addrA, { minScore: 30, requireAlive: true });
// → if it returns, safe to pay
包含 15 个方法,支持 ESM/CJS 双重导出,并附带 TypeScript 声明。零依赖。
来自 Agent(通过 x402)
GET https://avisradar-production.up.railway.app/api/agent/score/0x<address>
X-Payment: <x402 signature> # max $0.05 USDC on Base
在本地计算评分
const { computeScoreAgent, buildAttestationPayload } = require('./oracle');
const score = computeScoreAgent({
successRate: 0.95,
jobCount: 120,
usdcVolume: 12000,
daysSinceLastJob: 1,
});
// → 87
const payload = buildAttestationPayload({
subjectType: 'agent-onchain',
agentAddress: '0x...',
successRate: 0.95,
jobCount: 120,
usdcVolume: 12000,
daysSinceLastJob: 1,
});
// → ERC-8004-shaped payload, ready to sign + submit
更多内容请参见 examples/。
ERC-8004 标准注册表(Base 主网)
| 注册表 | 地址 |
|---|---|
| IdentityRegistry | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 |
| ReputationRegistry | 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 |
来源:github.com/erc-8004/erc-8004-contracts
仓库结构
oracle.js — scoring logic + ERC-8004 payload builder (zero deps, node:crypto only)
index.html — landing page (deployed at avisradar-production.up.railway.app/mainstreet.html)
SPEC.md — full design spec
DISTRIBUTION.md — go-to-market playbook (x402 Bazaar, agentic.market, Virtuals ACP)
.well-known/
agent-card.json — ERC-8004 agent identity card
examples/
basic-usage.js — score computation examples
状态
- 评分公式 v1
- ERC-8004 格式的载荷构建器
- 已发布 Agent 卡片
- x402 付费墙集成(位于上游 avisradar 仓库)
- 首笔已结算的付费查询 → x402 Bazaar 收录(2026-05-30,v2 协议)
- Agent Arena ERC-8004 NFT 注册(agentId
53953,档案) - 公开排行榜(实时)
- 链上证明发布器(签名并提交至 ReputationRegistry)
- Virtuals ACP 托管事件摄取
运营方证明
本项目由 0xAC3ca7c5d3cDD7702fd08F9C4C28dAA22296aDa9 在 Base 主网上运营。由 @philpof102-svg 使用 Claude(Opus 4.7)构建。
代币
- 名称:MainStreet
- 符号:MAIN
- 合约:Base 主网上的
0xb3f9760f1f1e75ba01574d98b52e4455f19e93fe(Sourcify 上的源码已验证,完全匹配) - 总供应量:1,000,000 MAIN(18 位小数,固定且不可变)
- 部署者 + 初始持有者:
0xAC3ca7c5d3cDD7702fd08F9C4C28dAA22296aDa9 - 部署交易:
0xe57a1d1f...4e6fc969 - 区块:46,652,536
- 源码:
contracts/Main.sol(无管理员、不可升级、部署后不可铸造)
该合约在部署时有意保持不活跃。没有初始 LP、没有空投、没有质押。与 MainStreet API 的效用绑定将于之后另行制定规范并作出决定。
许可证
MIT — 参见 LICENSE。
- JMT x402 Agent 工具 — Base 主网上提供 25 个 x402 付费端点:网页搜索、AI 分析、加密货币/股票数据、SEC 文件、公司情报、新闻、情绪分析、宏观仪表板。每次调用 $0.001-$0.15 USDC。由本地 LLM 驱动。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。