acuityscan_privacy
Audit website for privacy compliance: detect trackers, cookie consent issues, pre-consent violations, and check for required policies. Prepare for GDPR/CCPA reviews.
Instructions
Privacy + cookie audit — 28+ tracker detection, cookie consent banner detection, pre-consent tracking violations, privacy policy + CCPA 'Do Not Sell' link presence, Google Consent Mode v2 detection, mixed-content scans. Use for GDPR/CCPA prep or privacy reviews.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain to scan, e.g. 'example.com'. Don't include protocol or path. |
Implementation Reference
- src/index.ts:148-225 (handler)The generic CallToolRequestSchema handler — it looks up the tool name in ENDPOINT_FOR_TOOL and makes the REST call. For acuityscan_privacy, it POSTs to /api/v1/tools/privacy with the domain argument. There is no separate handler function; the common handler dispatches based on the endpoint mapping.
server.setRequestHandler(CallToolRequestSchema, async (req) => { const { name, arguments: args } = req.params; const endpoint = ENDPOINT_FOR_TOOL[name]; if (!endpoint) { return { isError: true, content: [{ type: "text", text: `Unknown tool: ${name}` }], }; } const domain = typeof args?.domain === "string" ? args.domain.trim() : ""; if (!domain) { return { isError: true, content: [{ type: "text", text: 'Missing required argument: "domain".' }], }; } // Performance + accessibility have long natural runtimes — call needs // a generous timeout. Other endpoints finish in well under 60s. const heavyTools = new Set(["acuityscan_performance", "acuityscan_accessibility", "acuityscan_full_scan"]); const timeoutMs = heavyTools.has(name) ? 300_000 : 60_000; try { const url = endpoint.method === "GET" ? `${API_BASE}${endpoint.path}?domain=${encodeURIComponent(domain)}` : `${API_BASE}${endpoint.path}`; const res = await fetch(url, { method: endpoint.method, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", "User-Agent": `acuityscan-mcp/0.1.0`, }, body: endpoint.method === "POST" ? JSON.stringify({ domain }) : undefined, signal: AbortSignal.timeout(timeoutMs), }); const text = await res.text(); let json: unknown; try { json = JSON.parse(text); } catch { json = { raw: text }; } if (!res.ok) { const err = json as { error?: string; code?: string }; return { isError: true, content: [ { type: "text", text: `AcuityScan API error (${res.status} ${err?.code ?? "unknown"}): ${err?.error ?? text}`, }, ], }; } return { content: [{ type: "text", text: JSON.stringify(json, null, 2) }], }; } catch (err) { const msg = err instanceof Error ? err.name === "TimeoutError" ? `Scan timed out after ${timeoutMs / 1000}s.` : err.message : String(err); return { isError: true, content: [{ type: "text", text: `Request failed: ${msg}` }], }; } }); - src/index.ts:108-113 (schema)Tool definition (schema) for acuityscan_privacy — uses the shared DOMAIN_SCHEMA with a single required 'domain' string input.
{ name: "acuityscan_privacy", description: "Privacy + cookie audit — 28+ tracker detection, cookie consent banner detection, pre-consent tracking violations, privacy policy + CCPA 'Do Not Sell' link presence, Google Consent Mode v2 detection, mixed-content scans. Use for GDPR/CCPA prep or privacy reviews.", inputSchema: DOMAIN_SCHEMA, }, - src/index.ts:59-120 (registration)TOOLS array registers all tools including acuityscan_privacy (line 109). The ListToolsRequestSchema handler (line 146) returns this array to advertise the tool.
const TOOLS: Tool[] = [ { name: "acuityscan_full_scan", description: "Run a complete AcuityScan Site+ Scan — 350+ checks across email deliverability, DNS, SSL/threat, performance, SEO, accessibility, privacy, and mobile. Synchronous; takes 30s–5min depending on the domain. Use this when the user wants 'a full audit' or 'everything about this site'.", inputSchema: DOMAIN_SCHEMA, }, { name: "acuityscan_latest_scan", description: "Fetch your most recent saved scan for a domain without re-running it. Use this first if the user asks 'how did my last scan go?' or wants results from a prior audit. Returns 404 if no scan exists yet — fall through to acuityscan_full_scan in that case.", inputSchema: DOMAIN_SCHEMA, }, { name: "acuityscan_email", description: "Email deliverability deep check — SPF, DKIM (16 selectors), DMARC, MX, BIMI, MTA-STS, TLSRPT, reverse DNS, 77 RBL blacklists, and Google/Yahoo bulk-sender compliance. Use when the user asks about email auth, deliverability, blacklists, or 'why aren't my emails getting through'.", inputSchema: DOMAIN_SCHEMA, }, { name: "acuityscan_dns", description: "DNS health — A/AAAA/MX/TXT/NS/SOA/CAA/DS records, DNSSEC validation, TTL analysis, nameserver redundancy, propagation across 20 global resolvers. Use for DNS troubleshooting, propagation checks, or DNSSEC questions.", inputSchema: DOMAIN_SCHEMA, }, { name: "acuityscan_ssl", description: "SSL/TLS + security audit — certificate chain + expiry + SANs, TLS protocol versions, cipher suite negotiation, Google Safe Browsing, security headers (HSTS, CSP, XFO, etc.), HSTS preload status, exposed sensitive files. Use for SSL questions, security headers, or 'is this site safe to visit'.", inputSchema: DOMAIN_SCHEMA, }, { name: "acuityscan_performance", description: "Performance audit — real Google PageSpeed Insights (Lighthouse) at desktop AND mobile viewports, Core Web Vitals (LCP, CLS, INP, FCP, TBT, TTFB), compression, CDN detection, 60+ tech-stack detections. Heavy — can take 2–4 minutes on slow sites. Use for speed/Lighthouse/Core Web Vitals questions.", inputSchema: DOMAIN_SCHEMA, }, { name: "acuityscan_seo", description: "Technical SEO audit — title + meta description, heading hierarchy, canonical URL, Open Graph + Twitter cards, robots.txt, sitemap.xml, schema.org / JSON-LD validation, viewport meta, alt-text coverage, internal link count, language attribute, www/non-www consistency. Use for SEO troubleshooting or pre-publish audits.", inputSchema: DOMAIN_SCHEMA, }, { name: "acuityscan_accessibility", description: "WCAG 2.1 AA accessibility audit — full axe-core run at desktop (1280×800) and mobile (375×812) viewports, merged + deduped, plus 38+ custom HTML checks. Returns severity-ranked violations with selectors. Use for accessibility audits, ADA compliance questions, or WCAG conformance.", inputSchema: DOMAIN_SCHEMA, }, { name: "acuityscan_privacy", description: "Privacy + cookie audit — 28+ tracker detection, cookie consent banner detection, pre-consent tracking violations, privacy policy + CCPA 'Do Not Sell' link presence, Google Consent Mode v2 detection, mixed-content scans. Use for GDPR/CCPA prep or privacy reviews.", inputSchema: DOMAIN_SCHEMA, }, { name: "acuityscan_mobile", description: "Mobile + UX audit — viewport meta, zoom-disabled detection, tap target sizing heuristics, form input type checks (email/tel keyboards), font-size iOS zoom bug, PWA features (touch icon, manifest, theme-color), intrusive interstitials, responsive images, table wrappers, horizontal overflow. Use for mobile UX reviews.", inputSchema: DOMAIN_SCHEMA, }, ]; - src/index.ts:122-135 (registration)ENDPOINT_FOR_TOOL mapping — maps acuityscan_privacy to POST /api/v1/tools/privacy, used by the CallToolRequestSchema handler to route the request.
// Map tool name → REST endpoint path. acuityscan_latest_scan is the // only GET; everything else is POST { domain }. const ENDPOINT_FOR_TOOL: Record<string, { method: "GET" | "POST"; path: string }> = { acuityscan_full_scan: { method: "POST", path: "/api/v1/scan" }, acuityscan_latest_scan: { method: "GET", path: "/api/v1/scan/latest" }, acuityscan_email: { method: "POST", path: "/api/v1/tools/email" }, acuityscan_dns: { method: "POST", path: "/api/v1/tools/dns" }, acuityscan_ssl: { method: "POST", path: "/api/v1/tools/ssl" }, acuityscan_performance: { method: "POST", path: "/api/v1/tools/performance" }, acuityscan_seo: { method: "POST", path: "/api/v1/tools/seo" }, acuityscan_accessibility: { method: "POST", path: "/api/v1/tools/accessibility" }, acuityscan_privacy: { method: "POST", path: "/api/v1/tools/privacy" }, acuityscan_mobile: { method: "POST", path: "/api/v1/tools/mobile" }, };