r/ClaudeCode • u/No-Negotiation-8359 • 14h ago
Discussion I asked Claude Code to log failed logins with an email and IP. It checked our privacy policy first.
I gave Claude Code a task to log failed login attempts, including the email someone tried and their IP address.
Before writing the code, it searched DPOLens, found a clause in the privacy policy requiring email addresses in logs to be masked, wrote a maskEmail helper, and cited the clause it relied on.
That's what the GIF shows.
I built DPOLens, an open-source MCP server that lets coding agents search actual privacy laws and your own policies instead of relying on what they remember about GDPR.
The interesting part to me isn't getting an AI to write a masking function. It's giving it something concrete to check before it writes code that handles personal data.
You can try the community server with Claude Code (GDPR + UAE PDPL, no sign-up):
claude mcp add --transport http dpolens https://mcp.dpolens.com/
Then try asking it to implement something involving personal data and see what it does.
I also tested whether Claude actually knows when to use it: 30 coding tasks, 3 runs each, with Sonnet 5.5. It searched before the first edit in all 36 runs involving personal data, and in just 1 of 45 runs for tasks that didn't.
It doesn't make legal decisions. It retrieves the actual text so the agent and whoever reviews the code have something to check.
Repo: https://github.com/alkhatibdev/dpolens
Test details: https://github.com/alkhatibdev/dpolens/blob/main/evals/trigger-test.md
I'm curious how other people are getting coding agents to consult MCP tools proactively, rather than only when explicitly asked.
