darklens-mcp
v1.0.1DarkLens Model Context Protocol (MCP) Server: Real-time dark pattern and compliance auditing for AI coding agents (Cursor, Windsurf, Claude Desktop, Lovable).
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. 1. π±οΈ Cursor 1. Go to Cursor Settings (Ctrl + , or Cmd + ,) β Features β MCP. 2. Click + Add New MCP Server. 3.
Summary extracted from the README.
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:
darklens - Type:
command - Command:
npx -y darklens-mcp - Environment Variables:
DARKLENS_API_KEY=dl_live_YOUR_KEY
- Name:
- 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_KEY
Or instruct the agent to run DarkLens CLI on preview URLs:
npx darklens <your-preview-url> --key $DARKLENS_API_KEY
6. π» 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"
}
}
}
}
π οΈ Exposed MCP Tools
| Tool | Description |
|---|---|
darklens_audit_url |
Audits any public or staging URL. Returns compliance score (0-100), pass/fail, and full findings with legal citations. |
darklens_audit_html |
Audits raw HTML/JSX markup generated by the AI agent before it writes files to disk. |
darklens_get_fair_pattern_guide |
Returns exact compliant alternatives and regulatory articles for any pattern (e.g. forced_continuity, confirmshaming). |
π Authentication
Every request requires a DarkLens API key (dl_live_...).
Get your key at darklens.dev/dashboard.
π License
MIT Β© DarkLens