Ethereum mainnet JSON-RPC paid per call in USDC on Base. No account, no API key: the wallet pays.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A Cloudflare Worker that sells JSON-RPC access to your own Ethereum node, one request at a time, over x402. No accounts, no API keys, no invoices: a caller signs a USDC authorization on Base and gets the answer in the same exchange.
Running in production at 402rpc.com.
Selling RPC access normally means building signup, billing, key rotation and rate plans before you serve a single request. x402 removes all of it β but a naive gateway that simply charges per call creates two new problems, and this template solves both.
Callers must never pay for an answer you cannot give. Every request is checked before the paywall. A blocked namespace, a block below your history floor, a log range that is too wide β all return HTTP 400, and x402 does not settle on a response of 400 or higher. Node failures return 502 for the same reason.
Flat pricing loses money. eth_getLogs across ten thousand blocks costs your node
hundreds of times more than eth_blockNumber. Prices here scale with the work a method
actually costs.
Your node's own refusals arrive as HTTP 200. A node that says "no state available
at that block" or "too many logs in one response" returns a JSON-RPC error with a 200
status β and x402 settles on a 200. Left alone, your customers pay for answers you
could not give. This template translates that class of error into a 4xx so nothing
settles. Errors that are a real answer, execution reverted for instance, stay
chargeable.
Accept headerAt minimum, set PAY_TO_ADDRESS, ORIGIN_URL and PUBLIC_URL. Everything else has
a working default.
For a mainnet network you need Coinbase CDP credentials β the public x402.org facilitator serves testnets only:
Without them the Worker deliberately answers 503 rather than issuing payment challenges it cannot settle.
The facilitator has an undocumented floor. Amounts around $0.0002 are rejected with
amount_too_low; $0.001 goes through. Price differentiation therefore only works
upward from roughly a tenth of a cent.
The Bazaar only indexes x402 version 2. Every one of the twenty resources I
checked runs v2; none run v1. If you build on the v1 packages (x402-hono,
x402-fetch β last published April 2026) your service works but is invisible to the
discovery layer agents actually query. This template uses v2 throughout.
Pin resource to your public URL. Left to derive it from the request, the
middleware puts your Worker's internal hostname β which contains your Cloudflare
account name β into every payment challenge, right next to your receiving address.
Everything this template puts in your payment terms and landing page is a promise to a paying stranger. Test them against what your node actually does, not against what you believe it does. Three that bit us:
nodeRefusal in policy.ts.Ranking in the Bazaar is driven by measured usage β l30DaysTotalCalls and
l30DaysUniquePayers β not by how well you write your description. Worth knowing
before you spend an afternoon on copy.
Worth knowing too: as of August 2026 the entire visible Bazaar handled roughly 1,200 paid calls in thirty days across eighty services. The busiest Ethereum RPC among them served fourteen. Build for the market this becomes, not the one it is.
What this template does for you anyway: a bazaar discovery extension so you are
indexed at all, an iconUrl, and payment accepted on Base, Polygon and Arbitrum so
more wallets can reach you. What it deliberately does not do is inflate your own call
count β that buys a position in a list nobody reads yet, with your own money.
Set ORIGIN_TOKEN as a secret and have your origin require the matching
X-Origin-Token header. Without it, anyone who learns your origin hostname uses your
node for free and the paywall is decorative. A minimal reference proxy is in
examples/origin-proxy.py.
The receiving address is necessarily public: it is in every payment challenge. Your node's IP is also public, because it takes part in the peer-to-peer network. The link between the two is what you protect.
Someone who submits a transaction through your gateway and watches which IP broadcasts
it first learns where your service physically runs. Setting RELAY_URLS sends raw
transactions out through public endpoints instead, and that trail disappears. Every
other method only returns answers and reveals nothing.
Any x402 client pays and retries automatically:
As a paid fallback behind your own node β see examples/fallback.mjs:
A standby you never use costs nothing. That is the property a subscription cannot offer, and it is the strongest reason to run one of these.
MIT.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/x402-ethereum-rpc)<a href="https://allmcps.com/mcp/x402-ethereum-rpc"><img src="https://allmcps.com/api/badge/x402-ethereum-rpc?style=directory" alt="X402 Ethereum RPC on AllMCPs" /></a>