PreFlight402
Supports Ethereum mainnet (chain ID 1) as a queried EVM chain for pre-trade risk checks, token safety, wallet profiling, DEX spread analysis, and gas fee estimates.
Supports Optimism (chain ID 10) as a queried EVM chain for trade preflight, token batch and safety screening, wallet profiling, DEX spread, and gas oracle data.
Supports Polygon (chain ID 137) as a queried EVM chain for pre-trade risk checks, token safety, wallet profiling, DEX spread analysis, and gas fee estimates.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
PreFlight402 (x402-preflight-api)
Autonomous pre-trade Web3 risk, cross-DEX spread, counterparty screening, and x402 endpoint health API powered by Cloudflare Workers and the x402 HTTP 402 Payment Protocol on Base Mainnet (eip155:8453, USDC).
Live production URL:
https://x402-preflight-api.shellshelltorres.workers.dev(listed on x402scan — 17 OpenAPI routes / 7 paid x402 endpoints)Infrastructure cost:
$0/month(Cloudflare Workers Free Tier + zero-API-key upstream providers)Payment model: Permissionless pay-per-request USDC settled directly to
PAY_TO_ADDRESSSupported EVM chains:
base(8453),ethereum(1),arbitrum(42161),polygon(137),bsc(56),optimism(10)
Paid Endpoints (Base USDC via x402)
Method & Path | Price | Parameters | Description |
| $0.025 |
| Single-call execution gate combining token safety, honeypot check, price impact estimate, gas USD fee, oracle deviation, and |
| $0.025 |
| Screens 2–5 EVM tokens in parallel using GoPlus, DexScreener batch pools, and DefiLlama prices ranked by risk score and liquidity. |
| $0.015 |
| Aggregates GoPlus |
| $0.010 |
| Compares cross-DEX liquidity pools against DefiLlama oracle pricing to return best buy/sell pools, gross spread %, bottleneck liquidity, and |
| $0.010 |
| Combines GoPlus |
| $0.005 |
| Live RPC gas prices across all 6 EVM chains with USD fee estimates for ERC-20 transfer, DEX swap, and complex arbitrage + |
| $0.005 |
| SSRF-hardened live audit checking HTTP |
Related MCP server: Alien Plugg x402 MCP Server
Remote MCP Server (Streamable HTTP)
AI agents and MCP clients can connect directly without local installation or API keys (9 tools: 2 free + 7 paid):
Streamable HTTP endpoint:
https://x402-preflight-api.shellshelltorres.workers.dev/mcpFree tools:
preflight_catalog,preflight_samplePaid tools (
x402v2 over MCP via_meta["x402/payment"]on Base USDC):trade_preflight($0.025),token_batch($0.025),token_safety($0.015),dex_spread($0.010),wallet_profile($0.010),gas_oracle($0.005),x402_audit($0.005)
{
"mcpServers": {
"preflight402": {
"type": "streamable-http",
"url": "https://x402-preflight-api.shellshelltorres.workers.dev/mcp"
}
}
}Free Discovery & Sample Routes
GET /— API metadata, pricing, and quickstart linksGET /health— Worker status and wallet configuration checkGET /.well-known/x402— x402scan discovery manifest (version: 1)GET /.well-known/x402.json— x402 v2 static discovery manifest (for x402scan & indexers)GET /.well-known/mcp/server-card.json— MCP Server Card (SEP-1649/SEP-2127)GET /.well-known/agent-card.json— A2A Agent Card for autonomous agent discoveryPOST /mcp— Stateless Streamable HTTP MCP endpoint (JSON-RPC 2.0 + x402 v2 over MCP)GET /openapi.json— OpenAPI 3.1.0 specificationGET /llms.txt— Agent-readable documentation & pricing summaryGET /v1/sample/{tool}— Free sample responses (token-safety,dex-spread,wallet-profile,x402-audit,trade-preflight,token-batch,gas-oracle)
Quickstart for AI Agents (@x402/fetch)
import { wrapFetchWithPayment } from "@x402/fetch";
// Wrap fetch with your x402 EVM signer
const res = await fetchWithPay(
"https://x402-preflight-api.shellshelltorres.workers.dev/v1/token-safety?chain=base&address=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
);
const report = await res.json();
console.log(report.verdict, report.riskScore, report.flags);Local Development & Verification
npm install
npm run typecheck
npm test
npm run dry-runGuia Rápido pelo Celular (Deploy Sem Programar — $0/mês)
Regra de segurança: Use apenas o endereço público (
0x...) da rede Base da sua carteira fria. Nunca digite seed phrase ou chave privada em nenhum painel ou arquivo.
Publicar na Cloudflare (Grátis, direto do navegador do celular):
Crie ou acesse sua conta gratuita em
dash.cloudflare.com(plano Workers Free não exige cartão para Workers padrão).Vá em Compute (Workers) → Create → Import a repository e selecione este repositório GitHub (
x402-preflight-api).Em Build command, deixe em branco (ou
npm install) e em Deploy command deixenpx wrangler deploy.
Configurar sua Carteira Fria (
PAY_TO_ADDRESS):Após importar, abra o Worker criado → Settings → Variables and Secrets → Add.
Nome da variável:
PAY_TO_ADDRESSValor: seu endereço público na rede Base (
0x...) e salve/redeploy.(Opcional) Confira se
X402_NETWORKestá comoeip155:8453eFACILITATOR_URLcomohttps://facilitator.payai.network.
Testar no navegador do celular:
Acesse
https://SEU-WORKER.workers.dev/health→ deve mostrar"walletConfigured": true.Acesse
https://SEU-WORKER.workers.dev/.well-known/x402.json→ deve listar os 4 serviços pagos.Acesse
https://SEU-WORKER.workers.dev/v1/token-safety?chain=base&address=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913→ deve responder erro HTTP402(cobrança ativa!).
Ativar a Indexação no x402 Bazaar / x402scan:
Os catálogos de agentes listam automaticamente uma API após a primeira chamada paga liquidada com sucesso (~15 minutos após o pagamento).
Faça apenas 1 chamada real no endpoint mais barato (
/v1/x402-audit, $0.005 USDC = meio centavo de dólar) usando uma carteira/cliente x402 na rede Base.Assim que o facilitador confirmar essa primeira transação na Base, os indexadores leem os metadados Bazaar +
/.well-known/x402.jsone sua API passa a aparecer para agentes autônomos e exploradores.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Pay-per-use MCP tools for AI agents. USDC on Base via x402. No API keys.
Pay-per-call DeFi and macro intel for AI agents. x402 USDC tools via streamable HTTP /api/mcp.
Pay-per-call ($0.005-$0.03 USDC) market, on-chain, and prediction-market data API for AI agents and trading bots via x402 — no signup, no API key. Remote MCP server, 28 tools: token security (honeypot/liquidity/counterfeit checks), Hyperliquid oracle-gap risk, kimchi premium, funding APR, DEX slippage, Polymarket arbitrage/liquidity audits, Hyperliquid HIP-4 odds.
Production-grade MCP gateway delivering 8 real-time AI tools with instant x402 micropayments settled in USDC on Base Mainnet or SPL-USDC on Solana. Features Basescan contract auditing, wallet analytics, headless browser scraping, and pre-scraped oracle data feeds.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server that provides AI agents with pay-per-call access to a suite of tools (honeypot check, token market, DeFi yields, etc.) via USDC on Base using the x402 protocol.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server exposing 10 curated tools for AI agents, providing crypto trading signals, on-chain analysis, and web utilities via pay-per-call x402 endpoints on the Base network.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access pay-per-call onchain and URL safety APIs over MCP, covering transaction explanations, token approval checks, address inspection, contract risk heuristics, URL safety, gas snapshots, ENS resolution, calldata decoding, and wallet portfolio data. Payments are handled per call in USDC on Base via x402, with no signup or API key required.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to run paid safety and data pre-checks over streamable HTTP — Base token risk and pricing, wallet balances and screening, transaction decoding, calldata and EIP-712 signature checks, ENS resolution, DNS/WHOIS, link phishing and security-header audits — with each tool call settled by an x402 USDC micropayment on Base instead of an account or API key. Also offers x402 seller preflight and web content extraction.MIT