r/ClaudeCode • u/No-Negotiation-8359 • 4h 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.
•
u/AutoModerator 4h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/pretendingtobebroke 4h ago
Why not just ask it to ensure compliance with applicable legislation and update your privacy policy accordingly?
1
u/EnvironmentalTreat41 1h ago
Thanks Claude