Skip to main content
Glama

x402-tools MCP server (agent-audit + page-read)

A small, stateless remote MCP server on Cloudflare Workers. It gives MCP clients four read-only web tools that are paid per call in USDC on Base via x402, plus free previews. There is no signup and no API key.

The server is a thin front for two existing x402 HTTP APIs run by the same operator, with the same payee:

Tools

Tool

Price (USDC on Base)

What it does

Upstream HTTP endpoint

read_page

$0.001

One public web page as clean markdown or text, with title, canonical URL, published time and sha256

GET page-read /v1/read

quote_check

$0.005

Is this quote really on that page right now? Verdict, similarity, context and page sha256

GET agent-audit /v1/quote-check

check_links

$0.01

Health of up to 25 URLs: status, final URL, redirects, latency and verdict

POST agent-audit /v1/links

audit_x402_seller

$0.02

Read-only x402 seller and agent-readiness audit of one origin: live 402 per paid route, price vs catalogue, llms.txt, /.well-known/x402, openapi.json, dead doc links

GET agent-audit /v1/audit

preview_page

free, 10 per hour

Title and the first 300 characters of a page

GET page-read /v1/preview

preview_audit

free, 10 per hour

Audit score, grade and counts only

GET agent-audit /v1/preview

list_services

free

Catalogue, prices, payee and docs

n/a

Limits:

  • JavaScript is not executed.

  • Private, loopback and link-local targets are refused.

  • Invalid input and failed fetches are not charged; payment settles only after a 2xx result.

  • Audit grades measure protocol conformance, not whether a seller is legitimate.

Related MCP server: Secant Agent Research

How payment works (x402 over MCP)

This follows the x402 v2 MCP transport:

  1. Call a paid tool without payment. The tool result has isError: true, and structuredContent is the x402 v2 PaymentRequired of the upstream HTTP endpoint:

    • scheme exact, network eip155:8453;

    • asset USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, amount in atomic units (6 decimals);

    • payTo 0xa31bE3a1Ac1dde980dB8D18D32E7cd9Ab557360A, maxTimeoutSeconds 120.

    The same JSON is in content[0].text, and content[1] has plain-language payment steps.

  2. Sign an EIP-3009 transferWithAuthorization for exactly that amount with any x402 v2 client, for example @x402/fetch or @x402/mcp with @x402/evm. Then call the tool again with the same arguments and the PaymentPayload in params._meta["x402/payment"]. For clients that can't set _meta, put it in the payment argument instead, as an object or as base64 JSON.

  3. The server forwards the payment unchanged to the upstream API as the PAYMENT-SIGNATURE header. The upstream API verifies it with the facilitator (PayAI), runs the call, and settles only on success. The receipt {success, transaction, network, payer} comes back in result._meta["x402/payment-response"].

Further notes:

  • The facilitator pays gas, so the buyer needs no ETH.

  • If the payment status is uncertain, check USDC authorizationState(payer, nonce) on Base before signing a new payment.

  • This server never pays, never charges by itself, holds no keys, and never returns a paid result without a settled payment.

Try it

curl -s https://mcp.agent-audit.workers.dev/mcp \
  -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# unpaid paid-tool call -> x402 PaymentRequired
curl -s https://mcp.agent-audit.workers.dev/mcp -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"read_page","arguments":{"url":"https://example.com"}}}'

# MCP Inspector CLI
npx @modelcontextprotocol/inspector --cli https://mcp.agent-audit.workers.dev/mcp --transport http --method tools/list

MCP client config:

{ "mcpServers": { "x402-tools": { "url": "https://mcp.agent-audit.workers.dev/mcp" } } }

Self-hosting

The code has no runtime dependencies: one file, src/index.js. It reaches the two upstream workers through Cloudflare service bindings (AUDIT, READ in wrangler.toml). Without bindings it falls back to plain fetch of the public URLs. To run your own copy:

npm install
export CLOUDFLARE_API_TOKEN=...      # your own token; never commit it
export CLOUDFLARE_ACCOUNT_ID=...     # your own account id
npx wrangler deploy

No secrets are needed or stored. Set PAY_TO in wrangler.toml only for display; the payee in each challenge comes from the upstream API.

Operator

Run by the GitHub account agent-audit-x402, the shared official account for agent-audit and page-read. Contact: parafield-dev@mail.grokbot.com.

Listed in the x402 Blockchains registry. There are no customer sales yet.

License

MIT

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Pay-per-use clean web reader for AI agents. URL in, markdown plus metadata out, in milliseconds. Settled per-call in USDC over x402 — no signup, no API keys.
    1
    18 npm
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server providing 11 pay-per-call web intelligence tools (page reading, PDF extraction, RSS parsing, screenshots, summarization, structured data extraction) for AI agents, paid automatically in USDC via the x402 protocol on Base mainnet with no API keys required.
    20 npm
    MIT