402MCP.org
Rank 4unstatedx402

Cloudflare Agents SDK (x402)

Charge per MCP tool call on Workers with paidTool

Rank
4 of 14
Composite score
8.3 / 10
Schemes
x402
Role
Pays 402 challenges; Charges with 402
Kind
sdk
Maturity
unstated
Protocol / rail
x402 (USDC on Base)
Assets
USDC
Networks
base
Custody model
Self-custodial (payments go to your own address)
Node management
Not required
MCP native
Yes
License
MIT
Last verified
2026-10-15

Overview

Cloudflare's Agents SDK supports x402 natively. On an McpAgent, paidTool is a drop-in replacement for tool that attaches a USD price, so free and paid tools coexist on one server; withX402 gates ordinary HTTP content the same way. The documented configuration pays a recipient address you supply, through the x402.org facilitator, on Base or Base Sepolia. It is the most direct path to charging for MCP tools if you already deploy on Workers.

Key advantages

  • paidTool is a drop-in replacement for tool — free and paid tools coexist on one MCP server
  • Runs on Cloudflare Workers through McpAgent
  • withX402 gates ordinary HTTP endpoints the same way

Trade-offs

  • Documented networks are Base and Base Sepolia
  • Tied to Cloudflare Workers and the Agents SDK

Evaluation matrix

  • Custody & Sovereignty8.0

    Self-custodial with exit guarantees vs. centralized/custodial risk. A 10 means the holder keeps their own keys and can unilaterally exit to the base chain; a custodial platform scores around 4.

  • Operational Friction8.5

    Infrastructure burden. Zero nodes, channels or liquidity to manage scores a 10; running and maintaining your own Lightning node scores around 4–5.

  • Agent Native Support9.5

    Out-of-the-box MCP server integration, typed tool calls and LLM-friendly setup. A first-party MCP server scores 9–10; a library or CLI an agent can drive scores 6–8.

  • Payment Rails & Assets7.0

    Breadth of settlement rails and assets: Lightning for true micropayments, stablecoins for a stable unit of account, cards for mainstream reach. A single asset on a single network scores around 7.

  • Settlement Speed & Fees8.0

    Instant sub-second settlement with near-zero overhead scores a 10. Block-bound settlement scores around 8; card-network settlement and fees score lower.

  • Developer DX9.0

    SDK quality, documentation, maintenance and copy-paste integration speed. Alpha-stage API churn, stale releases or inconsistent docs lower the score.

Why these scores. Custody 8: payments to your own address. Friction 8.5: deploy on Workers, uses a facilitator. Agent 9.5: MCP-native paid tools. Rails 7: USDC on Base. Settlement 8: Base. DX 9: a drop-in API.

Integration

Install
npm install agents
A paid MCP tool (from Cloudflare's docs)
this.server.paidTool(
	"square",
	"Squares a number",
	0.01, // USD
	{ number: z.number() },
	{},
	async ({ number }) => { /* ... */ },
);

Best for

Developers on Cloudflare Workers who want to charge per call for MCP tools.

Sources

Every claim on this page was checked against these sources on 2026-10-15. Maturity “unstated” means: the vendor does not state a maturity level.

Machine-readable

fetch this entry as JSON
curl "https://402mcp.org/api/v1/solutions?id=cloudflare-agents-x402&view=full"
or as Markdown
curl -H 'Accept: text/markdown' https://402mcp.org/solutions/cloudflare-agents-x402

Other indexed solutions

Compare all 14 on the leaderboard, or read the scoring methodology.