
X402 Bazaar Mcp
io.github.sukrutkrdg由 GitHub 账号 sukrutkrdg 发布v0.3.0更新于 Oct 25, 2026
Check, then act, on Base and NEAR: token-safety gates, then swaps at the best price — over x402.
概览
本地 MCP 服务器,从实时目录加载付费 x402 服务,让助手执行 Base 与 NEAR 代币安全检查、兑换、行情查询和 AI 报告,或按次付费调用其他目录服务。
- 可以做什么
- 交易前检查代币与地址:交易前 GO/HOLD/STOP 闸门、代币风险与可卖出性、蜜罐检测、持仓集中度、制裁名单筛查、钱包与授权审计,以及针对 Base 原生代币和代币化股票的 B20 安全套件。获取行情数据:DEX 价格、多代币价格、流动性、Gas 估算、热门与新上线代币、价格提醒。检查交易与合约:解码 Base 交易、查询合约验证与 ABI、解析 Basenames。兑换:通过 0x 路由 Base 兑换,通过 NEAR Intents 跨链兑换,并可查询状态。调用目录中的其他服务,如网页提取、邮箱验证和域名检查,以及购买预付额度。
- 适用场景
- 适合助手在交易 Base 或 NEAR 代币前需要最新链上数据或安全检查时使用,也适合希望按次付费使用一批小型加密与网页工具、而不必自行管理 RPC 节点、爬虫或各服务商 API 密钥的场景。
- 运行要求
- 需要 Node.js 20 或更高版本,通过 npx 在本地运行。免费层无需任何配置(每个提供免费额度的服务每天一次免费调用)。付费调用需要 X402_CREDIT_TOKEN 中的预付额度令牌,或 AGENT_PRIVATE_KEY 中持有 Base 主网 USDC 的 Base 钱包私钥。需要能访问目录和服务端点的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 X402 Bazaar Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
x402-bazaar-mcp
Hosted, no install: point any MCP client at https://402.com.tr/mcp —
Streamable HTTP, one tool per catalogued service, no wallet held server-side. Or
run it locally with npx as described below; both talk to the same catalog. The
current tool list is always
the server card; a number
written here would be wrong the next time a service is added.
The Base token-safety toolkit for AI agents. An MCP (Model Context Protocol) server that gives your agent the checks it needs before it touches a Base token — including a 30-tool B20 (Base-native token standard) suite covering freeze/seize powers, policy changes, mint headroom and rebase history — which also covers all 82 of Coinbase's tokenized equities, telling a real issuance apart from a token merely wearing an equity ticker by reading who administers the transfer policy on chain rather than by consulting a list of addresses, so a newly issued one is recognised the day it appears — pre-trade GO/HOLD/STOP gates, honeypot & sellability checks, wallet + approval audits, sign-guard, prices and AI reports. Every paid API in the x402 Bazaar catalog, exposed as a callable tool (Cursor, Cline, Windsurf, VS Code, Coinbase AgentKit, desktop assistants and custom agents).
Bind these first: pre_trade_gate (any Base token), near_pre_trade_gate
(NEAR tokens), b20_gate (Base-native B20 tokens), sign_guard (before signing
a tx).
Then act — swap at the best price, after the check:
base_swap— on Base, routed by 0x across Uniswap, Aerodrome, Balancer, Curve and more. Returns the route, minimum out, every fee, and a ready-to-sign transaction for your agent's own wallet. Buying an unknown token runs a sellability check first and refuses a honeypot.near_swap— across chains (NEAR, Base, Ethereum, Solana, Bitcoin…) through NEAR Intents. Returns a one-time deposit address; the output goes to your recipient or is refunded. Buying a NEAR token runsnear_token_safetyfirst. Track it withnear_swap_status.
Funds never pass through this server or ours.
No wallet needed to start. Run it with no key, no token and no config at all
and it uses the free tier — one free call/day on each service that offers
one. Roughly a third of the catalogue does not: AI and metered services are
always paid, and every entry in
the catalogue says which it is under
freeTier. When you outgrow
that, a prepaid credit token keeps it walletless: one purchase, then every call
is just an HTTP header. A wallet is only needed for the third mode, per-call
payment.
Each tool call is otherwise 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.
Works with zero config. Run it with no wallet and no token and it uses the free tier (one free call/day on each service that offers one, then a preview) — so an agent can try most of the catalogue instantly, and sees a priced 402 on the AI and metered tools rather than a surprise. Unlock unlimited paid calls with either a prepaid credit token (one x402 purchase up front, then no wallet or signing per call) or a wallet key.
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 picks a payment mode (below), hits the endpoint, and returns the response.
- In wallet mode the x402 flow is transparent:
HTTP 402 → pay USDC on Base → retry → return response, gasless for the payer (the facilitator pays gas).
Three payment modes (precedence order)
Credits are the easiest paid mode day-to-day: buying the pack takes ONE x402
settlement (call the buy_credits tool in wallet mode, or pay
https://402.com.tr/api/x402/buy-credits?tier=0.25|1|5|20 from any x402 client),
which returns a ck_… token. Set it as X402_CREDIT_TOKEN and every later call
just draws down the balance — no private key ever touches this config again.
Tiers: $0.25 starter, $1, $5 (+10%), $20 (+20%).
Paying from NEAR? The same credit token can be bought with USDC, USDT or NEAR on
NEAR (or any asset NEAR Intents routes) — in the browser at
402.com.tr/credits, or headlessly with
POST https://402.com.tr/api/credits/near/quote. NEAR Intents swaps it to USDC on Base;
no Base wallet needed.
Requirements
- Node.js ≥ 20
- (optional, for paid calls) a prepaid credit token or a Base wallet private key whose address holds USDC on Base mainnet
Installation & running
In wallet mode the key only ever signs for requests to https://402.com.tr, paying the
Bazaar's own address in USDC on Base, at or under X402_MAX_PRICE_USD. These are fixed in
the package (or set by those env vars) — never taken from the catalog or from a 402 — so a
catalog entry or a 402 that points anywhere else is called unpaid.
Environment variables
With none of the above set, the server runs on the free tier.
Desktop MCP clients
Most desktop assistants and IDEs read an mcpServers block from their MCP
config file (see your client's docs for where it lives). Add:
Omit the env block entirely to run on the free tier (great for a first
try), or use "AGENT_PRIVATE_KEY": "0x…" instead of the credit token to pay
from a wallet.
Restart the client after saving; the Bazaar tools appear in its tool list.
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project:
Cline (VS Code)
In the Cline panel → MCP Servers → Configure (cline_mcp_settings.json):
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
VS Code (GitHub Copilot / MCP)
Add to .vscode/mcp.json in your workspace (or run MCP: Add Server):
Every client above works the same way: omit env to run on the free tier,
or swap the credit token for "AGENT_PRIVATE_KEY": "0x…" to pay from a wallet.
Use with Coinbase AgentKit, Agentic Wallet & CLI agents
Because this is a standard MCP stdio server, any MCP-capable agent runtime can load and pay for the Bazaar's tools — including Coinbase's own agent stack, with no bespoke integration:
Coinbase Agentic Wallet (npx awal)
Coinbase Agentic Wallets ship
native x402 support and an MCP interface. Point the wallet's MCP config at
npx x402-bazaar-mcp, and the agent can call — and pay for — any Bazaar service
straight from its MPC-secured wallet, gasless on Base. The x402 payment handshake
is handled for you: HTTP 402 → pay USDC on Base → retry → response.
Coinbase AgentKit
Two ways in:
- As MCP tools — load this server into your AgentKit agent's MCP config
(
command: "npx",args: ["-y", "x402-bazaar-mcp"], andX402_CREDIT_TOKENorAGENT_PRIVATE_KEYinenv). The agent gains every Bazaar tool — B20 freeze/seize checks, pre-trade gates, honeypot/sellability, deployer reputation, exit liquidity, live DEX prices, gas, tx decode, AI reports — as pay-per-call actions, no action provider to write. - Via AgentKit's native x402 support — AgentKit's wallet can settle x402
payments directly, so an agent can
GET https://402.com.tr/api/x402/<service>and pay the returned 402 from its own wallet. The 402 body includes a machine-readablealternativesblock (starter credits first) so the agent can pick the cheapest on-ramp programmatically.
Either way the agent pays only for the calls it makes, in USDC on Base, gasless.
Command-line agents
CLI agents that manage MCP servers with an mcp add command take the same
server:
Then ask the agent to check a token, price a portfolio, or screen an address — it calls the right Bazaar tool and settles the micro-payment automatically.
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 credit token (or a funded wallet) gives them everything — contract safety checks, live DEX prices, gas estimates, transaction decoding, and AI-powered reports — 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:
Prices shown as of this release — the authoritative price is always in the live
catalog and in each 402 challenge. The table above is a sample: the tool list is
loaded live from the catalog at startup, so the server always exposes
everything the marketplace currently sells — including the
B20 safety suite, the web and business checks (url_extract, email_verify,
domain_check) and anything added since this README was written.
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.
"Is this NVDA token on Base the real Coinbase one?"
b20_safety answers from the chain rather than from a list: it reads who
administers the token's transfer policy and reports whether that is the operator
behind Coinbase's confirmed issuances. A lookalike can copy the ticker, the name
and even a 0xb200… vanity address; it cannot borrow the policy administrator.
The same answer carries the issuer's powers — holder-eligibility gating, gated
mint, and the rebase multiplier that redenominates every balance at once — as
facts about a regulated instrument, not as a risk score to be alarmed by.
Sample outputs
token_risk — low-risk token
token_price — DEX price and liquidity
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
Prepaid credits (recommended) keep wallets out of your agent config — buying
the pack takes one x402 settlement, but after that the ck_… token is all the
agent holds: a bearer capability worth only its remaining balance, so a leaked
token can lose at most what's left on it, never a wallet. Buy a small pack and
rotate it if needed.
If you use wallet mode instead, 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
来源:README.md,提交 89a9975
工具
0版本历史
3- v0.3.0最新Oct 10, 2026
- v0.2.9Sep 27, 2026
- v0.2.2Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分