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.

概覽

AI 產生的概覽

本機 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 錢包私鑰。需要能存取目錄和服務端點的網路。
安裝前請注意
呼叫會產生費用:每次付費呼叫在 Base 上結算一筆 USDC 微支付,額度包價格為 0.25 至 20 美元。AGENT_PRIVATE_KEY 是用於簽署支付的錢包私鑰,應使用專用的低餘額錢包,切勿使用主錢包。X402_CREDIT_TOKEN 是持有者權杖,一旦外洩,剩餘餘額可能被花掉。兌換會回傳待簽署交易,價格提醒會註冊持續通知。目錄在啟動時即時取得,工具清單和價格可能變動。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 X402 Bazaar Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

x402-bazaar-mcp

[smithery badge]

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 runs near_token_safety first. Track it with near_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

  1. On startup the server fetches the live catalog from https://402.com.tr/api/catalog and auto-registers one MCP tool per service.
  2. When an AI agent calls a tool the server picks a payment mode (below), hits the endpoint, and returns the response.
  3. 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)

ModeSetWhat happensWallet? Signing?
Credits ⭐X402_CREDIT_TOKENSent as x-credit-token; each call debits your prepaid balanceNo / No
WalletAGENT_PRIVATE_KEYSigns an x402 USDC payment locally per callYes / Yes
Free(nothing)Free tier: 1 full call/day/service, then a previewNo / No

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

bash
npm install
# Zero-config — free tier on every service that offers one:npx x402-bazaar-mcp
# Paid via prepaid credits (recommended — no wallet, no signing):X402_CREDIT_TOKEN=ck_your_token npx x402-bazaar-mcp
# Paid via wallet:AGENT_PRIVATE_KEY=0xYOUR_PRIVATE_KEY npx x402-bazaar-mcp

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

VariableRequiredDefaultDescription
X402_CREDIT_TOKENno—Prepaid credit token (ck_…) from buy-credits. Sent as x-credit-token; debits your balance per call. No wallet needed. Recommended paid mode.
AGENT_PRIVATE_KEYno—Hex private key for a Base wallet holding USDC. 0x prefix optional. Used only if no credit token is set.
X402_MAX_PRICE_USDno1Wallet mode: the most a single call may cost. A 402 asking for more is not signed. Raise it on purpose to buy larger credit packs from a wallet.
X402_PAY_ORIGIN / X402_PAY_TOnohttps://402.com.tr / the Bazaar's payout addressWallet mode: the only origin the wallet pays, and the only address it pays to.
X402_BAZAAR_CATALOGnohttps://402.com.tr/api/catalogOverride the catalog URL (useful for local dev).

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:

json
{  "mcpServers": {    "x402-bazaar": {      "command": "npx",      "args": ["-y", "x402-bazaar-mcp"],      "env": {        "X402_CREDIT_TOKEN": "ck_your_token"      }    }  }}

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:

json
{  "mcpServers": {    "x402-bazaar": {      "command": "npx",      "args": ["-y", "x402-bazaar-mcp"],      "env": { "X402_CREDIT_TOKEN": "ck_your_token" }    }  }}

Cline (VS Code)

In the Cline panel → MCP Servers → Configure (cline_mcp_settings.json):

json
{  "mcpServers": {    "x402-bazaar": {      "command": "npx",      "args": ["-y", "x402-bazaar-mcp"],      "env": { "X402_CREDIT_TOKEN": "ck_your_token" },      "disabled": false,      "autoApprove": []    }  }}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "x402-bazaar": {      "command": "npx",      "args": ["-y", "x402-bazaar-mcp"],      "env": { "X402_CREDIT_TOKEN": "ck_your_token" }    }  }}

VS Code (GitHub Copilot / MCP)

Add to .vscode/mcp.json in your workspace (or run MCP: Add Server):

json
{  "servers": {    "x402-bazaar": {      "command": "npx",      "args": ["-y", "x402-bazaar-mcp"],      "env": { "X402_CREDIT_TOKEN": "ck_your_token" }    }  }}

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:

  1. As MCP tools — load this server into your AgentKit agent's MCP config (command: "npx", args: ["-y", "x402-bazaar-mcp"], and X402_CREDIT_TOKEN or AGENT_PRIVATE_KEY in env). 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.
  2. 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-readable alternatives block (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:

bash
# Free tier (zero config):<agent-cli> mcp add x402-bazaar -- npx -y x402-bazaar-mcp
# Or paid via prepaid credits:<agent-cli> mcp add x402-bazaar -e X402_CREDIT_TOKEN=ck_your_token -- npx -y x402-bazaar-mcp

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:

ToolPriceWhat it does
pre_trade_gate$0.10The one call before a trade — risk + sellability + route + deployer → GO/HOLD/STOP
token_risk$0.03Token safety score (honeypot, taxes, ownership, holders) for any Base token
sellability$0.08Can you actually SELL it? Honeypot/tax/lp simulation verdict
ai_token_report$0.12AI-written full due-diligence report on a token
sanctions$0.02Screen an address against the OFAC sanctions list
holders$0.02Top holders, concentration (whale risk) & LP lock for a token
token_price$0.02DEX price + liquidity for a Base token
multi_price$0.02Prices for up to 10 Base tokens in one call
address_intel$0.02EOA/contract, ETH+USDC balance, activity for any address
wallet_tokens$0.02Portfolio of major Base tokens + USD value
gas_oracle$0.01Live Base gas estimates (slow/normal/fast)
tx_decode$0.02Structural decode of a Base transaction
contract_abi$0.02Is a contract verified? Get its ABI (Sourcify)
basename$0.01Resolve Basenames ↔ addresses on Base
trending_tokens / new_tokens$0.01Trending & freshly listed Base tokens
price_alert$0.05Register an alert when a token crosses a price (webhook or poll)
buy_credits$0.25–$20Buy a prepaid credit pack (tier param) — unlocks walletless calls

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

json
{  "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

json
{  "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


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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

3
  1. v0.3.0最新Oct 10, 2026
  2. v0.2.9Sep 27, 2026
  3. v0.2.2Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分