x402-stackdetect

StackDetect: paid x402 website technology / tech stack detection (CMS, frameworks, hosting/CDN, analytics, payments, email and DNS providers) + MCP server

Browse source · x402-stackdetect.tar.gz · x402-stackdetect.bundle
commit 277931f · 277931fa5e8f7157470635948c55394080891ab0
Clone: git clone https://agentgate-source.pages.dev/x402-stackdetect/x402-stackdetect.git (branch main, commit 277931fa5e8f7157470635948c55394080891ab0) or curl -O https://agentgate-source.pages.dev/x402-stackdetect/x402-stackdetect.bundle && git clone x402-stackdetect.bundle x402-stackdetect
Home: this repo is hosted here (it was never on GitHub).

StackDetect: website technology / tech stack detection API for AI agents (x402 + MCP)

What is this website built with? StackDetect looks at one page load of a URL (response headers, cookie names, <meta>, script and stylesheet URLs, inline markers) plus the domain's public DNS (MX, NS, SPF and TXT verification records) and returns the CMS and site builder, ecommerce platform, JS framework, web server, CDN and hosting, analytics and ad pixels, live chat, payments, consent tools, and the email provider, email-sending services, DNS host and verified SaaS. Every technology comes with categories, a version when the site exposes one, a confidence score (0-100) and the evidence that matched.

Built for lead enrichment and sales agents, competitor research, integration planning ("is this a Shopify store?"), and agents that need to know how a site works before reading or automating it.

MCP (Claude Desktop, Cursor, Windsurf, any MCP client)

Remote (free preview tier):

{ "mcpServers": { "stackdetect": { "type": "http", "url": "https://api.youraitools.co/stackdetect/mcp" } } }

Local stdio (this package):

{ "mcpServers": { "stackdetect": { "command": "npx", "args": ["-y", "@agentgate-builder/stackdetect"] } } }

Tool: detect_stack(url). Free by default. For full results (versions, confidence, evidence, DNS-based providers), set STACKDETECT_X402_PRIVATE_KEY to a Base wallet key with a little USDC and add the optional peers:

{ "mcpServers": { "stackdetect": { "command": "npx", "args": ["-y", "-p", "@agentgate-builder/stackdetect", "-p", "@x402/fetch", "-p", "@x402/evm", "-p", "viem", "stackdetect"], "env": { "STACKDETECT_X402_PRIVATE_KEY": "0x..." } } } }

The stdio server only pays the StackDetect pay-to address, on Base, at most $0.005 per call.

Docker: docker build -t stackdetect-mcp . && docker run -i --rm stackdetect-mcp

HTTP

# free preview
curl -s "https://api.youraitools.co/stackdetect/v1/preview?url=https://laravel.com"
# paid (any x402 client): GET ?url= or POST {"url": "..."}
curl -i "https://api.youraitools.co/stackdetect/v1/detect?url=shopify.com"     # 402 + PAYMENT-REQUIRED
import { wrapFetchWithPaymentFromConfig } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm';
import { privateKeyToAccount } from 'viem/accounts';
const pay = wrapFetchWithPaymentFromConfig(fetch, { schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(privateKeyToAccount(process.env.BUYER_KEY)) }] });
const r = await (await pay('https://api.youraitools.co/stackdetect/v1/detect?url=acme.com')).json();
console.log(r.categories.cms, r.providers.email, r.providers.hosting);

Response (trimmed):

{ "tier": "full", "final_url": "https://laravel.com/", "http_status": 200, "technology_count": 14,
  "technologies": [{ "name": "Cloudflare", "categories": ["cdn", "waf"], "version": null, "confidence": 100, "evidence": [{ "type": "header", "value": "server: cloudflare" }] },
                   { "name": "Laravel", "categories": ["web-framework"], "version": null, "confidence": 85, "evidence": [{ "type": "cookie", "value": "laravel_session" }] }],
  "categories": { "web-framework": ["Laravel"], "js-framework": ["Vue.js"] },
  "providers": { "email": ["Google Workspace"], "email_delivery": [], "dns": ["Cloudflare DNS"], "hosting": ["Cloudflare"], "verified_saas": [] } }

Routes

Route Price What
GET\|POST /v1/detect?url= $0.003 Full result
GET\|POST /v1/preview?url= free, 10/min/IP Names and categories only
POST /mcp free Remote MCP (Streamable HTTP, stateless)
GET /v1/categories, /v1/stats, /health, /openapi.json, /.well-known/x402 free Discovery and public usage counters

x402 v2 (PAYMENT-SIGNATURE) and v1 (X-PAYMENT). GET, POST and HEAD on the paid route all answer the 402 challenge with the PAYMENT-REQUIRED header. The 402 is answered without any network call.

How it works, and honest limits

Development

npm install && npm test        # offline tests (fake site, fake DoH, fake facilitator)
npx wrangler deploy            # Cloudflare Worker (free plan; usage counters in a SQLite Durable Object, no KV)
node scripts/live-check.mjs    # no-spend live check of the 402s and the preview

MIT licensed. Part of the agentgate-builder trust kit: AgentGate, WebRead, InjectScan, DomainCheck, PayGuard, PkgGuard, StackDetect. Built by an AI builder agent with human oversight.


agentgate-source: code mirror on Cloudflare Pages. All repos