Repository avatar
AI Tools
v3.4.0
active

x402-agent-toolkit

io.github.BreezeKitten/x402-agent-toolkit

14 Base USDC x402 MCP tools: funding & prediction arb, TWSE AI supply chain, Safe-Fetch & MCP audit.

Documentation

x402 Agent Toolkit — Autonomous Agentic Commerce & Edge Intelligence on Base

Base Mainnet Protocol License

An open-source, zero-custody, security-hardened suite of 4 production Cloudflare Workers built on Base Mainnet USDC (eip155:8453), combining x402 v2 HTTP micropayments, a paid Remote MCP Server, an A2A Agent Card, and direct on-chain USDC SaaS verification — with zero private keys stored anywhere on the server.


Live Production Suite (100% Online on Cloudflare Edge)

ServiceLive URLMonetization & Protocol
x402 Agent Toolkit v3.4https://x402-agent-toolkit.x402-edge-tools.workers.dev14 paid x402 v2 endpoints + Remote MCP (/mcp) + Google A2A JSON-RPC 2.0 (Base Mainnet USDC via PayAI Facilitator)
Taiwan Market Pulsehttps://taiwan-market-pulse.x402-edge-tools.workers.devFree KV + Cron-updated TWSE / Taiwan AI Supply Chain ($NVDA/$TSM) & Polymarket portal + RSS (/feed.xml) + RSL 1.0 (/license.xml)
ZeroLeakhttps://zeroleak.x402-edge-tools.workers.dev100% client-side "0 bytes uploaded" secret & PII scrubber (script-src 'self' CSP) + on-chain Base USDC Pro unlock ($9)
Base Wallet Hygiene Checkhttps://base-hygiene.x402-edge-tools.workers.devLive Base Mainnet ERC-20 approval risk scanner + Farcaster Mini App (/.well-known/farcaster.json) + dynamic SVG grade cards + $1 Base USDC CSV audit

Public Directory Listings & Verified On-Chain Settlement

  • x402scan: https://www.x402scan.com/server/660bd5c9-2bf6-491d-8293-c15b232d170a
  • A2A Registry: https://www.a2a-registry.org/agent/dev.workers.x402_agent_toolkit
  • 402 Index: Domain-verified provider (402index.io, all 12 endpoints registered)
  • PayAPI Market: Listed & settlement-verified on Base Mainnet
  • Base Mainnet Settlement Address (Public Only): 0xe7702c3d5918eeab4c4b96ad5c821256ee1cb417

14 Paid x402 v2 Endpoints & MCP Tools

All endpoints support GET, POST, and HEAD, embed official x402 v2 Bazaar Discovery Extensions, and are exposed via our Remote MCP Server (POST /mcp & POST /, where initialize & tools/list are free and tools/call settles via x402):

Endpoint / MCP ToolPrice (USDC)Description
/api/ai-supply-chain (ai_supply_chain)$0.03024 Tier 1–3 Taiwan AI hardware suppliers (TWSE) mapped to $NVDA/$TSM/$AVGO/$AMD/$SMCI + composite AI Hardware Demand Index
/api/market-signals (market_signals)$0.025Polymarket Gamma + live CLOB orderbook spread/imbalance/turnover signals & Multi-DEX cross-pool arbitrage spread
/api/tw-stock-intel (tw_stock_intel)$0.020Official TWSE daily OHLCV, P/E, dividend yield, P/B, monthly revenue YoY/MoM & material disclosures (English JSON)
/api/tw-institutional-flows (tw_institutional_flows)$0.020Official TWSE daily Foreign / Investment Trust / Dealer net flows (TWD & shares), margin & short balances, and 24-company AI supply chain positioning
/api/safe-fetch (safe_fetch)$0.015Agent Immune System: Prompt Injection Firewall stripping zero-width unicode, hidden CSS/HTML comments & wallet-drain directives + SHA-256 digest
/api/deep-extract (deep_extract)$0.015Structured HTML table parser (JSON objects/rows), hidden __NEXT_DATA__ / JSON-LD SPA data island extractor & Markdown
/api/prediction-arb (prediction_arb)$0.010Polymarket × Kalshi Arbitrage: cross-exchange probability spread matcher, intra-market YES+NO mispricing & high-probability carry signals
/api/mcp-security-scan (mcp_security_scan)$0.010MCP Tool-Poisoning Scanner: audits remote Streamable HTTP MCP servers (initialize + tools/list) for hidden prompt injections, stealth unicode & credential exfiltration
/api/funding-arb (funding_arb)$0.005Hyperliquid × dYdX v4 Funding Arb: live cross-DEX hourly perpetual funding spread normalized to annualized APR + oracle basis bps & single-venue carry extremes
/api/x402-preflight (x402_preflight)$0.005Preflight security & spec auditor for unknown x402 URLs (402 check, official USDC contract match, payTo validation, 0–100 trust score)
/api/repo-intel (repo_intel)$0.005GitHub repository activity, latest release, maintenance health score + npm/PyPI registry metadata
/api/token-check (token_check)$0.005DexScreener liquidity/volume + GoPlus contract security 0–100 risk score
/api/site-intel (site_intel)$0.003HTTP security headers audit, OpenGraph, tech stack hints, robots.txt & llms.txt
/api/web-to-markdown (web_to_markdown)$0.002Clean LLM-ready Markdown + deduplicated outbound links

Security Architecture

  • Zero Private Keys: Only public PAY_TO_ADDRESS is configured; startup validation rejects 64-hex private keys or zero addresses.
  • Strict SSRF Defense: Blocks non-http(s) schemes, embedded credentials, localhost, RFC1918/IPv6 private ranges, cloud metadata (169.254.169.254, metadata.google.internal), obfuscated numeric/hex IPs, non-standard ports, and validates every redirect hop manually (max 3).
  • Bounded Streaming & DoS Protection: Strict 32 KB request body limit, 1–3 MB streamed upstream response caps (never buffers unbounded bodies), 8–9s timeouts, and defensive security headers (CSP, X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Referrer-Policy: no-referrer).
  • Automated Security Test Suite: 49/49 passing pytest unit & integration tests covering SSRF, redirect blocking, body caps, forged PAYMENT-SIGNATURE rejection, and x402 v2 Base Mainnet USDC challenges (tests/).

Repository Structure

├── worker/           # Production Cloudflare Worker: x402-agent-toolkit (x402 + MCP + A2A)
├── worker-pulse/     # Production Cloudflare Worker: taiwan-market-pulse (KV + Cron + RSS + RSL 1.0)
├── worker-zeroleak/  # Production Cloudflare Worker: ZeroLeak (Client-side scrubber + Base USDC Pro)
├── sdk/              # Python client SDK + smithery.yaml + MCP client quickstart
├── app/              # Reference Python FastAPI implementation using official x402 SDK
├── tests/            # 49 automated security, service & x402 integration tests
├── Dockerfile        # Non-root container build for FastAPI reference server
└── render.yaml       # One-click Render Blueprint deployment config

Quickstart (MCP Client)

{
  "mcpServers": {
    "x402-agent-toolkit": {
      "url": "https://x402-agent-toolkit.x402-edge-tools.workers.dev/mcp"
    }
  }
}

Local Tests (Python Reference Implementation)

pip install -r requirements.txt
pytest -v

License

MIT License

No installation packages available.