Repository avatar
AI Tools
v1.5.0
active

baseguard402

xyz.baseguard402.x402/baseguard402

14 Base x402 v2 USDC APIs: PDF/Web-to-Markdown, domain intel, EU-VAT/KYB, ERC-20 & NFT alpha.

Documentation

BaseGuard402 — x402 v2 Base Mainnet API Suite & MCP Server

x402 v2 Remote MCP Zero Dependencies License: MIT

BaseGuard402 (https://x402.baseguard402.xyz) is a live, pay-per-call x402 v2 microservice suite on Base Mainnet (eip155:8453) settled in USDC via the official Coinbase CDP Facilitator — no API keys, no signup, no subscriptions.

⚡ Zero-Install Remote MCP Server (Streamable HTTP)

Connect any MCP client (Claude, Cursor, Antigravity, x402 agent wallets) directly to all 14 live BaseGuard402 tools with zero local install:

{
  "mcpServers": {
    "baseguard402": {
      "url": "https://x402.baseguard402.xyz/mcp"
    }
  }
}

💳 6-Line Auto-Pay TypeScript Client (@x402/fetch)

import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const fetchPaid = wrapFetchWithPayment(fetch, privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`));
const res = await fetchPaid("https://x402.baseguard402.xyz/api/v1/pdf-clean", {
  method: "POST", headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ url: "https://arxiv.org/pdf/1706.03762.pdf", max_pages: 5 }),
});
console.log(await res.json());

Prefer local stdio MCP? This repository also provides a zero-dependency Python MCP server (Python >= 3.10 standard library only).


Live Discovery & Endpoints

EndpointMethodPrice (Base USDC)MCP ToolWhat It Does
/api/v1/domain-intelPOST$0.01baseguard402_domain_intelSSRF-safe domain trust score (0-100), live TLS cert expiry, DNS/MX, SPF & DMARC email auth, and RDAP age/registrar phishing check.
/api/v1/url-cleanPOST$0.01baseguard402_url_cleanStrips HTML, ads, scripts & cookie banners into clean Markdown with token-savings metrics.
/api/v1/x402-verifyPOST$0.01baseguard402_x402_verifyVerifies any public x402 endpoint before paying (HTTP 402 headers, Base USDC payTo, OpenAPI & discovery).
/api/v1/pdf-cleanPOST$0.02baseguard402_pdf_cleanSSRF-safe public PDF-to-Markdown & metadata extractor (whitepapers, invoices, docs, up to 4 MB).
/api/v1/token-auditPOST$0.02baseguard402_token_auditInspects live Base ERC-20 bytecode + Uniswap V3 liquidity for honeypots, mint traps & blacklist selectors (0-100 risk score).
/api/v1/wallet-scorePOST$0.02baseguard402_wallet_scoreBase Mainnet on-chain wallet reputation & anti-Sybil score (0-100, ETH/WETH/USDC balances, nonce, EOA vs. contract).
/api/v1/kyb-checkPOST$0.02baseguard402_kyb_checkLive EU-VAT (VIES) verification + deterministic FATF/OFAC/EU jurisdiction screening & company legal-form check.
/api/v1/nft-valuationPOST$0.02baseguard402_nft_valuationDeterministic Base NFT fair-minimum valuation & real WETH bid-liquidity depth oracle.
/api/v1/nft-alphaGET$0.03baseguard402_nft_alphaLive Base NFT arbitrage spreads (OpenSea, Blur, Magic Eden) & undervalued rare-trait listings.
/api/v1/smart-moneyGET$0.03baseguard402_smart_moneyVerified Base 3-wallet smart-money consensus signals.
/api/v1/prediction-edgeGET$0.03baseguard402_prediction_edgeVerified Limitless Base prediction-market probability edges.
/api/v1/deep-researchPOST$0.05baseguard402_deep_researchReal-time fact-checked technical/DeFi research synthesis with primary source citations.
/api/v1/qa-auditPOST$0.05baseguard402_qa_auditSSRF-safe automated website & JSON-API QA audit (HTTP, TLS, security headers, SEO/a11y, broken links).
/api/v1/ad-copyPOST$0.08baseguard402_ad_copyCompliant launch & advertising copy package (3 A/B ad variants, X/Farcaster thread, Discord & newsletter pitch).
/.well-known/x402.jsonGETFREEbaseguard402_discoverMachine-readable x402 v2 catalog, pricing, and JSON schemas.

Payment Details: Network eip155:8453 (Base Mainnet) · Asset USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) · Scheme exact (EIP-3009) · Facilitator https://api.cdp.coinbase.com/platform/v2/x402 · 60-minute cache & strict replay protection · Failed requests are never settled.


Quick Start: MCP Server Setup (Claude Desktop / Cursor / Antigravity)

No third-party Python packages required (Python >= 3.10 standard library only).

git clone https://github.com/mirkoleesch-ai/baseguard402-mcp.git
cd baseguard402-mcp
pip install -e .

Add to your MCP config (claude_desktop_config.json, Cursor MCP, or Antigravity MCP):

{
  "mcpServers": {
    "baseguard402": {
      "command": "python3",
      "args": ["-m", "baseguard402_mcp.server"],
      "env": {
        "BASEGUARD402_BASE_URL": "https://x402.baseguard402.xyz"
      }
    }
  }
}

Or run directly with uvx once installed:

python3 -m baseguard402_mcp.server --list-tools

Direct HTTP / curl Usage (x402 v2)

1. Probe Any Endpoint for an HTTP 402 Payment Quote (Free)

curl -i -X POST https://x402.baseguard402.xyz/api/v1/token-audit \
  -H "Content-Type: application/json" \
  -d '{"token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}'

The server responds with HTTP/2 402 Payment Required plus the PAYMENT-REQUIRED header containing the exact Base USDC EIP-3009 payment requirements and Bazaar schema.

2. Retry with a Signed PAYMENT-SIGNATURE Header

curl -s -X POST https://x402.baseguard402.xyz/api/v1/token-audit \
  -H "Content-Type: application/json" \
  -H "PAYMENT-SIGNATURE: <base64-x402-v2-payment-payload>" \
  -d '{"token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}'

Running Tests

python3 -m unittest discover -s tests -v

License

MIT License — see LICENSE.

No installation packages available.