x402-bazaar-mcp
MCP server exposing x402 Bazaar's paid Base APIs (token risk/honeypot, prices, gas, wallet intel, tx decode + AI utilities) as agent tools. Your agent pays per call in USDC over x402 — no API keys, no signup.
README
x402-bazaar-mcp
An MCP (Model Context Protocol) server that exposes every paid API in the x402 Bazaar catalog as a callable tool for AI agents (Claude Desktop, Cursor, custom agents, etc.).
Each tool call is backed by an x402 micro-payment in USDC on Base — no API keys, no subscriptions, no sign-up. The agent pays only for what it uses, typically fractions of a cent per call.
How it works
- On startup the server fetches the live catalog from
https://402.com.tr/api/catalogand auto-registers one MCP tool per service. - When an AI agent calls a tool the server builds the request URL, hits the
endpoint, and transparently handles the x402 payment flow:
HTTP 402 → pay USDC on Base → retry → return response. - The agent wallet only needs USDC on Base. Gas is paid by the x402 facilitator — it is gasless for the payer.
First few calls per day per service may be served on the free tier at no cost; subsequent calls trigger micro-payments automatically.
Requirements
- Node.js ≥ 20
- A Base wallet private key whose address holds USDC on Base mainnet
Installation & running
# Install dependencies
npm install
# Run (set your private key in the environment)
AGENT_PRIVATE_KEY=0xYOUR_PRIVATE_KEY npx x402-bazaar-mcp
Or with npm start after cloning:
AGENT_PRIVATE_KEY=0xYOUR_PRIVATE_KEY npm start
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
AGENT_PRIVATE_KEY |
yes | — | Hex private key for a Base wallet holding USDC. 0x prefix is optional. |
X402_BAZAAR_CATALOG |
no | https://402.com.tr/api/catalog |
Override the catalog URL (useful for local dev). |
Claude Desktop configuration
Add the following to your claude_desktop_config.json
(usually ~/Library/Application Support/Claude/claude_desktop_config.json on
macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"x402-bazaar": {
"command": "npx",
"args": ["-y", "x402-bazaar-mcp"],
"env": {
"AGENT_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY"
}
}
}
}
After saving, restart Claude Desktop. You should see the Bazaar tools appear in the tool list (hammer icon).
Cursor / other MCP clients
Any MCP-compatible client that supports stdio servers works the same way — just
point it at npx x402-bazaar-mcp with AGENT_PRIVATE_KEY in the environment.
Why agents use this
Agents need fresh on-chain data and AI utilities but don't want to manage RPC endpoints, scrapers, security heuristics, or per-provider API keys. One MCP server plus a funded wallet gives them everything — contract safety checks, live DEX prices, gas estimates, transaction decoding, and Claude-powered text utilities — all pay-per-use, with no subscriptions or sign-up required.
What your agent can do (tools)
Tools are loaded live from the catalog, so the list stays current. At the time of writing it includes:
| Tool | Price | What it does |
|---|---|---|
token_risk |
$0.02 | Token safety score (honeypot, taxes, ownership, holders) for any Base token |
address_intel |
$0.01 | EOA/contract, ETH+USDC balance, activity for any address |
gas_oracle |
$0.005 | Live Base gas estimates (slow/normal/fast) |
token_price |
$0.01 | DEX price + liquidity for a Base token |
tx_decode |
$0.01 | Structural decode of a Base transaction |
wallet_tokens |
$0.01 | Portfolio of major Base tokens + USD value |
trending_tokens |
$0.005 | Currently boosted/trending Base tokens |
ai_summarize / ai_extract / ai_translate |
$0.02 | Claude-powered text utilities |
Example
Once installed, just ask your agent naturally — it picks the right tool and pays per call:
"Is
0x…a safe token to buy on Base? Check the risk and current price."
The agent calls token_risk and token_price, each settling a tiny USDC payment
from your wallet, and answers with the on-chain data.
Sample outputs
token_risk — low-risk token
{
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"isContract": true,
"token": {
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"totalSupply": "4800000000000000"
},
"ownership": {
"owner": "0x0000000000000000000000000000000000000000",
"renounced": true
},
"upgradeableProxy": false,
"security": {
"isHoneypot": false,
"buyTaxPct": 0,
"sellTaxPct": 0,
"isOpenSource": true,
"isMintable": false,
"transferPausable": false,
"canTakeBackOwnership": false,
"hiddenOwner": false,
"holderCount": 182430,
"topHolderPct": 12.47,
"top10HolderPct": 41.22,
"lockedLpPct": 100,
"creatorPct": 0,
"isInDex": true,
"isAntiWhale": false,
"antiWhaleModifiable": false,
"tradingCooldown": false,
"slippageModifiable": false,
"isTrueToken": true,
"isAirdropScam": false,
"creatorAddress": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"creatorBalance": "0"
},
"riskScore": 0,
"riskLevel": "low",
"flags": [],
"sources": ["base-rpc", "goplus"],
"coverage": "RPC base + GoPlus security (honeypot, taxes, holders, holder concentration, LP lock, creator holdings, source, ownership controls).",
"checkedAt": "2026-06-23T09:14:02.381Z"
}
token_price — DEX price and liquidity
{
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"priceUsd": "0.9998",
"priceChange24h": -0.03,
"liquidityUsd": 4721850.44,
"volume24h": 18340210.77,
"dexId": "uniswap",
"pairAddress": "0x88A43bbDF9D098eEC7bCEda4e2494615dfD9bB9C",
"baseToken": {
"name": "USD Coin",
"symbol": "USDC"
},
"checkedAt": "2026-06-23T09:14:03.105Z"
}
Discovering available services
- Human-readable catalog & docs: https://402.com.tr/agents
- Machine-readable catalog (used by this server): https://402.com.tr/api/catalog
- x402 well-known: https://402.com.tr/.well-known/x402
Security note
Your private key is only used locally inside this process to sign payment authorizations. It is never sent to the Bazaar server or any third party. Use a dedicated spending wallet (not your main wallet) and keep only a small USDC balance on it.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。