AttestPage · Docs · Pricing · OpenAPI · llms.txt

Claude Agent SDK: AttestPage tools through quoteproof-mcp

Last updated: 2026-10-10

A Claude Agent SDK agent that gets AttestPage's tools from quoteproof-mcp, an MCP server run over stdio. There is no client code to write: the server lists ten tools with their prices, pays with x402 from your own key when QUOTEPROOF_X402_KEY is set, and otherwise sends the free-trial header.

ToolRoutePrice
attestpage_verify_quotePOST /v1/verify/quoteUS$0.01
attestpage_verify_citationsPOST /v1/verify/citationsUS$0.10 per batch of up to 10
attestpage_verify_quotesPOST /v1/verify/quotesUS$0.08 per batch of up to 20 on one page
attestpage_verify_documentPOST /v1/verify/documentUS$0.10 per part of up to 10 pairs
attestpage_preview_documentPOST /v1/verify/document/previewfree
attestpage_fetchPOST /v1/fetchUS$0.002
attestpage_check_linksPOST /v1/check/linksUS$0.005 per batch of up to 10
attestpage_check_packagesPOST /v1/check/packagesUS$0.005 per batch of up to 10
attestpage_attestPOST /v1/attestUS$0.002
attestpage_verify_receiptPOST /v1/receipt/verifyfree

Install

Node.js 20.3 or later.

npm init -y && npm pkg set type=module
npm install @anthropic-ai/claude-agent-sdk
export ANTHROPIC_API_KEY=...

The MCP server needs no install: npx fetches it from the service as a tarball. [/dl/index.json](https://vehcdj664efetfrsolne5umanq.srv.us/dl/index.json) lists the current version with its sha256 and npm integrity string. The package has no install scripts.

To pay, set QUOTEPROOF_X402_KEY to the private key (0x and 64 hex digits) of a Base Sepolia wallet made only for testing, holding test USDC. The key stays in the MCP server's process and is never logged or returned.

claude-agent-sdk.mjs

// Claude Agent SDK agent that checks a quote with AttestPage (quoteproof-mcp over stdio) before it cites it.
import { query } from '@anthropic-ai/claude-agent-sdk';

const ORIGIN = 'https://vehcdj664efetfrsolne5umanq.srv.us';
const SERVICE = (process.env.ATTESTPAGE_URL || ORIGIN).replace(/\/+$/, '');

// Settings for the MCP server. Without QUOTEPROOF_X402_KEY it uses the free trial.
const env = {
  QUOTEPROOF_URL: SERVICE,
  QUOTEPROOF_MAX_USD: '0.01', // the most one call may cost
  QUOTEPROOF_SESSION_USD: '0.10', // the most this run may spend in total
};
if (process.env.QUOTEPROOF_X402_KEY) env.QUOTEPROOF_X402_KEY = process.env.QUOTEPROOF_X402_KEY;

// Tools from an MCP server are named mcp__<server>__<tool>.
const TOOLS = ['attestpage_verify_quote', 'attestpage_check_links', 'attestpage_verify_receipt'];

const prompt = process.argv.slice(2).join(' ')
  || 'Does https://www.iana.org/help/example-domains say "These domains may be used as illustrative examples in documents"?';

for await (const message of query({
  prompt,
  options: {
    mcpServers: {
      attestpage: { type: 'stdio', command: 'npx', args: ['-y', `${ORIGIN}/dl/quoteproof-mcp-0.1.25.tgz`], env },
    },
    allowedTools: TOOLS.map((t) => `mcp__attestpage__${t}`),
    systemPrompt: 'Before you quote a web page, call attestpage_verify_quote. Cite a quote only when result.match is exact '
      + 'or fuzzy and page.content_kind is real. If a tool fails with trial_exhausted or payment_refused_locally, say so and stop.',
    maxTurns: 6,
  },
})) {
  if (message.type === 'result') console.log(message.subtype === 'success' ? message.result : `stopped: ${message.subtype}`);
}

Run

node claude-agent-sdk.mjs                             # free trial
QUOTEPROOF_X402_KEY=0x... node claude-agent-sdk.mjs   # pays in test USDC, at most US$0.01 a call

Limits the server applies before it signs

VariableDefaultMeaning
QUOTEPROOF_MAX_USD0.10The most it pays for one call; each tool also pays no more than its listed price
QUOTEPROOF_SESSION_USD1The most it signs in total while the process runs
QUOTEPROOF_NETWORKSeip155:84532Networks it pays on (Base Sepolia, test USDC)
QUOTEPROOF_TRIALonSet 0 to turn off the free-trial header

An offer over a limit is refused with payment_refused_locally and nothing is signed. A paid result carries the settlement (transaction hash, payer, network) in _meta["x402/payment-response"].

The same server in other MCP clients

Most MCP clients take a block like this:

{
  "mcpServers": {
    "attestpage": {
      "command": "npx",
      "args": ["-y", "https://vehcdj664efetfrsolne5umanq.srv.us/dl/quoteproof-mcp-0.1.25.tgz"],
      "env": {
        "QUOTEPROOF_URL": "https://vehcdj664efetfrsolne5umanq.srv.us",
        "QUOTEPROOF_X402_KEY": "0x..."
      }
    }
  }
}

Leave out QUOTEPROOF_X402_KEY to use the free trial. With no install at all, the service also answers MCP over HTTP at POST /mcp; see MCP server.