huwhitememes/tollbooth
GitHub: huwhitememes/tollbooth
Tollbooth 为 AI agent 提供 100 个通过 MCP 协议调用的付费数据工具,采用 Base 链上 USDC 按次微支付,免去账号注册和 API 密钥管理。
Stars: 0 | Forks: 1
# 🪙 Tollbooth
### 为 AI agent 提供的 100 个付费 MCP 工具。在 Base 上使用 USDC 按次付费。无需账户,无需 API 密钥,无需信用卡。
[](https://agenttoll.dev/tools)
[](https://base.org)
[](https://x402.org)
[](https://agenttoll.dev)
[](https://agenttoll.dev/tools)
[🌐 网站](https://agenttoll.dev) · [📖 文档](https://agenttoll.dev/docs) · [🔧 工具](https://agenttoll.dev/tools) · [🤖 MCP Endpoint](https://agenttoll.dev/mcp) · [📋 agent.json](https://agenttoll.dev/.well-known/agent.json)
## 什么是 Tollbooth?
Tollbooth 是一个提供 **100 个付费工具**的市场,这些工具通过 [Model Context Protocol](https://modelcontextprotocol.io) 暴露。任何兼容 MCP 的 agent —— Claude、Cursor、自定义构建 —— 都可以发现并调用这些工具。支付通过 [x402 协议](https://x402.org) 自动完成:agent 为每个请求附加一笔 USDC 小额支付,服务器在链上验证并返回数据。每次调用只需几美分。无需注册,无需计费仪表板,无需管理 API 密钥。
**一句话简述:** 类似于 agent 工具调用的 Stripe,只是结账过程变成了带有支付挑战的 402 响应,而不是填写信用卡表单。
### 这里具体有什么
| | |
|---|---|
| **100 个工具** | 预测市场扫描、OSINT 订阅源、SEC 申报文件、法庭记录、学术搜索、FDA 召回、野火数据、联邦支出、CVE 查询等 |
| **10 个类别** | 预测市场、OSINT、Web Intel、环境、健康、学术、政府、金融、法律、安全 |
| **定价** | 每次调用 $0.01 – $0.10。您在支付前就能看到价格 —— 它包含在工具 schema 中。 |
| **支付** | 通过 x402 精确支付方案在 Base 主网上的 USDC |
| **基础设施** | Cloudflare Worker + Durable Objects(状态)+ KV(缓存)。边缘部署,冷启动低于 50ms。 |
## 快速开始
### 1. 连接您的 MCP 客户端
将任何兼容 MCP 的客户端指向此 endpoint:
```
{
"mcpServers": {
"tollbooth": {
"url": "https://agenttoll.dev/mcp"
}
}
}
```
就是这样。服务器会公布所有 100 个工具及其 schema 和价格。您的 agent 会挑选它需要的工具。
### 2. 为 Base 上的 USDC 钱包充值
向您的 agent 控制的钱包发送几美元的 USDC(Base 主网)。这是您唯一需要的余额。一分钱足以支付 10–100 次工具调用,具体取决于工具。
| 详情 | 值 |
|---|---|
| 网络 | Base 主网 (`eip155:8453`) |
| 资产 | USDC |
| USDC 合约 | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |
| 卖方地址 | `0x62a0D3d9DF0dE8804983009949c714EaeAFd87F1` |
| Facilitator | `https://facilitator.payai.network` |
| 支付方案 | x402 exact |
### 3. 调用工具
您的 MCP 客户端会自动处理支付流程。当您调用付费工具时,服务器会响应 HTTP 402 和一个支付挑战。您的客户端签署支付,重新发送请求,并获取返回数据。您无需编写任何支付代码。
## 支付是如何工作的
```
Agent Tollbooth Base Mainnet
│ │ │
│── tool call ────────────▶│ │
│ │ │
│◀── 402 Payment Required ─│ │
│ (price, scheme, │ │
│ accept tokens) │ │
│ │ │
│── signed USDC payment ──▶│ │
│ (x402 exact scheme) │ │
│ │── verify on-chain ──────▶│
│ │◀── ✓ valid ──────────────│
│ │ │
│◀── 200 OK + tool result ─│ │
│ │ │
```
**Agent 看到的:** 一个需要花钱的普通 MCP 工具调用。402 -> 支付 -> 重试的循环由 x402 客户端库处理。无需手动签名,无需监控交易。
**开发者看到的:** 一个单一的 endpoint。无需身份验证标头,无需轮换 API 密钥,无需管理速率限制层级。价格包含在工具 schema 中 —— 您的 agent 可以在支付前决定某次调用是否值得。
## 工具类别
| 类别 | 数量 | 价格范围 | 示例工具 |
|---|:---:|:---:|---|
| **Prediction Markets** | 12 | $0.02–$0.10 | `cross_platform_arb_scan`, `smart_money`, `orderbook_imbalance`, `kalshi_markets` |
| **OSINT & Intelligence** | 14 | $0.02–$0.05 | `geo_intervention_pulse`, `osint_research_pack`, `sec_8k_velocity`, `treasury_dts` |
| **Web Intel & Scraping** | 8 | $0.01–$0.05 | `scrape`, `enrich_lead`, `detect_stack`, `score_lead` |
| **Environmental & Climate** | 12 | $0.02–$0.03 | `wildfires`, `aurora_forecast`, `weather_forecast_grid`, `usgs_quake` |
| **Health & Safety** | 9 | $0.02–$0.04 | `drug_recalls`, `adverse_events`, `disease_outbreaks`, `vehicle_recalls` |
| **Academic & Research** | 8 | $0.02–$0.04 | `search_papers`, `search_arxiv`, `clinical_trials`, `citation_graph` |
| **Government & Civic** | 8 | $0.02–$0.04 | `federal_spending`, `national_debt`, `lobbying_records`, `federal_grants` |
| **Finance & Crypto** | 8 | $0.01–$0.03 | `edgar_filings`, `insider_trades`, `crypto_price_simple`, `fred_series` |
| **Legal & Regulatory** | 7 | $0.03–$0.05 | `court_opinions`, `patents_search`, `trademarks_search`, `federal_register` |
| **Security** | 7 | $0.02–$0.05 | `agent_threat_intel`, `cve_search`, `mcp_supply_chain_iocs`, `agent_trifecta_score` |
| **Social, Utility & AI** | 7 | $0.01–$0.05 | `reddit_search`, `github_repo_intel`, `gen_video_intel`, `currency_rates` |
**总计:100 个工具。** 在 [agenttoll.dev/tools](https://agenttoll.dev/tools) 浏览全部内容。
## 代码示例
### 通过 MCP 调用付费工具 (TypeScript)
```
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { exactEvmClientExtension } from "@x402/evm/exact/client";
// 1. Create an MCP client with x402 payment support
const client = new Client({
name: "my-agent",
version: "1.0.0",
});
const transport = new StreamableHTTPClientTransport(
new URL("https://agenttoll.dev/mcp"),
{
// x402 exact payment extension — handles 402 → sign → retry
extensions: [
exactEvmClientExtension({
walletClient: yourBaseWalletClient, // viem wallet on Base
}),
],
}
);
await client.connect(transport);
// 2. List available tools (free — no payment needed for discovery)
const { tools } = await client.listTools();
// Each tool's price is in the schema:
// tools[0].annotations.price_usd → "0.03"
// tools[0].annotations.x402_price → { scheme: "exact", ... }
// 3. Call a paid tool — payment happens automatically
const result = await client.callTool({
name: "cross_platform_arb_scan",
arguments: {
query: "bitcoin",
min_net_edge: "0.015",
},
});
// result.content[0].text → JSON with cross-platform arbitrage opportunities
// Your wallet was debited $0.10 in USDC on Base. That's it.
console.log(result.content[0].text);
```
### 与 Claude Desktop 一起使用
添加到您的 `claude_desktop_config.json`:
```
{
"mcpServers": {
"tollbooth": {
"url": "https://agenttoll.dev/mcp"
}
}
}
```
Claude 将自动发现所有 100 个工具。(注意:Claude Desktop 需要兼容 x402 的支付钱包才能完成付费调用 —— 发现和 schema 列出是免费的。)
## 架构
```
┌─────────────────────────────────┐
│ agenttoll.dev (edge) │
│ Cloudflare Worker (Hono) │
│ │
MCP Request ─────▶│ ┌─────────────┐ ┌──────────┐ │
(JSON-RPC over │ │ MCP Server │ │ x402 │ │
HTTP/SSE) │ │ (Durable │ │ Payment │ │
│ │ Object) │ │ Middleware│ │
│ └──────┬───────┘ └────┬─────┘ │
│ │ │ │
│ ┌──────▼───────────────▼─────┐ │
│ │ Tool Implementations │ │
│ │ (scrapers, API wrappers, │ │
│ │ data feeds, analyzers) │ │
│ └──────────────┬──────────────┘ │
│ ┌───────┴────────┐ │
│ ┌────▼────┐ ┌──────▼─────┐ │
│ │ KV Cache │ │ Public │ │
│ │ (15min │ │ APIs │ │
│ │ TTL) │ │ (no keys) │ │
│ └─────────┘ └────────────┘ │
└─────────────────────────────────┘
│
┌────────────────▼────────────────┐
│ x402 Facilitator │
│ facilitator.payai.network │
│ Verifies USDC payment on Base │
└─────────────────────────────────┘
```
**技术栈:** TypeScript · Hono · Cloudflare Workers · Durable Objects · KV · `@modelcontextprotocol/sdk` · `@x402/core` · `@x402/hono`
所有 100 个工具都由**免费、无密钥的公共 API** 提供支持 —— USAspending.gov、SEC EDGAR、CourtListener、PubMed、NASA FIRMS、NOAA、USGS、Polymarket、Kalshi、Reddit、GitHub 等。Tollbooth 为它们封装了缓存、标准化、结构化输出和支付层。您支付的是聚合、可靠性和适配 agent 的格式化 —— 而不是原始数据本身。
## 发现
### agent.json
Tollbooth 在标准位置发布了一个机器可读的清单:
```
https://agenttoll.dev/.well-known/agent.json
```
这遵循新兴的 agent 发现规范 —— 身份、endpoint、支付配置以及带有价格的完整工具目录。Agent 发现 Tollbooth 的方式与爬虫发现 `robots.txt` 的方式相同。
查看 agent.json 摘要
``` { "schema_version": "0.1", "name": "Tollbooth", "description": "Paid MCP and HTTP tools for prediction market intelligence...", "homepage": "https://agenttoll.dev", "mcp": "https://agenttoll.dev/mcp", "contact": { "name": "Hu White", "email": "memerhuwhite@gmail.com" }, "payments": { "protocol": "x402", "scheme": "exact", "network": "eip155:8453", "network_name": "Base mainnet", "asset": "USDC", "asset_contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "facilitator": "https://facilitator.payai.network", "seller": "0x62a0D3d9DF0dE8804983009949c714EaeAFd87F1" }, "tools": [ ... 100 tools with name, price_usd, description, input schema ... ] } ```
**由 [Hu White](https://github.com/huwhitememes) 构建** · 由 [x402](https://x402.org) 提供支持 · 运行于 [Base](https://base.org)
[报告问题](https://github.com/huwhitememes/tollbooth/issues) · [联系](mailto:memerhuwhite@gmail.com)
标签:AI代理, MCP工具, 人工智能, 加密货币, 微支付, 数据集市, 用户模式Hook绕过, 程序员工具, 自动化攻击