Skip to main content
Glama

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/mcp

  • Discovery Manifest: https://cf-x402-mcp.yan8925298.workers.dev/.well-known/x402

Note: agents@0.35 ships only the x402 client (agents/x402); there is no server-side withX402/paidTool, so this project implements a small paywall in src/x402.ts (no extra deps) in front of the @modelcontextprotocol/sdk WebStandardStreamableHTTPServerTransport.

Tools & pricing

Tool

Price (USDC)

Purpose

ci_log_sieve

0.01

Compress CI/build logs → root cause, failing steps/tests, deduped stack traces, fixes

repo_sec_triage

0.02

Static triage of pasted code/diff/manifest → severity-ranked findings (secrets redacted)

market_edge_feed

0.01

Edge signals in signals_public.json schema (SIGNALS_JSON / SIGNALS_URL, demo fallback)

sample_tools

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 deploy

Config (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…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Marketplace 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.
      7
      55 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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
    • A
      license
      A
      quality
      B
      maintenance
      Enables 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.
      8
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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