PayGate MCP β€” Monetization Gateway for AI Agents logo

PayGate MCP β€” Monetization Gateway for AI Agents

Monetize any MCP server: x402 paywall, pay-per-call billing in USDC on Base, agent marketplace.

Install PayGate MCP β€” Monetization Gateway for AI Agents

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself β€” its README, its docs, or a verified owner. We haven’t found those for PayGate MCP β€” Monetization Gateway for AI Agents, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

Security & health

What it can reach and how reliably it runs β€” from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

4/4 checks healthy over the last 40d

Supply-chain signal

2 high-severity advisories on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage β€” this is a directional signal, not a security audit.

Critical 1High 1Medium 2Low 0

Scanned 9/10/2026 via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks β€” not a rating.

Last commit2mo agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

PayGate MCP

Monetization gateway for Model Context Protocol servers. Put any MCP server behind a pay-per-call toll that AI agents can settle autonomously β€” no signup, no API keys, no human in the loop.

Live endpoint: https://paygate-mcp.rendercriativo.workers.dev/mcp

x402 network license

What it does

An agent calls a tool. If the tool is monetized, PayGate answers with an x402 v2 payment challenge instead of the result. The agent signs a USDC transfer authorization, retries, and gets its answer. Settlement happens on Base; the developer never touches payment code.

Code
agent ──tools/call──▢ PayGate ──▢ 402 challenge (price, asset, payTo)
agent ──signed payload──▢ PayGate ──verify──▢ facilitator
                          PayGate ──▢ developer's MCP server ──▢ result
                          PayGate ──settle──▢ facilitator ──▢ USDC on Base
agent ◀── result + settlement receipt

Payment is verified before the tool runs and settled after it returns. If the tool fails or returns an error, nothing is charged.

For agents

Discovery is free. Ask PayGate what is for sale:

Terminal
curl -X POST https://paygate-mcp.rendercriativo.workers.dev/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"list_registered_servers","arguments":{}}}'

Calling a monetized tool without payment returns a spec-compliant challenge β€” a tool result with isError: true whose structuredContent holds the PaymentRequired object:

JSON Config
{
  "x402Version": 2,
  "error": "Payment required: calculate_fator_r custa $0.02 USDC.",
  "resource": { "url": "mcp://tool/calculate_fator_r", "mimeType": "application/json" },
  "accepts": [{
    "scheme": "exact",
    "network": "eip155:8453",
    "amount": "20000",                                     // 6-decimal USDC units
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0x82e3...999e",
    "maxTimeoutSeconds": 120,
    "extra": { "name": "USD Coin", "version": "2" }        // EIP-712 domain
  }]
}

Sign an EIP-3009 TransferWithAuthorization using exactly the domain in extra, then retry the call with the payment attached under params._meta["x402/payment"]. The settlement receipt comes back in _meta["x402/payment-response"].

The USDC EIP-712 domain name is "USD Coin" on Base mainnet and "USDC" on Base Sepolia. Using the wrong one makes every signature fail verification.

A working reference client is in scripts/pay-test.mjs:

bash
PRIVATE_KEY=0x... node scripts/pay-test.mjs

The paying wallet needs USDC on Base β€” but no ETH: gas is covered by the facilitator.

Both x402 transports are supported. HTTP clients can use the base64 PAYMENT-REQUIRED / PAYMENT-SIGNATURE / PAYMENT-RESPONSE headers instead of the MCP _meta binding.

For sellers

The whole seller lifecycle is exposed as MCP tools, so an agent can run it end to end β€” tell your assistant to monetize your server and it can do everything below on its own:

ToolWhat it does
register_serverLists your server. Its tools are imported automatically; you get a proxy URL and a secret api_key.
verify_ownershipServe the token from registration at /.well-known/paygate-verify on your domain and call this to earn a verified badge. Buyers can filter for verified sellers.
set_tool_priceReprice a tool or take it off the market.
get_earnings / get_my_listingRevenue report and current listing.

Buyers pay your wallet directly on-chain. PayGate never holds your funds β€” there is no payout to wait for, no balance to withdraw, and no commission on direct payments. Your server is never modified: PayGate forwards initialize, tools/list, resources/list and prompts/list for free and charges only on tools/call.

The same operations exist as REST (POST /api/register, PUT /api/me/tools, GET /api/me/earnings) if you prefer curl:

Terminal
curl -X POST https://paygate-mcp.rendercriativo.workers.dev/api/register \
  -H 'Content-Type: application/json' \
  -d '{"name":"Your Service",
       "target_server_url":"https://your-mcp-server.example.com/mcp",
       "wallet_address":"0xYourWallet"}'

