Announcing an open-source MCP server for data privacy law
Published 8 min readBy Saeed Yari

On this page
I've released version 0.1 of mcp-server-privacy-compliance-assistant, an open-source MCP server that gives your AI assistant the data privacy rules of 70 jurisdictions. Ask it what a law requires, what a consent banner must do, whether personal data may move to another country, or what the strictest common bar is when you launch in several places at once. It answers with the rule of the jurisdiction that applies and links the law it came from. It runs locally and offline, and it's licensed under Apache-2.0.
Not legal advice. It is an independent project, not affiliated with any regulator. Every result carries
"advisory_only": true: it is operational guidance for engineering and product teams, and counsel decides what you do.
Ask an AI assistant about privacy law and you usually get GDPR, whatever the country. GDPR is a good default, but it's the wrong answer for a California ad pixel, a Brazilian data subject request or a database moving out of China. The numbers are the bigger problem. Breach windows, response deadlines, age thresholds and fines come from the model's memory, and privacy law changes every year. Building this registry turned up changes that a model trained a year ago would miss:
- California set a fixed deadline for breach notices: affected residents must be told within 30 calendar days, from 1 January 2026.
- Denmark raised its digital age of consent from 13 to 15 in 2024. Many trackers still say 13.
- The EU and Brazil recognized each other as adequate for data transfers in January 2026.
- India's DPDP Rules were notified in November 2025, but most of the duties they set apply only from 13 May 2027.
It's the same problem I solved for security standards with the PCI DSS and OWASP ASVS servers: give the assistant a source to cite instead of a memory to trust.
The server has 4 read-only tools and one resource:
| Tool | A question it answers |
|---|---|
get_jurisdiction_compliance |
"What do we owe users in Brazil if we're breached?" |
get_consent_requirements |
"What does our cookie banner need in France and California?" |
evaluate_cross_border_transfer |
"Can we host UK customer data in the US?" |
compare_jurisdictions |
"We launch in the UK, EU, California and Brazil: what's the strictest bar?" |
The resource, privacy://registry/frameworks, is the index of every jurisdiction with its law, regulator, effective date, source and last-checked date. As with my other servers, you don't name the tools. You ask in plain language, and the assistant picks them from their descriptions.

