Skip to main content
Glama

BaseGuard402 — x402 v2 Base Mainnet API Suite & MCP Server

x402 v2 MCP Ready 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.

This repository provides a zero-dependency Model Context Protocol (MCP) server and client reference so Claude Desktop, Cursor, Antigravity, and autonomous AI agents can discover and call all 5 BaseGuard402 endpoints out of the box.


Live Discovery & Endpoints

Endpoint

Method

Price (Base USDC)

MCP Tool

What It Does

/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/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/nft-alpha

GET

$0.03

baseguard402_nft_alpha

Live Base NFT arbitrage spreads (OpenSea, Blur, Magic Eden) & undervalued rare-trait listings.

/api/v1/nft-valuation

POST

$0.02

baseguard402_nft_valuation

Deterministic Base NFT fair-minimum valuation & real WETH bid-liquidity depth oracle.

/api/v1/deep-research

POST

$0.05

baseguard402_deep_research

Real-time fact-checked technical/DeFi research synthesis with primary source citations.

/.well-known/x402.json

GET

FREE

baseguard402_discover

Machine-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.


Related MCP server: NEX Agent Co. MCP Server

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.

Available Tools

6 tools
baseguard402_deep_researchB

$0.05 USDC on Base (x402 v2). Real-time fact-checked deep research synthesis backed by primary source URLs.

Inputs: query (required), x_payment, max_sources, payment_signature.

baseguard402_discoverA

FREE. Fetch the live BaseGuard402 x402 v2 discovery manifest, endpoint pricing (Base USDC), and schemas.

Inputs: no named parameters.

baseguard402_nft_alphaC

$0.03 USDC on Base (x402 v2). Live Base NFT arbitrage spreads (OpenSea, Blur, Magic Eden) and undervalued rare-trait feed.

Inputs: limit, strategy, x_payment, min_spread_pct, +1 more.

baseguard402_nft_valuationB

$0.02 USDC on Base (x402 v2). Deterministic Base NFT fair-minimum valuation & WETH bid-liquidity depth oracle.

Inputs: token_id (required), contract_address (required), traits, x_payment, +1 more.

baseguard402_token_auditB

$0.02 USDC on Base (x402 v2). Live Base ERC-20 bytecode & Uniswap V3 liquidity risk/honeypot audit (0-100 risk score).

Inputs: token_address (required), x_payment, payment_signature.

baseguard402_url_cleanB

$0.01 USDC on Base (x402 v2). Extract any public webpage into clean, token-efficient Markdown with token-savings stats.

Inputs: url (required), max_chars, x_payment, payment_signature.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Exposes 25 paid API endpoints as MCP tools for AI agents, with payments in USDC on Base mainnet via the x402 protocol, enabling tasks like web search, company intelligence, and crypto research.
      25
      126 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to access 11 paid x402 endpoints as standard MCP tools, paying per call in USDC on Base without API keys, covering chat, code, vision, embeddings, crypto prices, weather, geolocation, forex, and WHOIS data.
      -
    • A
      license
      B
      quality
      B
      maintenance
      Pay-per-call MCP and x402 v2 server on Base USDC providing 19 keyless tools for AI agents: web extraction, social and academic search, B2B lead and domain intelligence, npm/PyPI package and smart-contract security audits, OFAC compliance screening, and DeFi swap quotes
      23
      272 npm
      MIT