
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
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
- Base URL:
https://x402.baseguard402.xyz - Remote Streamable HTTP MCP:
https://x402.baseguard402.xyz/mcp(Protocol2025-06-18, x402 v2PAYMENT-SIGNATURE) - x402 Discovery Manifest:
/.well-known/x402·/.well-known/x402.json - LLM Guide (
llms.txt):/llms.txt - OpenAPI Spec:
/openapi.json - A2A Agent Card:
/.well-known/agent-card.json - Health Check:
/health
| Endpoint | Method | Price (Base USDC) | MCP Tool | What It Does |
|---|---|---|---|---|
/api/v1/domain-intel | POST | $0.01 | baseguard402_domain_intel | SSRF-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-clean | POST | $0.01 | baseguard402_url_clean | Strips HTML, ads, scripts & cookie banners into clean Markdown with token-savings metrics. |
/api/v1/x402-verify | POST | $0.01 | baseguard402_x402_verify | Verifies any public x402 endpoint before paying (HTTP 402 headers, Base USDC payTo, OpenAPI & discovery). |
/api/v1/pdf-clean | POST | $0.02 | baseguard402_pdf_clean | SSRF-safe public PDF-to-Markdown & metadata extractor (whitepapers, invoices, docs, up to 4 MB). |
/api/v1/token-audit | POST | $0.02 | baseguard402_token_audit | Inspects live Base ERC-20 bytecode + Uniswap V3 liquidity for honeypots, mint traps & blacklist selectors (0-100 risk score). |
/api/v1/wallet-score | POST | $0.02 | baseguard402_wallet_score | Base Mainnet on-chain wallet reputation & anti-Sybil score (0-100, ETH/WETH/USDC balances, nonce, EOA vs. contract). |
/api/v1/kyb-check | POST | $0.02 | baseguard402_kyb_check | Live EU-VAT (VIES) verification + deterministic FATF/OFAC/EU jurisdiction screening & company legal-form check. |
/api/v1/nft-valuation | POST | $0.02 | baseguard402_nft_valuation | Deterministic Base NFT fair-minimum valuation & real WETH bid-liquidity depth oracle. |
/api/v1/nft-alpha | GET | $0.03 | baseguard402_nft_alpha | Live Base NFT arbitrage spreads (OpenSea, Blur, Magic Eden) & undervalued rare-trait listings. |
/api/v1/smart-money | GET | $0.03 | baseguard402_smart_money | Verified Base 3-wallet smart-money consensus signals. |
/api/v1/prediction-edge | GET | $0.03 | baseguard402_prediction_edge | Verified Limitless Base prediction-market probability edges. |
/api/v1/deep-research | POST | $0.05 | baseguard402_deep_research | Real-time fact-checked technical/DeFi research synthesis with primary source citations. |
/api/v1/qa-audit | POST | $0.05 | baseguard402_qa_audit | SSRF-safe automated website & JSON-API QA audit (HTTP, TLS, security headers, SEO/a11y, broken links). |
/api/v1/ad-copy | POST | $0.08 | baseguard402_ad_copy | Compliant launch & advertising copy package (3 A/B ad variants, X/Farcaster thread, Discord & newsletter pitch). |
/.well-known/x402.json | GET | FREE | baseguard402_discover | Machine-readable x402 v2 catalog, pricing, and JSON schemas. |
Payment Details: Network
eip155:8453(Base Mainnet) · AssetUSDC(0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) · Schemeexact(EIP-3009) · Facilitatorhttps://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.