cf-x402-mcp
cf-x402-mcp — Paid MCP tools on Cloudflare Workers (x402, Base USDC)
Stateless Streamable-HTTP MCP server (POST /mcp). Paid tool calls without payment get an HTTP 402 with a PAYMENT-REQUIRED header (x402 v2, scheme exact, USDC on Base eip155:8453). Payments are verified and settled through a configurable x402 facilitator.
Live Endpoint:
https://cf-x402-mcp.yan8925298.workers.dev/mcpDiscovery Manifest:
https://cf-x402-mcp.yan8925298.workers.dev/.well-known/x402
Note:
agents@0.35ships only the x402 client (agents/x402); there is no server-sidewithX402/paidTool, so this project implements a small paywall insrc/x402.ts(no extra deps) in front of the@modelcontextprotocol/sdkWebStandardStreamableHTTPServerTransport.
Tools & pricing
Tool | Price (USDC) | Purpose |
| 0.01 | Compress CI/build logs → root cause, failing steps/tests, deduped stack traces, fixes |
| 0.02 | Static triage of pasted code/diff/manifest → severity-ranked findings (secrets redacted) |
| 0.01 | Edge signals in |
| free | Lists tools/prices and free preview calls |
Free at $0: pass "sample": true to any paid tool (built-in input, no payment), or set FREE_DRY_RUN=true to disable the paywall entirely (testing).
Related MCP server: x402-intel-worker
Setup
npm install
npm test # vitest
npx tsc --noEmit
npx wrangler dev # local
npx wrangler deployConfig (wrangler.jsonc vars / .env.example): PAY_TO (public 0x address — ships with a placeholder; never put private keys anywhere), NETWORK, FACILITATOR_URL (default https://x402.org/facilitator; use a Base-mainnet-capable facilitator for production), FREE_DRY_RUN, SIGNALS_URL (https only) or SIGNALS_JSON.
Layout
src/core/* pure logic · src/x402.ts paywall · src/tools.ts MCP tools · src/index.ts Worker handler · test/* Vitest.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
x402 pay-per-call APIs over MCP, settled in USDC on Base for autonomous agents and developers.
Hosted MCP server for x402 pay-per-call APIs. USDC on Base, 5 free trial calls per wallet.
Pay-per-call APIs via x402 USDC on Base. Hosted MCP: original gateway; stdio: full catalog.
Pay-per-action access to APIs and MCP tools over Lightning L402 and Base USDC x402.
Related MCP Servers
AlicenseAqualityDmaintenanceMarketplace MCP for paid HTTP APIs. Pay per call in USDC on Base via the open x402 standard — non-custodial. 13 tools for discovery, buying, and publishing APIs.755 npm2MIT- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to discover and call x402-gated intelligence tools over Streamable HTTP JSON-RPC, with USDC pay-per-call settlement on Base for SEC financials, Form D searches, ATS job listings, tech-stack audits, and Japan invoice verification.MIT
- AlicenseAqualityBmaintenanceEnables MCP clients to invoke pay-per-call Solidity vulnerability triage, token risk briefs, and launch video storyboard generation over Streamable HTTP, with x402 Base Mainnet USDC payments and free discovery methods.8MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and developers to discover and call pay-per-request edge utilities for DNS and HTTP security audits, web extraction, feed conversion, and crypto balance lookups over Streamable HTTP using x402 v2 USDC payments on Base and Solana. It also exposes MCP tool discovery and free endpoints for edge information and sample audits.MIT