プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

x402 Micro Tollgate

作者:kevin2003050666-coderバージョン 0.3.3i★ –iパソコンで動く
レジストリ名io.github.kevin2003050666-coder/x402-micro-tollgate

インストール

概要

作者による説明(英語の原文)

x402 HTTP 402 + MCP paywall: charge USDC per agent call. Self-host via npx or Docker.

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: 開発者ツール
  • 入力が必要なもの:CDP_API_KEY_ID, CDP_API_KEY_SECRET

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • 自分で入力するもの: CDP_API_KEY_ID, CDP_API_KEY_SECRET, X402_PAY_TO, UPSTREAM_URL, PRICE, NETWORK, X402_ENVIRONMENT

「秘密」と表示された値は、あなたのアカウントの鍵です。絶対に人に教えたり、チャットに貼り付けたりしないでください。

必要なもの

  • npmNode.jsのインストール(npxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "x402-micro-tollgate": {
      "command": "npx",
      "args": [
        "-y",
        "x402-micro-tollgate",
        "--stdio"
      ],
      "env": {
        "CDP_API_KEY_ID": "your-value",
        "CDP_API_KEY_SECRET": "your-value",
        "X402_PAY_TO": "your-value",
        "UPSTREAM_URL": "your-value",
        "PRICE": "your-value",
        "NETWORK": "your-value",
        "X402_ENVIRONMENT": "your-value"
      }
    }
  }
}

ターミナルでこれを実行します

claude mcp add x402-micro-tollgate --env CDP_API_KEY_ID=your-value --env CDP_API_KEY_SECRET=your-value --env X402_PAY_TO=your-value --env UPSTREAM_URL=your-value --env PRICE=your-value --env NETWORK=your-value --env X402_ENVIRONMENT=your-value -- npx -y x402-micro-tollgate --stdio

