ai_intel
Deep AI Vulnerability & Intelligence Engine. Scans contracts and code for logic vulnerabilities and exploits on Base. Cost: 0.001 USDC on Base & Solana (100% gasless).
promptcontractAddress
io.github.ak10082247-max由 GitHub 账号 ak10082247-max 发布v2.1.0更新于 Oct 26, 2026
On-chain DeFi smart contract auditor, arbitrage scanner, and agent tollbooth via x402 on Base.
基于 Base 的付费 Web3 情报 MCP 服务器:智能合约 AI 审计、跨 DEX 套利扫描、路由计算与代理记忆,按次以 USDC 通过 x402 计费。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.ak10082247-max%2Fx402-agent-tollbooth/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。把它添加到你客户端的 mcpServers 配置中。
{
"mcpServers": {
"x402-agent-tollbooth": {
"type": "http",
"url": "https://x402-agent-tollbooth.onrender.com/mcp"
}
}
}The x402 Agent Tollbooth is an enterprise-grade Model Context Protocol (MCP) server that demonstrates machine-to-machine (M2M) micro-transactions on the Base network.
This project provides an infrastructure layer allowing AI agents to programmatically access specialized Web3 intelligence and smart contract analysis tools by fulfilling automated HTTP 402 (Payment Required) workflows via the x402 protocol standard. Agents pay per tool execution directly in USDC, enabling a seamless, trustless API monetization model.
[Smithery Quality Score: 100/100] [Network] [Currency] [Glama]
This repository contains the full, open-source Python implementation of the MCP server. The server is built using the official mcp SDK and sse-starlette to handle Server-Sent Events (SSE) and JSON-RPC tool calling.
The core implementation is located in tollbooth_agent.py.
You can easily self-host this MCP server or run it locally for your own agents.
Using Docker:
Using Python:
This server exposes a navigable tree of specialized Web3 tools. AI agents must provide a valid Base network paymentHash (transaction receipt) for the exact USDC amount required to execute the paid tools.
🤝 Referral Revenue Sharing Protocol: The server implements an optional referralWallet parameter. AI agents acting as intermediaries can append their wallet address to receive a 20% protocol fee distribution.
contract.auditTeaser (FREE): Scans a Base smart contract for vulnerabilities and returns a high-level summary. Designed to allow agents to assess necessity before authorizing paid deep-dives.token.analyze (0.50 USDC): Real-time liquidity, volume, and analytics for any Base token. Aggregates data for high-frequency algorithmic usage.contract.audit (1.00 USDC): Full AI-driven smart contract vulnerability audit. Returns exact lines of code, risk severity, and attack vectors.contract.patch (5.00 USDC): Premium service. Audits the contract and generates production-ready, secure Solidity code to patch the vulnerabilities.market.alpha (10.00 USDC): High-level metadata brokering. Aggregates metadata to reveal which smart contracts are currently experiencing high automated analysis volume on the network.wallet.profile (2.00 USDC): Behavioral finance AI analysis of a specific wallet address. Generates risk profiles and portfolio strategies based on public on-chain actions.memory.store (0.01 USDC): Persistent memory bank for agents to store context across sessions.memory.retrieve (0.01 USDC): Retrieve stored contextual memory.llm.query (0.10 USDC): Query the Tollbooth's underlying LLM directly for complex reasoning tasks.If you are building custom AI agents in LangChain, AutoGen, or CrewAI, you do not need to teach your LLMs how to write Web3 transactions to use this server.
We have included the X402 FastPass SDK (x402_fastpass.py) directly in this repository. It acts as a wrapper around the MCP client and automatically handles the USDC crypto payments natively in Python.
How to give your agent seamless access:
Note: The FastPass SDK automatically injects your agent's wallet address as the referralWallet, meaning your agent automatically earns a 20% cashback on all tools it calls!
The server supports the official x402 V2 specification with 100% gasless settlement on Base Mainnet (eip155:8453) and Solana Mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp):
POST /toll/cross-dex-arbitrage). Server immediately returns HTTP 402 Payment Required with a 50% Free Teaser Preview and PAYMENT-REQUIRED header challenge.TransferWithAuthorization (on Base) or partially-signs an SPL TransferChecked (on Solana). The relayer facilitator sponsors all gas fees ($0 ETH / $0 SOL required).PAYMENT-SIGNATURE header. Server verifies via facilitator in <10ms and returns HTTP 200 OK with full unredacted intel and PAYMENT-RESPONSE cryptographic receipt.If you do not want to run the server from source, connect directly to our public hosted endpoint:
https://x402-agent-tollbooth.onrender.com/mcphttps://x402-agent-tollbooth.onrender.com/.well-known/mcp/server-card.jsonhttps://x402-agent-tollbooth.onrender.com/.well-known/x402.json来源:README.md,提交 e6a12a5
Deep AI Vulnerability & Intelligence Engine. Scans contracts and code for logic vulnerabilities and exploits on Base. Cost: 0.001 USDC on Base & Solana (100% gasless).
promptcontractAddressCross-DEX Arbitrage & Liquidity Scanner. Analyzes Uniswap, Aerodrome, and BaseSwap pools for profitable routing opportunities. Cost: 0.002 USDC on Base & Solana (100% gasless).
pairmin_spread_bpsOptimal Execution Smart Router. Computes optimal gas and slippage routing paths for Base AI agents and automated executors. Cost: 0.001 USDC on Base & Solana (100% gasless).
amounttokenIntokenOutLive Smart Contract AI Auditor. Analyzes Base contracts for vulnerabilities. Cost: 0.02 USDC via x402 protocol. Cost: 0.02 USDC on Base & Solana (100% gasless).
isPatchcontractAddress已满足适用检查项的 100%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
docker build -t x402-tollbooth .docker run -p 8000:8000 -e GEMINI_API_KEY="your_api_key" x402-tollboothpip install -r requirements.txtuvicorn tollbooth_agent:mcp_app --host 0.0.0.0 --port 8000from x402_fastpass import X402FastPassimport asyncio
# 1. Give the FastPass Client your agent's Base wallet private keyclient = X402FastPass(private_key="0xYOUR_PRIVATE_KEY")
# 2. Give this Python function to your agent as a standard tool.# The SDK automatically handles the on-chain USDC transfer and passes the payment hash to the MCP server!async def run_audit(): result = await client.audit_contract("0xTargetSmartContractAddress") print(result)
asyncio.run(run_audit())import base64, json, secrets, time, requestsfrom eth_account import Accountfrom eth_account.messages import encode_typed_data
def paid_toll_call(endpoint: str, payload: dict, private_key: str): account = Account.from_key(private_key) url = f"https://x402-agent-tollbooth.onrender.com{endpoint}"
# 1. Probe endpoint res = requests.post(url, json=payload) if res.status_code == 200: return res.json()
# 2. Decode 402 challenge & sign EIP-712 authorization raw_pr = res.headers.get("PAYMENT-REQUIRED") or res.headers.get("X-Payment-Required") pr_json = json.loads(base64.b64decode(raw_pr).decode("utf-8")) accepted = next(a for a in pr_json["accepts"] if "8453" in str(a.get("network", "")))
now = int(time.time()) nonce = secrets.token_bytes(32) types = {"TransferWithAuthorization": [ {"name": "from", "type": "address"}, {"name": "to", "type": "address"}, {"name": "value", "type": "uint256"}, {"name": "validAfter", "type": "uint256"}, {"name": "validBefore", "type": "uint256"}, {"name": "nonce", "type": "bytes32"}, ]} domain = {"name": "USD Coin", "version": "2", "chainId": 8453, "verifyingContract": accepted["asset"]} msg = {"from": account.address, "to": accepted["payTo"], "value": int(accepted["amount"]), "validAfter": 0, "validBefore": now + 300, "nonce": nonce} sig = account.sign_message(encode_typed_data(domain_data=domain, message_types=types, message_data=msg)).signature.hex()
payment_b64 = base64.b64encode(json.dumps({ "x402Version": 2, "resource": pr_json.get("resource"), "accepted": accepted, "payload": {"signature": "0x" + sig.lstrip("0x"), "authorization": { "from": account.address, "to": accepted["payTo"], "value": str(accepted["amount"]), "validAfter": "0", "validBefore": str(now + 300), "nonce": "0x" + nonce.hex() }} }).encode()).decode()
# 3. Settle & unlock premium response paid_res = requests.post(url, json=payload, headers={"PAYMENT-SIGNATURE": payment_b64}) return paid_res.json()npx @smithery/cli mcp install x402-agent-tollbooth