PayGate MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PayGate MCPwhat's for sale?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
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.
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 receiptPayment is verified before the tool runs and settled after it returns. If the tool fails or returns an error, nothing is charged.
Related MCP server: payclaw
For agents
Discovery is free. Ask PayGate what is for sale:
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:
{
"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:
PRIVATE_KEY=0x... node scripts/pay-test.mjsThe 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 developers who want to get paid
Register your existing MCP server and PayGate proxies it, charging per call:
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"}'You get back an API key and a proxy URL at /mcp/<devId>. Set per-tool prices via PUT /api/me/tools, check earnings at GET /api/me/earnings. Your server stays unchanged — PayGate forwards initialize, tools/list, resources/list and prompts/list for free, and charges only on tools/call.
Health and diagnostics
GET /health/x402 reports whether the payment rail is actually able to charge:
{
"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.
Variable | Purpose |
| CAIP-2 network. |
| Facilitator base URL, no |
| Wallet that receives payments. |
| Optional; omitted from the UCP manifest when empty. |
| Coinbase CDP credentials. Required for mainnet — it is the only facilitator that settles on Base. |
| Token forwarded to the developer's MCP server. |
| Optional, 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
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 (catalogue)
│ ├── register.ts developer onboarding
│ ├── dev-management.ts profile, pricing, earnings
│ └── discovery.ts server card and UCP manifest
└── db/schema.ts developers, tools, transactions, payment proofsDevelopment
npm install
npx wrangler dev # local
npx wrangler deploy # productionBuilt on Cloudflare Workers, Hono, and D1.
License
MIT
This server cannot be installed
Maintenance
Related MCP Servers
- AlicenseBqualityBmaintenanceagenticpay lets MCP server developers monetize tools via per-call USDC micropayments on Solana, using the x402 protocol. Each tool declares a price; agents pay via signed Solana transactions; settlement happens on-chain in ~1.5–2 seconds.13MIT
- Alicense-qualityBmaintenanceDrop-in x402 payment middleware for MCP servers. Charge AI agents per tool call using USDC on Base chain — Python and JavaScript SDKs, no payment processor, no KYC.MIT
- AlicenseAqualityAmaintenanceAn MCP server that enables AI agents to access paid AI inference and web tools via HTTP 402 micropayments in USDC on Base, using the agent's wallet as identity.14524MIT
- FlicenseAqualityBmaintenanceMCP server for a live x402 payment gateway on Base (USDC). Lets AI agents discover, preview for free, then pay per call — with prepaid gasless payments, signed receipts, and delta delivery.7
Related MCP Connectors
MCP marketplace: agents pay per call in USDC via x402. Plus Base chain data and a USDC<->bank ramp.
Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
Agent x402 Paywall MCP — Coinbase HTTP 402 protocol + on-chain settlement. Agents pay per-call
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/geoacpfilho/paygate-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server