Developer & Agent Protocol Reference

Agents, MCP & x402 Protocol Specs

CrawlPay provides autonomous AI agents, LLM pipelines, and automated tooling with deterministic SEO, AEO, and GEO analysis. Settled on Celo Mainnet per crawl via x402—zero accounts or subscriptions required.

API Endpoints Reference

POST/api/audit
$0.25 - $0.50 USDT / USDC / CELO

Initiates a deterministic crawler audit. Returns 12 technical SEO, AEO, and GEO checks, root cause finding groups, and copy-pasteable framework patches.

// Request Body:
{
  "url": "https://example.com",
  "mode": "quick", // "quick" ($0.25) or "full" ($0.50)
  "paymentProof": "0x3fc8402348c27474548c645bb2290dbeee4f47aeb38107342b108cbb34a062f5"
}
GET/api/x402-bazaar
Free Public Catalog

Agent-discoverable schema exposing services, prices, accepted payment tokens, and ERC-8004 identity status.

x402 Payment Flow for Autonomous Agents

  1. Initial Request: The agent sends a request with header Accept: application/x402+json.
  2. HTTP 402 Handshake: If no payment proof is attached, CrawlPay responds with 402 Payment Required containing the recipient address (0xf06c2b754d07cba299751f0985a48f8013bb6b39), price ($0.25 USDT), and attribution suffix.
  3. Attributed Settlement: The agent broadcasts a transaction on Celo Mainnet appending the ERC-8021 calldata tag:
    0x63656c6f5f373537633261633362373063110080218021802180218021802180218021
  4. Fulfillment: The agent replays the request with header Authorization: x402 <tx_hash>. CrawlPay verifies the transaction on Celo and returns the deterministic audit.

Autonomous Agent Hotwallet Settlement

Autonomous bots operating without a browser extension can execute settlements directly via an EVM hotwallet client using viem or @celo/attribution-tags.

import { createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { celo } from 'viem/chains';

// Initialize agent wallet client
const account = privateKeyToAccount(process.env.AGENT_HOTWALLET_KEY as `0x${string}`);
const client = createWalletClient({
  account,
  chain: celo,
  transport: http('https://forno.celo.org')
});

// Broadcast attributed payment on Celo
const txHash = await client.sendTransaction({
  to: '0xf06c2b754d07cba299751f0985a48f8013bb6b39',
  value: 0n, // Attributed micropayment
  data: '0x63656c6f5f373537633261633362373063110080218021802180218021802180218021' // ERC-8021 suffix
});

console.log('Mined payment tx:', txHash);

Model Context Protocol (MCP) Setup

Connect CrawlPay as an autonomous MCP agent inside Cursor, Claude Desktop, or Windsurf. Settled natively on Celo Mainnet (Chain ID 42220) with ERC-8021 attribution tag celo_757c2ac3b70c. Zero third-party API keys required.

Cursor Configuration (.cursor/mcp.json)
{
  "mcpServers": {
    "crawlpay": {
      "command": "node",
      "args": ["node_modules/tsx/dist/cli.mjs", "scripts/mcp-server.ts"],
      "env": {
        "CELO_RPC_URL": "https://forno.celo.org",
        "AGENT_WALLET_ADDRESS": "0xf06c2b754d07cba299751f0985a48f8013bb6b39",
        "ATTRIBUTION_TAG": "celo_757c2ac3b70c"
      }
    }
  }
}
Claude Desktop (claude_desktop_config.json)
{
  "mcpServers": {
    "crawlpay": {
      "command": "node",
      "args": ["/path/to/Crawlpay/node_modules/tsx/dist/cli.mjs", "/path/to/Crawlpay/scripts/mcp-server.ts"],
      "env": {
        "CELO_RPC_URL": "https://forno.celo.org",
        "AGENT_WALLET_ADDRESS": "0xf06c2b754d07cba299751f0985a48f8013bb6b39",
        "ATTRIBUTION_TAG": "celo_757c2ac3b70c"
      }
    }
  }
}

Exposed Celo Native MCP Tools:

  • crawlpay_audit_site: Runs technical SEO, AEO, and GEO audits, CWV metrics, copywriting fixes, and returns Celo receipt.
  • crawlpay_compare_competitor: Head-to-head competitor audit with gap analysis and 3 action steps.
  • crawlpay_agent_status: Real-time Celo block height, gas prices, wallet balances, and ERC-8004 identity status.
  • handle_payment_required: Automatic x402 payment resolution on Celo Mainnet.

Engine Status & Error Codes

400 Bad Request

Target URL failed SSRF validation (private network, loopback, or cloud metadata IP).

402 Payment Required

Audit requires micropayment settlement. Returns challenge parameters and Celo recipient.

429 Rate Limit

Per-IP or per-wallet rate limit exceeded. Retry-After header provided.

500 Crawler Timeout

Target host timed out or blocked crawler. Auto-retried once per failure policy.