{"name":"io.github.yassinemohamedali11/paperloo","title":"Paperloo Compliance Infrastructure","status":"active","version":"1.0.0","protocolVersion":"2025-12-11","transport":"Streamable HTTP (JSON-RPC 2.0)","endpoint":"https://paperloo.vercel.app/api/mcp","capabilities":{"tools":{"listChanged":true,"count":19},"resources":{"subscribe":true,"listChanged":true,"count":5},"prompts":{"listChanged":true,"count":3}},"endpoints":{"rpc":"https://paperloo.vercel.app/api/mcp","alias":"https://paperloo.vercel.app/mcp","manifest":"https://paperloo.vercel.app/server.json","wellKnown":"https://paperloo.vercel.app/.well-known/mcp.json","openapi":"https://paperloo.vercel.app/openapi.json","llms":"https://paperloo.vercel.app/llms.txt","docs":"https://paperloo.vercel.app/docs"},"tools_count":19,"tools":[{"name":"audit_site","title":"Multi-Vector Website Compliance Audit","description":"Executes a live HTTP/HTTPS multi-vector compliance audit against any public website URL. Inspects TLS transport, HTTP security headers (HSTS, CSP, X-Frame-Options, X-Content-Type-Options), Set-Cookie headers, client-side tracking scripts, Consent Management Platform (CMP) and Google Consent Mode v2 default 'denied' enforcement (GDPR Art. 5(3)), footer legal policy links (Privacy, Terms, Cookie Policy, CCPA Do Not Sell), and—when deep_scan is true—WCAG 2.1 AA DOM accessibility metrics and EU AI Act Article 50 chatbot disclosures.\n\nWhen to use vs. related tools: Call 'audit_site' for an overall 0-100 compliance score, letter grade (A+ to F / FAILED), and cross-framework findings. Use 'scan_cookies' when you only need a categorized cookie/tracker inventory without grading; use 'audit_accessibility' when you need grading against WCAG_2.1_AAA or Section_508; use 'audit_ai_transparency' when you only need EU AI Act Art. 50 & GDPR Art. 22 findings.\n\nPreconditions & side effects: Requires a publicly DNS-resolvable HTTP/HTTPS URL; no authentication or prior 'add_site' registration is required. Read-only operation—performs live outbound HTTP GET inspection and never mutates registered sites.\n\nReturns: JSON object containing 'success', 'audit_id', 'target_url', 'deep_scan', 'compliance_score' (0-100), 'compliance_grade', 'status' ('COMPLETED' | 'FAILED'), 'is_https', 'timestamp', structured 'tests' sub-reports, 'findings', 'recommendations', 'cookie_inventory', and 'error' if unreachable or invalid."},{"name":"audit_accessibility","title":"WCAG 2.1 & Section 508 Accessibility Audit","description":"Performs a focused HTML DOM accessibility evaluation on a target URL against WCAG 2.1 AA, WCAG 2.1 AAA, or U.S. Section 508 standards. Inspects missing image 'alt' attributes (SC 1.1.1), HTML5 semantic/ARIA landmarks (SC 1.3.1), programmatic form input labels (SC 3.3.2), document '<title>' presence (SC 2.4.2), and '<html lang>' declaration (SC 3.1.1), applying standard-specific grading thresholds.\n\nWhen to use vs. related tools: Call 'audit_accessibility' when you need granular accessibility counts, standard-specific grading (including WCAG_2.1_AAA or Section_508), and remediation items without privacy/cookie auditing. Call 'audit_site' for combined privacy + security + accessibility scoring.\n\nPreconditions & side effects: Requires a reachable public HTTP(S) URL; no registry siteId or authentication required. Read-only live HTTP inspection with zero state mutation.\n\nReturns: JSON object containing 'success', 'audit_id', 'target_url', 'standard', 'accessibility_score' (0-100), 'wcag_compliance_grade' ('AAA' | 'AA' | 'A' | 'CONFORMANT' | 'NON_COMPLIANT'), itemized 'metrics', 'violations', 'remediation_actions', 'timestamp', and optional 'error'."},{"name":"audit_ai_transparency","title":"EU AI Act Transparency Audit","description":"Evaluates a live website URL for European Union Artificial Intelligence Act (Regulation (EU) 2024/1689) Article 50 transparency compliance and GDPR Article 22 automated decision-making readiness. Scans page HTML for embedded conversational AI assistants (Intercom Fin, Crisp, Chatbase, Voiceflow, Botpress, Tidio Lyro, Zendesk AI), checks for explicit AI/synthetic-content disclosure language, and reports tracked AI crawler policy slots (GPTBot, CCBot, ClaudeBot, Anthropic-ai, Google-Extended).\n\nWhen to use vs. related tools: Call 'audit_ai_transparency' when specifically assessing EU AI Act Article 50 chatbot/synthetic disclosures and statutory mandates. Call 'audit_site' for a full GDPR/CCPA/security/WCAG/AI combined audit.\n\nPreconditions & side effects: Requires a public HTTP(S) URL; no authentication or site registration needed. Read-only live HTTP inspection.\n\nReturns: JSON object containing 'success', 'audit_id', 'target_url', 'ai_act_compliance_status' ('COMPLIANT' | 'NEEDS_DISCLOSURE' | 'HIGH_RISK_REVIEW'), 'regulatory_framework', 'findings', 'statutory_mandates', 'action_items', 'timestamp', and optional 'error'."},{"name":"configure_cookie_banner","title":"Configure Site Cookie Consent Banner","description":"Updates and persists the cookie consent banner UI configuration, Google Consent Mode v2 synchronization, and pre-consent tracker blocking rules for an existing monitored site.\n\nWhen to use vs. related tools: Call 'configure_cookie_banner' first to customize visual theme, placement, copy, accent hex color, and GCM v2 blocking flags on a registered site; afterward, call 'get_cookie_banner_script' (for CMS/web embeds) or 'get_consent_banner_code' (for GCM v2 Basic/Advanced code). Call 'list_sites' or 'add_site' first if you do not have a valid 'siteId'.\n\nPreconditions & side effects: 'siteId' MUST match an existing site ID or registered domain in the workspace registry (no silent fallback to default sites). Mutates the target site's 'cookie_banner' configuration in-memory.\n\nReturns: On success, returns 'success: true', 'siteId', 'site_name', persisted 'banner_configuration', 'preview_url', 'embed_script', and 'message'. On invalid accent color or unknown siteId, returns 'success: false', 'error', and 'available_sites'."},{"name":"get_cookie_banner_script","title":"Get Framework Cookie Banner Embed Script","description":"Generates a ready-to-deploy cookie consent banner embed snippet tailored to a target web framework or CMS ('html', 'react', 'nextjs', 'wordpress', 'webflow', 'shopify') with Google Consent Mode v2 default 'denied' initialization.\n\nWhen to use vs. related tools: Call 'get_cookie_banner_script' when integrating into a CMS (WordPress PHP hook, Webflow head embed, Shopify theme.liquid) or standard React/Next.js/HTML app. Call 'get_consent_banner_code' instead if you need Vue 3 support, explicit selection between 'v2_basic' (blocking) vs 'v2_advanced' (cookieless pings) GCM v2 modes, or consent update event listeners. Call 'configure_cookie_banner' beforehand to customize banner styling.\n\nPreconditions & side effects: 'siteId' must exist in the active registry. Read-only code generation—does not mutate site state.\n\nReturns: JSON object with 'success', 'siteId', 'site_name', 'framework', 'embed_code', 'gcm_default_state', and 'instructions' (or 'success: false' and 'error' if not found)."},{"name":"get_consent_banner_code","title":"Get Google Consent Mode v2 Developer Code","description":"Generates developer-oriented Google Consent Mode v2 banner integration code with configurable 'gtm_mode' ('v2_basic' strict tag-blocking vs 'v2_advanced' cookieless behavioral modeling with 'ads_data_redaction' and 'wait_for_update') and dynamic 'paperloo_consent_update' listener snippets across 'html', 'react', 'nextjs', and 'vue'.\n\nWhen to use vs. related tools: Choose 'get_consent_banner_code' over 'get_cookie_banner_script' when building custom frontend apps (including Vue 3) or when explicitly selecting Basic vs. Advanced Google Consent Mode v2 behavior. Choose 'get_cookie_banner_script' for CMS embeds (WordPress, Webflow, Shopify). Choose 'get_gtm_container_setup' for full Google Tag Manager container '<head>'/'<body>' snippets.\n\nPreconditions & side effects: 'siteId' must match a registered site in the active registry. Read-only operation.\n\nReturns: JSON object containing 'success', 'siteId', 'site_name', 'framework', 'gtm_mode', 'embed_code', 'gcm_default_state', 'consent_update_listener', and 'instructions' (or 'error' on failure)."},{"name":"configure_gtm_integration","title":"Configure Google Tag Manager & Consent Mode v2","description":"Configures and saves a Google Tag Manager (GTM) container binding and initial Google Consent Mode v2 storage signal defaults ('ad_storage', 'analytics_storage', 'ad_user_data', 'ad_personalization') plus 'paperloo_consent_update' dataLayer trigger settings for a registered site.\n\nWhen to use vs. related tools: Call 'configure_gtm_integration' to store a GTM container ID and default consent states on a site; call 'get_gtm_container_setup' afterward to retrieve the rendered '<head>'/'<body>' GTM snippets reflecting those saved defaults.\n\nPreconditions & side effects: 'siteId' must match a registered site, and 'gtm_container_id' must match '^GTM-[A-Z0-9]{4,12}$'. Mutates the site's 'gtm' object in the active registry.\n\nReturns: JSON object with 'success: true', 'siteId', 'site_name', saved 'gtm_configuration', and 'message' (or 'success: false' and 'error')."},{"name":"get_gtm_container_setup","title":"Get Google Tag Manager Installation Snippets","description":"Generates ready-to-install Google Tag Manager '<head>' and '<body>' ('<noscript>') snippets pre-populated with Google Consent Mode v2 default signals and custom dataLayer consent trigger recipes for a registered site.\n\nWhen to use vs. related tools: Call 'get_gtm_container_setup' after 'configure_gtm_integration' (or with an explicit 'gtm_container_id' override) when installing GTM directly. Call 'get_cookie_banner_script' or 'get_consent_banner_code' to embed the Paperloo consent UI banner script itself.\n\nPreconditions & side effects: 'siteId' must exist in the active registry. Uses 'gtm_container_id' override if provided, otherwise reads the container ID and GCM v2 defaults stored on the site. Read-only operation.\n\nReturns: JSON object with 'success', 'siteId', 'gtm_container_id', 'head_snippet', 'body_snippet', 'consent_defaults', and 'consent_triggers' (or 'error' on failure)."},{"name":"scan_cookies","title":"Live Website Cookie & Tracker Inventory Scan","description":"Performs a live HTTP GET scan on a target website URL to inspect 'Set-Cookie' response headers and third-party tracking scripts in the HTML (such as Google Analytics 4, Google Ads, Meta Pixel, TikTok, Hotjar, Clarity, LinkedIn, Stripe, HubSpot, Intercom, Cloudflare), returning a categorized inventory grouped into Necessary, Analytics, Marketing, and Preferences.\n\nWhen to use vs. related tools: Call 'scan_cookies' when you specifically want the categorized cookie and tracker inventory to populate a Cookie Policy or inspect third-party scripts. Call 'audit_site' instead when you also want security header checks, legal link verification, accessibility, AI Act checks, and an overall compliance score.\n\nPreconditions & side effects: Requires a reachable public HTTP(S) URL; no registry siteId or authentication needed. Read-only live HTTP inspection.\n\nReturns: JSON object containing 'success', 'reachable', 'url', 'total_cookies', 'scripts_detected', 'categorized_inventory' (grouped arrays), 'all_cookies', 'cookie_inventory', 'message', and optional 'error'."},{"name":"generate_documents","title":"Generate Statutory Legal Document Suite","description":"Synthesizes a tailored suite of legal compliance documents (Privacy Policy, Terms of Service, Cookie Policy, EULA, Acceptable Use Policy, Disclaimer, Return & Refund Policy, WCAG Accessibility Statement) directly from company metadata, jurisdictions (GDPR, CCPA, EU_AI_ACT), data practices, and sub-processor flags.\n\nWhen to use vs. related tools: Use 'generate_documents' when you already have all company and technical parameters ready to synthesize policies immediately. Use 'get_questionnaire_schema' followed by 'generate_docs_questionnaire' when conducting an interactive user intake flow. Use 'generate_dpa' specifically for a GDPR Article 28 Data Processing Addendum contract between Controller and Processor. Use 'export_documents' afterward to convert saved documents into HTML or JSON.\n\nPreconditions & side effects: Requires 'company_name', 'website_url', and 'contact_email'. If 'siteId' is omitted, operates in 'isolated_ephemeral_client' mode with a temporary ID and zero registry side effects. If 'siteId' is provided, it MUST match a registered site—on match, persists the generated documents onto that site and updates its compliance score (>= 95) and grade ('A+'); if unknown, returns an error.\n\nReturns: JSON object with 'success', 'siteId', 'company_name', 'tenant_mode', 'documents_generated' summaries, full 'documents' Markdown array, and 'message' (or 'error')."},{"name":"generate_docs_questionnaire","title":"Synthesize Legal Docs from Questionnaire Answers","description":"Synthesizes a tailored statutory legal document suite (Privacy Policy, Terms of Service, Cookie Policy, EULA, Acceptable Use Policy, Disclaimer, Return Policy, Accessibility Statement) from answers gathered against the standardized 'get_questionnaire_schema' intake form.\n\nWhen to use vs. related tools: Pair 'get_questionnaire_schema' -> 'generate_docs_questionnaire' in conversational intake workflows where you collect structured business, tracker, minor-protection, and retention answers from a user before drafting documents. For direct programmatic generation without a questionnaire UI step, 'generate_documents' accepts the exact same payload.\n\nPreconditions & side effects: Requires 'company_name', 'website_url', and 'contact_email'. If 'siteId' is omitted, creates an isolated ephemeral tenant output with no registry mutation. If 'siteId' is explicitly supplied, it must match a registered site and will persist 'documents' and upgrade the site's compliance grade to 'A+'.\n\nReturns: JSON object with 'success', 'siteId', 'company_name', 'tenant_mode', 'documents_generated', full 'documents' array, and 'message' (or 'error')."},{"name":"generate_dpa","title":"Generate GDPR Article 28 DPA Contract","description":"Generates a standalone GDPR Article 28 Data Processing Addendum (DPA) Markdown contract between a named Data Controller (client) and Data Processor (vendor/agency), incorporating Art. 28(3) processor obligations, Art. 32 technical security controls, governing law, and authorized sub-processors.\n\nWhen to use vs. related tools: Call 'generate_dpa' specifically for B2B vendor-client Data Processing Agreements (DPAs). Do NOT use 'generate_documents' for DPAs, as 'generate_documents' handles public website policies (Privacy, Terms, Cookies, EULA, AUP, Disclaimer, Return, Accessibility).\n\nPreconditions & side effects: Requires non-empty 'controller_name' and 'processor_name'. Stateless and read-only—does not require or mutate any registered site.\n\nReturns: JSON object with 'success', 'title', 'controller_name', 'processor_name', 'governing_law', 'sub_processors', 'markdown', 'word_count', and 'version' (or 'error')."},{"name":"verify_compliance","title":"Issue Cryptographic Compliance Verification & Trust Badge","description":"Evaluates a registered site's current compliance posture (score, grade, and active consent banner status) and issues a timestamped verification attestation hash, compliance status ('VERIFIED_COMPLIANT' | 'CONDITIONALLY_COMPLIANT' | 'NON_COMPLIANT'), inline SVG trust badge markup, and HTML embed snippet.\n\nWhen to use vs. related tools: Call 'verify_compliance' when generating a trust seal or verifying status of a registered property already managed in Paperloo. Call 'audit_site' instead when you need to crawl a live external URL over HTTP.\n\nPreconditions & side effects: 'siteId' MUST match an existing site in the active registry (no fallback to default site). Read-only attestation generation.\n\nReturns: JSON object with 'success', 'siteId', 'site_name', 'compliance_score', 'compliance_grade', 'verification_status', 'verification_hash', 'verified_at', 'standards', 'badge_svg', and 'badge_embed' (or 'error' + 'available_sites')."},{"name":"list_sites","title":"List Monitored Websites","description":"Lists monitored website properties in the Paperloo compliance registry with status filtering ('all', 'active', 'compliant', 'needs_audit') and offset/limit pagination, returning summary compliance grades, banner readiness, GTM state, and document counts.\n\nWhen to use vs. related tools: Call 'list_sites' to discover valid 'siteId' identifiers before calling site-specific tools ('get_site', 'configure_cookie_banner', 'configure_gtm_integration', 'export_documents', 'delete_site'). Call 'get_site' afterward if you need a site's full nested cookie_banner, gtm, and document Markdown contents.\n\nPreconditions & side effects: No required parameters. Read-only registry query.\n\nReturns: JSON object with 'success', 'total_count', 'returned_count', 'offset', 'limit', 'filter_applied', and 'sites' array (or 'error' + 'supported_filters' if invalid filter/pagination arguments are supplied)."},{"name":"get_site","title":"Get Full Monitored Site Details","description":"Retrieves the complete stored profile for a single monitored website—including cookie banner configuration, GTM Consent Mode v2 settings, attached legal policy Markdown documents, and ready-to-use HTML/GCM v2 embed snippets.\n\nWhen to use vs. related tools: Call 'get_site' when inspecting a single known property in full detail. Call 'list_sites' to browse or filter across all properties.\n\nPreconditions & side effects: 'siteId' must match an existing site ID or exact URL/hostname in the registry. Read-only lookup.\n\nReturns: JSON object containing 'success: true', full 'site' object, and 'embed_code' (or 'success: false', 'error', 'help', and 'available_sites' when not found)."},{"name":"add_site","title":"Register New Monitored Website","description":"Creates and registers a new website property in the Paperloo compliance registry, initializing default GDPR/CCPA jurisdictions, default Google Consent Mode v2 denied banner settings, a pending GTM slot, an initial compliance grade (A-, 91/100), a live API key, and an embed script tag.\n\nWhen to use vs. related tools: Call 'add_site' before configuring persistent banners ('configure_cookie_banner'), GTM ('configure_gtm_integration'), or attaching documents to a siteId. Do not call 'add_site' if you only want a one-off audit ('audit_site'), cookie scan ('scan_cookies'), or ephemeral policy generation ('generate_documents' without 'siteId').\n\nPreconditions & side effects: Requires non-empty 'name' and valid HTTP(S) 'url'. Mutates the active site registry by prepending the newly created site record.\n\nReturns: JSON object containing 'success: true', created 'site' object, generated 'apiKey', 'embed_script', and 'message' (or 'success: false' and 'error' on invalid input)."},{"name":"delete_site","title":"Delete Monitored Website","description":"Permanently removes a monitored website property and all of its stored banner configurations, GTM bindings, audit history, and cached legal documents from the active Paperloo registry.\n\nWhen to use vs. related tools: Call 'delete_site' only when a site should be permanently decommissioned from monitoring. Use 'list_sites' or 'get_site' first to confirm the exact 'siteId'.\n\nPreconditions & side effects: 'siteId' must match an existing site ID or exact URL/hostname in the registry. Destructive mutation—immediately deletes the matching site from 'activeSites'.\n\nReturns: JSON object with 'success: true', deleted 'siteId', 'name', 'url', 'deleted_at', and 'message' (or 'success: false', 'error', and 'available_sites' if not found)."},{"name":"get_questionnaire_schema","title":"Get Legal Intake Questionnaire Schema","description":"Returns the structured compliance intake questionnaire schema (categorized sections, field keys, data types, labels, defaults, and option lists) scoped to the requested document category.\n\nWhen to use vs. related tools: Call 'get_questionnaire_schema' BEFORE 'generate_docs_questionnaire' when building dynamic intake forms or interviewing a user step-by-step to collect required legal facts. Call 'generate_documents' directly if you already hold the fields without needing question metadata.\n\nPreconditions & side effects: No required arguments; 'document_type' defaults to 'all'. Read-only metadata lookup.\n\nReturns: JSON object containing 'success: true', 'version', 'document_type', and scoped 'categories' array of question definitions (or 'success: false' and 'error' for unsupported document_type)."},{"name":"export_documents","title":"Export Site Legal Documents","description":"Exports all legal compliance documents currently attached to a registered website in clean Markdown ('markdown'), semantic HTML ('html'), or structured JSON ('json') format.\n\nWhen to use vs. related tools: Call 'export_documents' AFTER generating and attaching documents to a siteId via 'generate_documents' or 'generate_docs_questionnaire' (or for a pre-seeded site like 'site_paperloo_sandbox'). Note: calling 'export_documents' on a site with zero attached documents returns an empty 'documents' array—generate documents with that 'siteId' first.\n\nPreconditions & side effects: 'siteId' must exist in the active registry. Read-only transformation—does not mutate stored documents.\n\nReturns: JSON object containing 'success: true', 'siteId', 'format', 'total_documents', 'documents' (each with 'type', 'title', 'version', 'word_count', 'content'), and 'message' (or 'error' + 'available_sites')."}]}