Health and diagnostics

GET /health/x402 reports whether the payment rail is actually able to charge:

config.json
{
  "network": "eip155:8453",
  "facilitator": { "url": "...", "reachable": true, "authenticated": true },
  "ready_to_charge": true,
  "diagnosis": "Pronto para cobrar."
}

Configuration

Runtime values live in wrangler.jsonc (vars) and Cloudflare secrets.

VariablePurpose
X402_NETWORKCAIP-2 network. eip155:8453 (Base mainnet, default) or eip155:84532 (Sepolia).
X402_FACILITATOR_URLFacilitator base URL, no /verify suffix. Defaults per network.
PAYGATE_WALLET_ADDRESSWallet that receives payments.
CONTACT_EMAILOptional; omitted from the UCP manifest when empty.
CDP_API_KEY_ID / CDP_API_KEY_SECRETCoinbase CDP credentials. Required for mainnet β€” it is the only facilitator that settles on Base.
UPSTREAM_AUTH_TOKENToken forwarded to the developer's MCP server.
STRIPE_SECRET_KEYOptional, for the Stripe path on tools priced β‰₯ $0.50.

Base Sepolia needs no credentials: the public facilitator at https://x402.org/facilitator settles testnet USDC for free β€” the cheapest way to try the whole flow.

Layout

Code
src/
β”œβ”€β”€ index.ts                 routes, health, discovery documents
β”œβ”€β”€ x402/
β”‚   β”œβ”€β”€ config.ts            network registry (CAIP-2, USDC assets, EIP-712 domains)
β”‚   β”œβ”€β”€ protocol.ts          v2 structures, MCP + HTTP transport bindings
β”‚   └── facilitator.ts       /verify and /settle, CDP JWT auth (EdDSA and ES256)
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ proxy.ts             the paid path: challenge β†’ verify β†’ execute β†’ settle
β”‚   β”œβ”€β”€ mcp-server.ts        PayGate's own MCP server
β”‚   β”œβ”€β”€ paygate-tools.ts     marketplace tools: register, verify, price, earnings
β”‚   β”œβ”€β”€ llms-txt.ts          /llms.txt for AI systems arriving over the web
β”‚   β”œβ”€β”€ register.ts          developer onboarding
β”‚   β”œβ”€β”€ dev-management.ts    profile, pricing, earnings
β”‚   └── discovery.ts         server card and UCP manifest
└── db/schema.ts             developers, tools, transactions, payment proofs

Development

Terminal
npm install
npx wrangler dev      # local
npx wrangler deploy   # production

Built on Cloudflare Workers, Hono, and D1.

License

MIT

Reviews

No reviews yet β€” be the first to share how it worked for you.

Frequently Asked Questions about PayGate MCP β€” Monetization Gateway for AI Agents

PayGate MCP β€” Monetization Gateway for AI Agents is an MCP server that puts MCP tools behind x402 pay-per-call payments in USDC on Base. It issues payment challenges, verifies signed authorizations before tool execution, settles through a facilitator after success, and returns results with settlement receipts. Discovery and seller management are exposed through MCP tools.

PayGate MCP charges agents by returning an x402 payment challenge for monetized tools. The agent signs a USDC EIP-3009 transfer authorization, retries the call with the payment attached, and receives the tool result after verification. Settlement occurs on Base after successful execution; failed tools are not charged.

An agent can discover available servers and tools by calling PayGate MCP’s `list_registered_servers` tool. Discovery is free, and the live MCP endpoint is `https://paygate-mcp.rendercriativo.workers.dev/mcp`.

You can monetize an MCP server by using PayGate MCP’s `register_server` tool, which lists the server, imports its tools, and provides a proxy URL and secret API key. You can then use `set_tool_price` to price tools and `verify_ownership` to earn a verified badge.

Related MCP servers

Add a badge to your READMEShow it’s listed β€” live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPayGate MCP β€” Monetization Gateway for AI Agents AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/paygate-mcp-monetization-gateway-for-ai-agents?style=directory)](https://allmcps.com/mcp/paygate-mcp-monetization-gateway-for-ai-agents)
HTML Embed
<a href="https://allmcps.com/mcp/paygate-mcp-monetization-gateway-for-ai-agents"><img src="https://allmcps.com/api/badge/paygate-mcp-monetization-gateway-for-ai-agents?style=directory" alt="PayGate MCP β€” Monetization Gateway for AI Agents on AllMCPs" /></a>