# x402 Agent Toolkit (v3.4) > Pay-per-request edge APIs & Remote MCP Server for AI agents. No API keys or accounts — pay automatically via HTTP 402 (USDC on Base Mainnet). ## Discovery & Integration - Remote MCP Server (tools/list FREE, tools/call x402): https://x402-agent-toolkit.x402-edge-tools.workers.dev/mcp - A2A Agent Card: https://x402-agent-toolkit.x402-edge-tools.workers.dev/.well-known/agent-card.json - OpenAPI 3.1 Spec: https://x402-agent-toolkit.x402-edge-tools.workers.dev/openapi.json - x402 Manifest: https://x402-agent-toolkit.x402-edge-tools.workers.dev/.well-known/x402.json - Free Live Web Dashboard: https://taiwan-market-pulse.x402-edge-tools.workers.dev - Payment Network: eip155:8453 | Asset: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | PayTo: 0xe7702c3d5918eeab4c4b96ad5c821256ee1cb417 ## Paid Endpoints & Tools - safe_fetch ($0.015 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/safe-fetch — Security shield for wallet-enabled AI agents: fetches any public URL, strips hidden prompt injections (zero-width unicode, invisible CSS/HTML comments, system-override directives, data-exfiltration links), and returns sanitized Markdown + SHA-256 digest + GO/WARN/BLOCK verdict. - ai_supply_chain ($0.03 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/ai-supply-chain — Real-time leading indicator for $NVDA/$TSM/$AVGO/$AMD/$SMCI: aggregates 24 curated Tier 1-3 Taiwan TWSE AI suppliers (Foundry/CoWoS, AI Server ODMs, Liquid Cooling, ABF Substrates, CCL/PCB, 800G Networking, ASICs) with live monthly revenue YoY/MoM, US ticker read-through & composite AI Hardware Demand Index. - tw_institutional_flows ($0.02 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/tw-institutional-flows — Official TWSE daily institutional money-flow intelligence in clean English JSON: market-wide Foreign, Investment Trust & Dealer net buy/sell (TWD), per-stock institutional net shares (T86), margin financing & short-selling balances (MI_MARGN), top foreign net-bought/sold leaders, and 24-company AI hardware supply chain institutional positioning. - funding_arb ($0.005 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/funding-arb — Real-time cross-venue perpetual funding-rate arbitrage scanner for quant & trading agents: aggregates 235+ Hyperliquid and dYdX v4 perpetual markets, normalizes hourly funding to annualized APR, computes exact long/short venue carry spreads, oracle basis bps, open interest & 24h volume. - prediction_arb ($0.01 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/prediction-arb — Real-time prediction market arbitrage intelligence for trading agents: scans top active Polymarket and Kalshi markets for cross-exchange probability spreads, intra-market YES+NO sum mispricings, and high-liquidity near-resolution carry opportunities. - mcp_security_scan ($0.01 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/mcp-security-scan — Before your AI agent connects to an unknown remote Streamable HTTP MCP server, scan it: executes initialize + tools/list, inspects every tool description & JSON schema for hidden prompt injections, zero-width/bidi unicode stealth chars, credential/wallet exfiltration instructions, and dangerous shell/execution surfaces, returning a 0-100 risk score, verdict & SHA-256 manifest digest. - x402_preflight ($0.005 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/x402-preflight — Before your AI agent pays an unknown x402 URL, audit it: checks latency, HTTP 402 compliance, decodes PAYMENT-REQUIRED, verifies official USDC contract & valid payTo address, checks Bazaar schema, and returns a 0-100 trust score. - repo_intel ($0.005 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/repo-intel — Single-call structured GitHub intelligence for coding & research agents: stars, forks, open issues, latest release, language mix, maintenance health score, and npm/PyPI registry metadata. - tw_stock_intel ($0.02 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/tw-stock-intel — Structured English-keyed Taiwan listed company intelligence from official TWSE OpenAPI: daily OHLCV, P/E, dividend yield, P/B, monthly revenue YoY/MoM growth, and material disclosures (or quantitative market screeners). - market_signals ($0.025 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/market-signals — Cross-source quantitative signals for trading agents: (1) Polymarket Gamma + live CLOB orderbook spread, depth imbalance, YES+NO mispricing & breakout turnover; (2) Multi-DEX cross-pool price spread & arbitrage feasibility. - deep_extract ($0.015 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/deep-extract — Heavy-duty extraction for AI agents: parses all HTML tables into typed JSON objects/rows, extracts hidden SPA hydration JSON (__NEXT_DATA__, JSON-LD, embedded data islands), heading outline, OpenGraph metadata, and clean Markdown. - web_to_markdown ($0.002 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/web-to-markdown — Convert any public web page into clean, LLM-ready Markdown + metadata & links. - token_check ($0.005 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/token-check — Aggregate DexScreener liquidity/volume and GoPlus contract security into a 0-100 risk report. - site_intel ($0.003 USDC): GET/POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/site-intel — Audit HTTP security headers, metadata, OpenGraph, tech stack hints, robots.txt, and llms.txt. ## Detailed Tool Schemas & Example Inputs ### safe_fetch — `/api/safe-fetch` ($0.015 USDC / 15000 atomic USDC) - Service: Agent Immune System — Prompt Injection Firewall & Safe Fetch - Description: Security shield for wallet-enabled AI agents: fetches any public URL, strips hidden prompt injections (zero-width unicode, invisible CSS/HTML comments, system-override directives, data-exfiltration links), and returns sanitized Markdown + SHA-256 digest + GO/WARN/BLOCK verdict. - Tags: security, prompt-injection, firewall, agents, safety, sanitization - Input Schema: `{"properties":{"url":{"type":"string","description":"Public http(s) URL to fetch and sanitize against prompt injections."},"max_chars":{"type":"integer","default":20000}},"required":["url"]}` - Example Input: `{"url":"https://example.com"}` ### ai_supply_chain — `/api/ai-supply-chain` ($0.03 USDC / 30000 atomic USDC) - Service: Taiwan AI Hardware Supply Chain Wire (Mapped to US Tickers) - Description: Real-time leading indicator for $NVDA/$TSM/$AVGO/$AMD/$SMCI: aggregates 24 curated Tier 1-3 Taiwan TWSE AI suppliers (Foundry/CoWoS, AI Server ODMs, Liquid Cooling, ABF Substrates, CCL/PCB, 800G Networking, ASICs) with live monthly revenue YoY/MoM, US ticker read-through & composite AI Hardware Demand Index. - Tags: nvidia, tsmc, ai-supply-chain, taiwan, semiconductors, equities, quant - Input Schema: `{"properties":{"us_ticker":{"type":"string","description":"Optional US ticker filter (NVDA, TSM, AVGO, AMD, SMCI, AAPL)."},"layer":{"type":"string","description":"Optional supply-chain layer filter (foundry, odm, cooling, pcb, networking, asic, power)."}}}` - Example Input: `{"us_ticker":"NVDA"}` ### tw_institutional_flows — `/api/tw-institutional-flows` ($0.02 USDC / 20000 atomic USDC) - Service: Taiwan TWSE Institutional Flows & Margin Positioning (Foreign / Trust / Dealer) - Description: Official TWSE daily institutional money-flow intelligence in clean English JSON: market-wide Foreign, Investment Trust & Dealer net buy/sell (TWD), per-stock institutional net shares (T86), margin financing & short-selling balances (MI_MARGN), top foreign net-bought/sold leaders, and 24-company AI hardware supply chain institutional positioning. - Tags: taiwan, twse, institutional-flows, foreign-investors, margin, quant, ai-supply-chain - Input Schema: `{"properties":{"mode":{"type":"string","enum":["overview","ai_chain","ticker"],"default":"overview","description":"overview (market totals + top foreign buys/sells + AI chain summary), ai_chain (24 AI hardware stocks), or ticker (single stock)."},"symbol":{"type":"string","description":"Optional Taiwan stock code (e.g. 2330). Forces single-stock mode when provided."},"limit":{"type":"integer","default":10,"description":"Number of top net-bought / net-sold stocks to return (1-30)."}}}` - Example Input: `{"mode":"overview","limit":10}` ### funding_arb — `/api/funding-arb` ($0.005 USDC / 5000 atomic USDC) - Service: Cross-DEX Perpetual Funding Rate Arbitrage Scanner (Hyperliquid × dYdX v4) - Description: Real-time cross-venue perpetual funding-rate arbitrage scanner for quant & trading agents: aggregates 235+ Hyperliquid and dYdX v4 perpetual markets, normalizes hourly funding to annualized APR, computes exact long/short venue carry spreads, oracle basis bps, open interest & 24h volume. - Tags: funding-rate, arbitrage, hyperliquid, dydx, perpetuals, defi, quant, trading - Input Schema: `{"properties":{"symbol":{"type":"string","description":"Optional ticker filter (e.g. BTC, ETH, SOL)."},"min_apr":{"type":"number","default":0,"description":"Minimum annualized cross-venue funding spread APR (%)."},"limit":{"type":"integer","default":15,"description":"Max arbitrage opportunities to return (1-40)."}}}` - Example Input: `{"limit":15,"min_apr":5}` ### prediction_arb — `/api/prediction-arb` ($0.01 USDC / 10000 atomic USDC) - Service: Cross-Exchange Prediction Market Arbitrage & Dislocation Scanner (Polymarket × Kalshi) - Description: Real-time prediction market arbitrage intelligence for trading agents: scans top active Polymarket and Kalshi markets for cross-exchange probability spreads, intra-market YES+NO sum mispricings, and high-liquidity near-resolution carry opportunities. - Tags: polymarket, kalshi, prediction-market, arbitrage, trading, signals, quant - Input Schema: `{"properties":{"query":{"type":"string","description":"Optional keyword filter (e.g. bitcoin, fed, rate, nvidia)."},"min_spread_bps":{"type":"integer","default":100,"description":"Minimum cross-exchange spread in basis points."},"limit":{"type":"integer","default":12,"description":"Max signals per category (1-30)."}}}` - Example Input: `{"limit":12}` ### mcp_security_scan — `/api/mcp-security-scan` ($0.01 USDC / 10000 atomic USDC) - Service: MCP Server Tool-Poisoning & Prompt-Injection Security Scanner - Description: Before your AI agent connects to an unknown remote Streamable HTTP MCP server, scan it: executes initialize + tools/list, inspects every tool description & JSON schema for hidden prompt injections, zero-width/bidi unicode stealth chars, credential/wallet exfiltration instructions, and dangerous shell/execution surfaces, returning a 0-100 risk score, verdict & SHA-256 manifest digest. - Tags: mcp, security, tool-poisoning, prompt-injection, audit, agents, verification - Input Schema: `{"properties":{"url":{"type":"string","description":"Public Streamable HTTP MCP endpoint URL to audit (e.g. https://example.com/mcp)."}},"required":["url"]}` - Example Input: `{"url":"https://x402-agent-toolkit.x402-edge-tools.workers.dev/mcp"}` ### x402_preflight — `/api/x402-preflight` ($0.005 USDC / 5000 atomic USDC) - Service: x402 Endpoint Safety & Spec Preflight Auditor - Description: Before your AI agent pays an unknown x402 URL, audit it: checks latency, HTTP 402 compliance, decodes PAYMENT-REQUIRED, verifies official USDC contract & valid payTo address, checks Bazaar schema, and returns a 0-100 trust score. - Tags: x402, security, audit, preflight, payments, agents, verification - Input Schema: `{"properties":{"url":{"type":"string","description":"Target x402 endpoint URL to preflight-audit."},"method":{"type":"string","enum":["GET","POST"],"default":"GET"}},"required":["url"]}` - Example Input: `{"url":"https://x402-agent-toolkit.x402-edge-tools.workers.dev/api/site-intel?url=https://example.com"}` ### repo_intel — `/api/repo-intel` ($0.005 USDC / 5000 atomic USDC) - Service: GitHub Repository & Package Traction Intelligence - Description: Single-call structured GitHub intelligence for coding & research agents: stars, forks, open issues, latest release, language mix, maintenance health score, and npm/PyPI registry metadata. - Tags: github, opensource, developer, code, npm, pypi, research - Input Schema: `{"properties":{"repo":{"type":"string","description":"GitHub repository in owner/name format (e.g. coinbase/x402)."},"npm_package":{"type":"string","description":"Optional npm package name."},"pypi_package":{"type":"string","description":"Optional PyPI package name."}},"required":["repo"]}` - Example Input: `{"repo":"coinbase/x402"}` ### tw_stock_intel — `/api/tw-stock-intel` ($0.02 USDC / 20000 atomic USDC) - Service: Taiwan Stock Exchange (TWSE) Financial & Disclosure Intelligence - Description: Structured English-keyed Taiwan listed company intelligence from official TWSE OpenAPI: daily OHLCV, P/E, dividend yield, P/B, monthly revenue YoY/MoM growth, and material disclosures (or quantitative market screeners). - Tags: taiwan, asia, equities, twse, finance, quant, tsmc - Input Schema: `{"properties":{"code":{"type":"string","description":"Taiwan stock ticker code (e.g. 2330 for TSMC). Omit to run a screener."},"screener":{"type":"string","enum":["top_revenue_yoy","top_dividend","top_volume","latest_disclosures"],"description":"Market-wide screener mode."},"limit":{"type":"integer","default":10}}}` - Example Input: `{"code":"2330"}` ### market_signals — `/api/market-signals` ($0.025 USDC / 25000 atomic USDC) - Service: Prediction Market & Multi-DEX Cross-Source Signal Scanner - Description: Cross-source quantitative signals for trading agents: (1) Polymarket Gamma + live CLOB orderbook spread, depth imbalance, YES+NO mispricing & breakout turnover; (2) Multi-DEX cross-pool price spread & arbitrage feasibility. - Tags: polymarket, prediction-market, arbitrage, defi, trading, signals, clob - Input Schema: `{"properties":{"mode":{"type":"string","enum":["polymarket","dex_arb"],"default":"polymarket"},"query":{"type":"string","description":"Keyword filter for Polymarket markets."},"limit":{"type":"integer","default":8},"address":{"type":"string","description":"Token address for mode=dex_arb."},"chain":{"type":"string","default":"base"}}}` - Example Input: `{"mode":"polymarket","limit":8}` ### deep_extract — `/api/deep-extract` ($0.015 USDC / 15000 atomic USDC) - Service: Deep Structured Web, HTML Table & SPA State Extractor - Description: Heavy-duty extraction for AI agents: parses all HTML tables into typed JSON objects/rows, extracts hidden SPA hydration JSON (__NEXT_DATA__, JSON-LD, embedded data islands), heading outline, OpenGraph metadata, and clean Markdown. - Tags: scraping, tables, json, nextjs, structured-data, extraction - Input Schema: `{"properties":{"url":{"type":"string","description":"Public http(s) URL to extract structured tables, SPA JSON & Markdown from."},"max_tables":{"type":"integer","default":10},"include_markdown":{"type":"boolean","default":true}},"required":["url"]}` - Example Input: `{"url":"https://example.com"}` ### web_to_markdown — `/api/web-to-markdown` ($0.002 USDC / 2000 atomic USDC) - Service: Web-to-Markdown Converter - Description: Convert any public web page into clean, LLM-ready Markdown + metadata & links. - Tags: web, markdown, scraping, llm, reader - Input Schema: `{"properties":{"url":{"type":"string","description":"Public http(s) URL to convert to Markdown"},"max_chars":{"type":"integer","default":25000},"include_links":{"type":"boolean","default":true}},"required":["url"]}` - Example Input: `{"url":"https://example.com"}` ### token_check — `/api/token-check` ($0.005 USDC / 5000 atomic USDC) - Service: On-Chain Token Risk & Market Check - Description: Aggregate DexScreener liquidity/volume and GoPlus contract security into a 0-100 risk report. - Tags: crypto, base, solana, defi, security, token - Input Schema: `{"properties":{"address":{"type":"string","description":"Token contract address (0x... or Solana Base58)"},"chain":{"type":"string","default":"base"}},"required":["address"]}` - Example Input: `{"address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","chain":"base"}` ### site_intel — `/api/site-intel` ($0.003 USDC / 3000 atomic USDC) - Service: Website Security & AI-Readiness Inspector - Description: Audit HTTP security headers, metadata, OpenGraph, tech stack hints, robots.txt, and llms.txt. - Tags: security, seo, web, recon, llms-txt - Input Schema: `{"properties":{"url":{"type":"string","description":"Public domain or URL to inspect"}},"required":["url"]}` - Example Input: `{"url":"https://example.com"}` ## Payment & MCP Quickstart - Free MCP discovery: POST https://x402-agent-toolkit.x402-edge-tools.workers.dev/mcp with `{"jsonrpc":"2.0","id":1,"method":"tools/list"}` - Paid call: include x402 v2 `PAYMENT-SIGNATURE` header (Base Mainnet USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` to `0xe7702c3d5918eeab4c4b96ad5c821256ee1cb417` via `https://facilitator.payai.network`).