Tollbooth Swap API
Token swaps and honeypot/rug checks for AI agents on 8 chains, paid per-call in USDC via x402.
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
claude mcp add --transport http tollbooth-swap-api 'https://api.tollboothswap.xyz/mcp'
{
"mcpServers": {
"tollbooth-swap-api": {
"type": "http",
"url": "https://api.tollboothswap.xyz/mcp"
}
}
}
tollboothswap-mcpclaude mcp add tollbooth-swap-api -e 'TOLLBOOTH_PAYER_KEY=<your tollbooth_payer_key>' -e 'TOLLBOOTH_URL=<TOLLBOOTH_URL>' -- npx -y tollboothswap-mcp@1.0.3
{
"mcpServers": {
"tollbooth-swap-api": {
"command": "npx",
"args": [
"-y",
"tollboothswap-mcp@1.0.3"
],
"env": {
"TOLLBOOTH_PAYER_KEY": "<your tollbooth_payer_key>",
"TOLLBOOTH_URL": "<TOLLBOOTH_URL>"
}
}
}
}
متغيرات البيئة
TOLLBOOTH_PAYER_KEYسري Optional 0x-prefixed EVM private key holding USDC on Base; pays x402 tolls automatically and gaslessly. Free tools work without it.TOLLBOOTH_URLTollbooth API base URL (default https://api.tollboothswap.xyz)
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
المحتويات
tollboothswap-mcp — Token Swaps & Honeypot Checks for AI Agents (MCP Server)
MCP server for Tollbooth: non-custodial token swap execution and token safety screening on 8 chains — Solana, Base, Ethereum, Arbitrum, Polygon, Optimism, BSC, Avalanche. Quotes and symbol resolution are free; swap builds (~$0.005) and safety checks ($0.01) are paid per-call in USDC via the x402 protocol — no API keys, no accounts, no subscriptions.
Quick start
npx tollboothswap-mcp
Claude Desktop / Cursor / any MCP client
{
"mcpServers": {
"tollbooth": {
"command": "npx",
"args": ["-y", "tollboothswap-mcp"],
"env": {
"TOLLBOOTH_PAYER_KEY": "0x<EVM private key holding USDC on Base>"
}
}
}
}
TOLLBOOTH_PAYER_KEY is optional: without it the free tools
(resolve_token, get_quote, get_service_info, get_receipt) work fully,
and paid tools return x402 payment instructions instead of results. With it,
tolls are paid automatically and gaslessly (EIP-3009 — the key never spends
gas, only USDC).
Tools
| Tool | Cost | What it does |
|---|---|---|
resolve_token | free | Ticker symbol → contract addresses, ranked by DEX liquidity |
get_quote | free | Fee-inclusive indicative swap quote |
check_token | $0.01 | Honeypot / rug-pull / freeze-authority / sell-tax screening with verdict + findings |
build_swap | ~$0.005 | Unsigned, ready-to-sign swap transaction + HMAC-signed receipt (safeMode screens both tokens first) |
get_receipt | free | Verify a past build receipt by id |
get_service_info | free | Service manifest: chains, fees, pricing |
Trust model
Tollbooth is non-custodial: it builds transactions but never holds keys or funds. Your agent signs and submits everything with its own wallet. Every paid build returns a signed receipt for audit trails.
Links
- Full tutorial: https://api.tollboothswap.xyz/guides/agent-swaps.md
- Agent usage guide: https://api.tollboothswap.xyz/skill.md
- Runnable HTTP examples: https://github.com/soundsparkaudiolab/tollbooth-examples
License
MIT
الأسئلة الشائعة
ما هو Tollbooth Swap API؟
Token swaps and honeypot/rug checks for AI agents on 8 chains, paid per-call in USDC via x402.
كيف أثبّت Tollbooth Swap API؟
يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http tollbooth-swap-api 'https://api.tollboothswap.xyz/mcp'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج Tollbooth Swap API إلى مفتاح API؟
نعم. يتطلب TOLLBOOTH_PAYER_KEY، وتضبطها في إعداداته.
هل Tollbooth Swap API مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون Tollbooth Swap API؟
ينشره soundsparkaudiolab. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.