動かす前に、空欄の値を入力してください。

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "x402-micro-tollgate": {
      "command": "npx",
      "args": [
        "-y",
        "x402-micro-tollgate",
        "--stdio"
      ],
      "env": {
        "CDP_API_KEY_ID": "your-value",
        "CDP_API_KEY_SECRET": "your-value",
        "X402_PAY_TO": "your-value",
        "UPSTREAM_URL": "your-value",
        "PRICE": "your-value",
        "NETWORK": "your-value",
        "X402_ENVIRONMENT": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "x402-micro-tollgate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "x402-micro-tollgate",
        "--stdio"
      ],
      "env": {
        "CDP_API_KEY_ID": "your-value",
        "CDP_API_KEY_SECRET": "your-value",
        "X402_PAY_TO": "your-value",
        "UPSTREAM_URL": "your-value",
        "PRICE": "your-value",
        "NETWORK": "your-value",
        "X402_ENVIRONMENT": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

自分で入力する値

  • CDP_API_KEY_ID 秘密 env
    Coinbase CDP API key ID for the x402 facilitator
  • CDP_API_KEY_SECRET 秘密 env
    Coinbase CDP API key secret for the x402 facilitator
  • X402_PAY_TO env
    EVM address that receives USDC settlements
  • UPSTREAM_URL env
    Upstream HTTP API to proxy after payment (omit for built-in mock)
  • PRICE env
    Dollar price per paid call, e.g. $0.001
  • NETWORK env
    CAIP-2 network id (eip155:84532 Base Sepolia or eip155:8453 Base)
  • X402_ENVIRONMENT env
    development or production

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月7日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント kevin2003050666-coder で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

開発者ツールのほかのサーバーとの比較i

  • このカテゴリのほかの4908件のうち0%よりスターが多い
  • このカテゴリのほかの4908件のうち39%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの4908件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

x402 Micro Tollgateは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

入力が必要なもの:CDP_API_KEY_ID, CDP_API_KEY_SECRET

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(0.3.3)がレジストリに届いたのは2 か月前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:GitHub, Desktop Commander, Cloudflare MCP

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

GitHub

作者:github

Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

パソコンでもクラウドでも★ 34,245MIT4 日前更新
インストール

Desktop Commander

作者:wonderwhy-er

MCP server for terminal commands, file operations, and process management

パソコンで動く★ 10,225MIT16 日前更新
インストール

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

x402-micro-tollgate

Visa for AI agents that can’t hold a card.

Second-scale settlement bridge for agent traffic — the Web3 tollbooth that clears USDC micropayments and takes 0.1%.

为千万级无支付能力的 AI Agent 提供秒级过桥清算,抽成 0.1% 的 Web3 版 Visa 收费站

Security backed by Coinbase CDP. We don't touch your keys or settle payments on custom cryptography — EIP-3009 authorization nonces are single-use at the CDP facilitator (source of truth for on-chain uniqueness). The gateway hardens four buyer/seller trust surfaces: payment-proof replay/race, SSRF on URL fetch, upstream bypass (shared-secret trust header), and Base congestion / settle-latency (pending + retry same proof — never treat HTTP timeout alone as “payment failed”).

What it is

A thin self-hosted tollgate in front of your API or MCP tools. When an agent calls a paid route, it gets HTTP 402 as a price tag (not a hard deny). It pays a small USDC (or configured USDT) amount; you deliver. Default clearing is Base + USDC via Coinbase CDP; multi-network accepts are env-driven (see matrix below). Humans can still hit a free path; agents convert at the booth.

Self-host is free (MIT). Repo: github.com/kevin2003050666-coder/x402-micro-tollgate · Questions: 2767111713@qq.com

Not an official Coinbase product. Not a full agent marketplace. Not a billing SaaS. A sharp Visa-style tollbooth. Not fiat custody.

Why this exists: MANIFESTO.md — pain, engineering, on-chain proof, MIT.

Network × asset matrix

Default deploy profile: Base USDC only (dev: Base Sepolia). Enable multi with NETWORKS + ASSETS or ACCEPTS_JSON / X402_* aliases. Browser HTML 402 shows a chain + asset picker when more than one accept is configured.

NetworkCAIP-2USDCUSDTStatusFacilitator / notes
Baseeip155:8453native CirclebridgedliveCDP exact. FeeSplitterFactory live (deployments/base.json)
Base Sepoliaeip155:84532test USDC—liveCDP testnet
Optimismeip155:10nativebridgedconfig-readyAddresses wired; not on current CDP matrix
Arbitrum Oneeip155:42161nativebridgedliveCDP exact; factory stub
Polygon PoSeip155:137native (not USDC.e)PoS USDTliveCDP exact; factory stub
BNB Smart Chaineip155:56peg 18 decpeg 18 decconfig-readyNot on CDP list
Ethereumeip155:1nativeTetherconfig-readyFacilitator-dependent
Avalanche C-Chaineip155:43114nativeUSDTconfig-readyIn @x402/evm defaults
Celo / Seieip155:42220 / 1329USDC—config-readyCatalog extras
Solanasolana:5eykt…SPL USDCSPL USDTexperimentalCDP lists Solana; gateway stubs + optional SVM paywall (SOLANA_PAY_TO)
TRONtron:mainnet—TRC-20plannedNo scheme in deps — never in accepts[]

USDT on EVM typically uses extra.assetTransferMethod: "permit2" (not EIP-3009). FeeSplitter production path remains Base + USDC; other chains are config stubs under contracts/deployments/.

Browser wallets
WalletRole
Coinbase Smart Wallet (Passkey)Primary CTA
MetaMaskVia wagmi injected target
InjectedOther browser wallets
WalletConnectWhen WALLETCONNECT_PROJECT_ID set
Solana paywallExperimental, behind Solana accepts / PAYWALL_SVM
TronLinkNot offered (TRON planned only)

Who it’s for

  • API sellers who want agents to pay per call — without building a billing console or selling monthly seats
  • Tool builders shipping paid MCP endpoints into Cursor / Claude
  • Operators who want Visa-like take-rate economics (0.1%), not hosting invoices

How money works

  1. Price tag — unpaid traffic gets HTTP 402 with the amount due (conversion, not rejection)
  2. Pay — the agent settles a USDC micropayment in seconds via Coinbase CDP
  3. Unlock — the tollgate proxies to your upstream; you keep ~99.9%, protocol take 0.1%

No protocol monthly fee. Monetization is the toll — like interchange on card rails.


1-minute quickstart

Requires Node.js 22+.

git clone https://github.com/kevin2003050666-coder/x402-micro-tollgate

cd x402-micro-tollgate && cp .env.example .env

set CDP_API_KEY_ID, CDP_API_KEY_SECRET, X402_PAY_TO (optional: PUBLIC_BASE_URL, UPSTREAM_URL)

npm i && npm start

curl http://127.0.0.1:8402/health → 200

curl http://127.0.0.1:8402/x402/discover → 200 (free agent yellow pages)

curl http://127.0.0.1:8402/v1/quote → 402

curl "http://127.0.0.1:8402/v1/fetch-md?url=https://example.com" → 402 (paid HTML→Markdown demo)

npx one-liners (no clone):

npx x402-micro-tollgate@0.3.3

npx x402-micro-tollgate@0.3.3 --seller 0xYourReceivingAddress --stdio

--seller / -s sets X402_PAY_TO before boot (env vars still work). Default without --stdio is HTTP + /mcp on port 8402.

Agent / crawler docs: llms.txt (also GET /llms.txt and GET /.well-known/llms.txt) · OpenAPI 3.1: docs/openapi.yaml · well-known: GET /.well-known/x402.json, GET /.well-known/agent-card.json

Alternative one-liner: docker compose up --build

Without CDP keys the process runs in demo mode (protocol-shaped 402 / MCP PaymentRequired, no on-chain settle).

Cursor mcp.json:

{

"mcpServers": { "x402-micro-tollgate": { "url": "http://127.0.0.1:8402/mcp" } } }

Stdio:

{

"mcpServers": { "x402-micro-tollgate": { "command": "npx", "args": [ "x402-micro-tollgate@0.3.3", "--seller", "0xYourReceivingAddress", "--stdio" ], "env": { "CDP_API_KEY_ID": "...", "CDP_API_KEY_SECRET": "...", "PUBLIC_BASE_URL": "https://your.public.host" } } } }

(X402_PAY_TO in env still works if you omit --seller.)

Library drop-in (permissionless seller)
import express from "express";

import { x402Tollgate } from "x402-micro-tollgate";

const app = express(); app.use("/v1", await x402Tollgate({ seller: process.env.SELLER! }));

Or set SELLER / X402_SELLER in .env and run npm start. See Environment for the $10 threshold, factory address, and fee-release details.

Buyer / Agent client

Thin TypeScript helper that wraps official @x402/fetch + @x402/evm ExactEvmScheme. On HTTP 402 it parses PAYMENT-REQUIRED, checks budgets, signs EIP-3009 once, and retries once with PAYMENT-SIGNATURE (never loops).

npm i x402-micro-tollgate@0.3.3
import { createX402Fetch } from "x402-micro-tollgate/client";

const fetch402 = createX402Fetch({ privateKey: process.env.BUYER_KEY as 0x${string} }); const res = await fetch402("https://x402-micro-tollgate.onrender.com/v1/quote");

Defaults: maxSingleSpendUsdc = 0.05, maxTotalSpendUsdc = 1.00 (clear Error if exceeded). Circuit breaker (before sign): max 10 paid 402s / 0.05 USDC per rolling 60s, plus fingerprint dead-loop halt (maxPaidRequestsPerMinute, maxSpendUsdcPerMinute, enableFingerprintBreaker). Hot-wallet warning: keep only ~$5–$10 USDC on the signing key — treat it as an agent spend faucet, not a treasury.

Human-delegated agent credit (CLI)

Thin PoC: Human sets `B_max` → Agent loops createX402Fetch against a paid URL (auto 402 → pay once → retry). Chrome / Telegram / Session Key / Passkey UI are deferred.

# SAFETY: fund BUYER_PRIVATE_KEY with ≤ $5–$10 USDC only. Never commit keys.

export BUYER_PRIVATE_KEY=0xYourHotWalletKey

optional: TARGET_URL MAX_SINGLE_USDC MAX_TOTAL_USDC ROUNDS

npm run poc:buyer-agent

or: npx tsx scripts/buyer-agent-poc.ts

EnvDefaultNotes
BUYER_PRIVATE_KEY_(required)_0x… EOA used to sign EIP-3009
TARGET_URLhttps://x402-micro-tollgate.onrender.com/v1/quotePaid route to hit
MAX_SINGLE_USDC0.05Per-call cap (maxSingleSpendUsdc)
MAX_TOTAL_USDC1.00Session cap / human B_max
ROUNDS3Stop after N calls or when budget exhausted

The script imports the local client (../src/client) so repo CI does not need a live chain pay. For a live demo against the published package, swap the import to x402-micro-tollgate/client (same API as 0.3.2+). Each round prints status, autoPaid, and sessionSpendUsdc on stdout; the safety banner goes to stderr.


Deploy

Uses render.yaml: Node 22, npm start, health /health, env names from .env.example. Set CDP_API_KEY_ID, CDP_API_KEY_SECRET, and X402_PAY_TO in the dashboard for live settlement; set PUBLIC_BASE_URL to your https://….onrender.com origin for Bazaar.

Ops bump: redeploy discover + well-known (force Render GitHub auto-deploy so production picks up GET /x402/discover, GET /.well-known/x402.json, GET /.well-known/agent-card.json, and MCP fetch_md). If auto-deploy does not fire within a few minutes after this lands on main, use the Render dashboard → Manual Deploy → Deploy latest commit.

Self-host production: Docker — docker compose up --build (see Dockerfile / docker-compose.yml).


Environment

VariableDefaultNotes
PORT8402HTTP listen port
UPSTREAM_URL_(unset → mock)_Your API origin
UPSTREAM_SHARED_SECRET / X402_UPSTREAM_SECRET—Optional. After settle, tollgate injects X-Tollgate-Secret + X-Tollgate-Paid (HMAC). Upstream must require them and reject public direct hits (not mTLS)
X402_PAY_TO—EVM receive address (live mode SDK init)
SELLER / X402_SELLER—Permissionless seller EOA (EIP-55 validated; invalid → startup fail)
FACTORY_ADDRESS—Operator-set FeeSplitterFactory for CREATE2 predict when amount ≥ threshold (Base live address in contracts/deployments/base.json; do not hardcode secrets)
FEE_FREE_BELOW_USDC / X402_FEE_FREE_BELOW_USDC10000000Atomic USDC (6 decimals). < $10 → payTo=seller; ≥ $10 → FeeSplitter
CDP_API_KEY_ID / CDP_API_KEY_SECRET—CDP facilitator (+ Onramp session tokens)
CDP_CLIENT_API_KEY—Public CDP client key for browser Smart Wallet paywall (safe in frontend). Alias: CDP_CLIENT_KEY
X402_FACILITATOR_URL / CDP_FACILITATOR_URLCDP defaultOptional alternate facilitator base URL for MCP (createCdpFacilitatorClient({ baseUrl })). Single-vendor; no multi-facilitator routing yet
PRICE$0.001Network default USDC/USDT price tag
NETWORK / X402_NETWORKeip155:84532 / 8453Primary CAIP-2 (aliases: base, optimism, …)
NETWORKS / X402_NETWORKS_(primary only)_Comma/JSON list of networks for multi-accept
ASSETS / X402_ASSETSUSDCCross with NETWORKS → accepts (USDC, USDT)
ACCEPTS_JSON / X402_ACCEPTS_JSON—Explicit accepts array (overrides NETWORKS×ASSETS)
FACTORY_ADDRESSES—JSON map caip2 → FeeSplitterFactory (Base live; others optional)
SOLANA_PAY_TO—Base58 payTo for experimental Solana accepts
PAYWALL_SVMfalseForce @x402/paywall SVM UI (also auto if Solana in accepts)
WALLETCONNECT_PROJECT_ID—Enables WalletConnect in browser paywall

| X402_MIN_PRICE_USDC | — | Optional static minimum accept amount (atomic USDC). Effect

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く