get_jurisdiction_compliance returns one jurisdiction's rules: the law and regulator, the consent model, whether every processing needs a lawful basis, the deadline to answer a data subject request, the breach notification window, when a DPO is mandatory, the notice contents and UI controls the law requires, the children's age threshold, the maximum penalty, the transfer rules, and the sources. Pass sensitive or children as the data category to get those rules too.
Codes follow ISO 3166: GB, DE, BR for countries and US-CA, CA-QC for states and provinces. CA is Canada; California is US-CA. The server knows that some places need more than a country:
USasks for a state. There is no comprehensive federal privacy law, so the server returns the 25 states it covers and the federal sectoral rules (HIPAA, COPPA, GLBA), and the assistant asks which state applies.- Sub-national laws win. Quebec's Law 25 has its own record, and so do the DIFC and ADGM free zones in the UAE. A state or province without a record gets its country's rules, and the answer says so.
- EU member states inherit GDPR and override what national law changes: the regulator, the age of digital consent, Germany's DPO threshold, the French and Italian rules for analytics cookies.
- Anything unmapped falls back to GDPR as the high-water mark, flagged with
fallback_applied, so the assistant says the answer isn't local law.
get_consent_requirements takes a jurisdiction and a tracking type (essential, analytics, advertising or ai_training) and answers three questions a banner has to get right: is consent needed before it starts, must there be a visible opt-out link, and must a Global Privacy Control signal be honored. For an ad pixel, California needs no consent but a "Do Not Sell or Share" link and GPC support, while Germany needs consent first. UK analytics cookies changed in 2026: the Data (Use and Access) Act 2025 lets first-party statistics run without consent, as long as people get clear information and a simple way to object.
evaluate_cross_border_transfer judges a transfer by the law of the place the data leaves and returns one of four statuses:
| Status | Meaning | Example |
|---|---|---|
adequate |
Data may go without an extra mechanism | France to Germany |
conditional |
Adequate only if a condition holds | UK to the US, if the recipient is certified under the Data Privacy Framework |
restricted |
Needs a mechanism, which the result names | France to India: EU Standard Contractual Clauses |
prohibited |
The law bans it | Bulk sensitive data from the US to a country of concern |
Each answer has a risk level, the mechanisms in order of preference and the origin's notes on how its transfer rules work. Some origins need more than a contract: data leaving China goes through the CAC's security assessment, standard contract or certification, so those transfers come back as high risk. Here is the UK-to-US answer, shortened:
{
"advisory_only": true,
"adequacy_status": "conditional",
"risk_level": "low",
"reason": "Only to US organisations certified under the DPF that have opted into the UK Extension; otherwise IDTA or UK Addendum plus a transfer risk assessment.",
"required_mechanisms": [
"UK Extension to the EU-US Data Privacy Framework (UK-US data bridge)",
"International Data Transfer Agreement (IDTA)",
"UK Addendum to the EU Standard Contractual Clauses (Decision 2021/914)"
]
}
compare_jurisdictions puts 2 to 30 jurisdictions side by side and returns the strictest overlapping value for each field, with the jurisdictions that set it. For a launch in the UK, the EU, California and Brazil, that's opt-in consent (from the UK, the EU and Brazil), 15 days to answer an access request (from Brazil), a 72-hour breach window, a children's age threshold of 16 and GPC support (from California). Build to that bar and you meet all four for those fields. The result also lists the fields that differ, so you can see where a single global design won't do.
From a registry that ships with the server: one JSON record per law, 70 in total. Every record has the law's effective date, a link to its official text, the sources used to check it and the date it was last checked. The registry itself has a schema version and an update date, and the test suite (266 tests in CI) validates every record: required fields, allowed values, https sources, dates, and every country or group a transfer rule refers to.
I built the registry the way I build code now: AI agents did the first pass, and I checked the result. Research agents compiled each group of jurisdictions from legislation portals and regulator sites, and I reviewed the values, the transfer logic and the edge cases before they went in. Where a government portal blocked automated access, or a point could only be confirmed from a law firm's summary rather than the official text, the data file says so in its open questions: 128 of them at release. They are the first thing to check before you rely on a value, and the best place to contribute.
They cover different layers of the same product review. The ASVS and PCI DSS servers check code and configuration against security standards. This one covers the law that applies to the personal data the code handles. It doesn't share requirement IDs with them the way they share IDs with each other, but the assistant in your client can use all three in one conversation: secure the sign-in flow against ASVS, keep card data in PCI DSS scope, and check that the analytics and the hosting region are allowed where your users live. The repository's examples/ folder has a config that connects all three.
It sees less than the other two: no code, no configuration, only jurisdiction codes, a data category and a tracking type.
- Read-only and offline. The server writes no files, makes no network calls and starts no subprocesses, and a test fails if its code imports networking or subprocess modules or opens a file for writing.
- Validated input. Every parameter has a length limit, and a code must match the ISO format before any lookup runs.
- Advisory on every result. Every tool result and the registry index carry the
advisory_onlyflag and the disclaimer. - An audit log without content. Set
PRIVACY_MCP_AUDIT_LOG=1to log one line per tool call (tool, status, latency), never the inputs or results.
You need uv, which installs Python 3.11 or newer if you don't have it. In Claude Code, one command adds the server:
claude mcp add privacy -- uvx mcp-server-privacy-compliance-assistant
For Claude Desktop, Cursor and other clients, add it to the client's MCP config:
{
"mcpServers": {
"privacy": {
"command": "uvx",
"args": ["mcp-server-privacy-compliance-assistant"]
}
}
}
VS Code uses "servers" instead of "mcpServers", and the repository's examples/ folder has ready-made files for each client. There's also a multi-architecture Docker image, ghcr.io/itssaeedyari/mcp-server-privacy-compliance-assistant, that runs with no network and a read-only filesystem. To call the tools by hand, run npx @modelcontextprotocol/inspector uvx mcp-server-privacy-compliance-assistant. The README lists every jurisdiction with its deadlines and status.
- Not legal advice. It tells you which rules are likely to apply and where they are written. Whether they apply to your processing, and how, is a question for counsel.
- Not complete. It covers 70 jurisdictions and the main privacy law of each. Apart from a summary of the US federal rules (HIPAA, COPPA, GLBA), sector rules for health, finance and telecoms are outside it, as are employee data and many local details, and US states without a comprehensive privacy law get only the federal baseline and a reminder that their breach statute still applies.
- Not a snapshot that stays true. Each value is correct as of its
last_verifieddate. Laws keep changing, which is why every record carries its date and sources.
Contributions are welcome, and corrections most of all. The repository's registry correction form asks for the jurisdiction, the field, the right value and an official source, and CONTRIBUTING.md explains the schema. If the server saves you a search through a statute, a star on GitHub helps others find it.
FAQ
Is this legal advice?
No. Every tool result carries advisory_only: true and a disclaimer that tells the assistant to say so. The server helps engineers and product teams see which rules apply and where to look; counsel decides what you do.
How current is the data?
The registry is dated (last_updated) and so is every record (last_verified), and each record links the official text of its law. Where a portal blocked automated access or a point could only be confirmed from secondary sources, the data file lists it as an open question. Corrections with an official source go through the repository's registry correction form.
What happens with a country that isn't in the registry?
The server answers with the EU GDPR baseline as the high-water mark and flags it with fallback_applied, so the assistant says the answer is not local law. A US state or a Canadian province without its own record gets its country's rules instead, with a note.
Does the server see my data?
No. Its inputs are jurisdiction codes, a data category and a tracking type. It makes no network calls, writes no files and starts no processes.
Why is the version 0.1?
It's experimental. Field names may still change once it has been used in real clients, and the 0.x version number says so.
References
- mcp-server-privacy-compliance-assistant · GitHub
- Release v0.1.0 · GitHub
- Release v0.1.1 · GitHub
- mcp-server-privacy-compliance-assistant · PyPI
- Regulation (EU) 2016/679 (General Data Protection Regulation) · EUR-Lex
- California updates data breach notification timeline requirements · Hunton Andrews Kurth
- Letter on the digital age of consent in Denmark (May 2024) · Datatilsynet
- International data transfers · ANPD
- Digital Personal Data Protection Rules, 2025: explainer · Press Information Bureau, Government of India
- Model Context Protocol · Model Context Protocol
- mcp-server-asvs-security-assistant · GitHub
- mcp-server-pci-dss-compliance-assistant · GitHub