DarkLens Compliance & Dark Pattern Auditor
Allows Windsurf (Codeium) agents to audit staging URLs and AI-generated UI markup for dark patterns and fix non-compliant components before code is committed.
Allows Antigravity (Google/DeepMind) agents to run DarkLens audits on staging URLs and generated HTML/JSX and get compliant alternatives for flagged patterns.
DarkLens MCP Server π€π
Real-time deceptive design and dark pattern compliance auditor for AI coding agents.
DarkLens MCP connects Cursor, Windsurf, Claude Desktop, Antigravity, Lovable, v0, and Cline directly to the DarkLens compliance auditing engine. Your AI coding agent can automatically audit staging URLs, check newly generated JSX/HTML components for deceptive patterns (GDPR, FTC Act Sec. 5, CCPA, EU DSA), and fix non-compliant UI before code is committed.
β‘ Quickstart Configuration by Coding Agent
1. π±οΈ Cursor
Go to Cursor Settings (
Ctrl + ,orCmd + ,) β Features β MCP.Click + Add New MCP Server.
Fill in:
Name:
darklensType:
commandCommand:
npx -y darklens-mcpEnvironment Variables:
DARKLENS_API_KEY=dl_live_YOUR_KEY
In Cursor Chat or Composer, prompt:
"@darklens audit my checkout page and fix any illegal dark patterns."
2. π Windsurf (Codeium)
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"darklens": {
"command": "npx",
"args": ["-y", "darklens-mcp"],
"env": {
"DARKLENS_API_KEY": "dl_live_YOUR_KEY"
}
}
}
}3. π§ Claude Desktop / Claude Code (Anthropic)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"darklens": {
"command": "npx",
"args": ["-y", "darklens-mcp"],
"env": {
"DARKLENS_API_KEY": "dl_live_YOUR_KEY"
}
}
}
}4. π Antigravity (Google / DeepMind)
Add to your Antigravity MCP settings or call via native MCP config:
{
"mcpServers": {
"darklens": {
"command": "npx",
"args": ["-y", "darklens-mcp"],
"env": {
"DARKLENS_API_KEY": "dl_live_YOUR_KEY"
}
}
}
}5. β€οΈ Lovable & v0 / Bolt.new
In Lovable, Bolt.new, or v0 terminal or agent custom tool integrations, execute:
npx -y darklens-mcp --key dl_live_YOUR_KEYOr instruct the agent to run DarkLens CLI on preview URLs:
npx darklens <your-preview-url> --key $DARKLENS_API_KEY6. π» VS Code (Cline / Roo Code)
Open the Cline / Roo Code sidebar tab.
Click the MCP icon β Configure MCP Servers.
Add:
{
"mcpServers": {
"darklens": {
"command": "npx",
"args": ["-y", "darklens-mcp"],
"env": {
"DARKLENS_API_KEY": "dl_live_YOUR_KEY"
}
}
}
}Related MCP server: pageguard-mcp
π οΈ Exposed MCP Tools
Tool | Description |
| Audits any public or staging URL. Returns compliance score (0-100), pass/fail, and full findings with legal citations. |
| Audits raw HTML/JSX markup generated by the AI agent before it writes files to disk. |
| Returns exact compliant alternatives and regulatory articles for any pattern (e.g. |
π Authentication
Every request requires a DarkLens API key (dl_live_...).
Get your key at darklens.dev/dashboard.
π License
MIT Β© DarkLens
Available Tools
3 toolsdarklens_audit_htmlA
Audit raw HTML, JSX, or component markup for dark patterns (pre-checked auto-renewal checkboxes, confirmshaming guilt copy, fake countdown timers, hidden fees, missing reject buttons) before committing to production.
Inputs: rawHtml (required), url, failOn, threshold.
darklens_audit_urlA
Audit any staging or live URL for deceptive dark patterns, compliance risks (FTC, GDPR, CCPA, EU DSA), and sneaky checkout traps. Returns compliance score (0-100), pass/fail, and detailed findings with remediation fixes.
Inputs: url (required), failOn, threshold.
darklens_get_fair_pattern_guideA
Retrieve regulatory compliance rules, legal citations (FTC Act Sec. 5, GDPR Art. 25, EU DSA Art. 25, CCPA), and compliant UI/UX alternatives for specific deceptive design categories.
Inputs: patternCategory.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 3 tools
The three tools are cleanly separated by input type and purpose: auditing a live URL, auditing raw markup, and retrieving reference guidance. An agent can pick the right tool from the target artifact alone, with no overlap between them.
All names use a uniform darklens_ prefix plus consistent verb_noun structure (audit_url, audit_html, get_fair_pattern_guide). The convention is predictable and the intent is readable from the name.
Three tools map neatly to the domain's core actions (live audit, pre-commit audit, reference lookup), so nothing feels padded. It is slightly thinβno batch, history, or export toolsβbut the scope is deliberately focused rather than incomplete by accident.
The audit lifecycle is covered from both a live-URL and a pre-production markup angle, plus a knowledge lookup for remediation, which suits the stated purpose well. Minor gaps exist around saving/comparing past audits or exporting reports, but agents can work around them by re-running audits.
Related MCP Connectors
Automated website compliance infrastructure and GDPR/CCPA auditing.
Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.
Lets coding agents check their own code for leaked secrets, risky dependencies and AI-code mistakes
Open-source licence risk checks for AI coding agents and dependency trees.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThe only Multi-LLM Compliance Engine (GPT-4o + Claude + DeepSeek). Auto-fix GDPR/LGPD risks and more 15 frameworks. code.guard.eu3 npm1MIT

pageguard-mcpofficial
AlicenseAqualityDmaintenanceScan any project or website for privacy compliance issues directly in your AI coding tool. Detects tracking tech, cookies, and third-party data collection. Works in Claude Code, Cursor, and Windsurf.354 npm1MIT- AlicenseAqualityDmaintenanceCompliance and guardrails infrastructure for AI agents, enabling safe operations within regulatory boundaries like GDPR and EU AI Act.641 PyPIMIT
- FlicenseBqualityDmaintenanceEnables AI agents to detect, classify, explain, and ethically redesign dark patterns in websites and UI flows.77-