@ansvar/eu-regulations-mcp 0.4.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -413
- package/data/regulations.db +0 -0
- package/data/seed/dora-its-incident-forms.json +109 -0
- package/data/seed/dora-its-register-templates.json +111 -0
- package/data/seed/dora-rts-critical-provider-designation.json +82 -0
- package/data/seed/dora-rts-ict-risk.json +388 -0
- package/data/seed/dora-rts-ict-services-policy.json +123 -0
- package/data/seed/dora-rts-incident-classification.json +166 -0
- package/data/seed/dora-rts-incident-reporting.json +86 -0
- package/data/seed/dora-rts-oversight-fees.json +86 -0
- package/data/seed/dora-rts-oversight-harmonization.json +92 -0
- package/data/seed/dora-rts-tlpt.json +307 -0
- package/data/seed/eidas2.json +210 -14
- package/data/seed/eprivacy.json +203 -2
- package/data/seed/evidence/ai-act-evidence-complete.json +332 -0
- package/data/seed/evidence/dora-evidence-complete.json +223 -0
- package/data/seed/evidence/dora-evidence.json +335 -0
- package/data/seed/evidence/gdpr-evidence-complete.json +354 -0
- package/data/seed/evidence/nis2-evidence-complete.json +310 -0
- package/data/seed/mappings/iso27001-eidas2.json +21 -29
- package/data/seed/mappings/nist-csf-eidas2.json +28 -28
- package/dist/index.js +0 -0
- package/dist/tools/applicability.d.ts +20 -0
- package/dist/tools/applicability.d.ts.map +1 -1
- package/dist/tools/applicability.js +48 -2
- package/dist/tools/applicability.js.map +1 -1
- package/dist/tools/article.d.ts +3 -0
- package/dist/tools/article.d.ts.map +1 -1
- package/dist/tools/article.js +14 -1
- package/dist/tools/article.js.map +1 -1
- package/dist/tools/evidence.d.ts +25 -0
- package/dist/tools/evidence.d.ts.map +1 -0
- package/dist/tools/evidence.js +48 -0
- package/dist/tools/evidence.js.map +1 -0
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +36 -4
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +29 -8
- package/dist/tools/search.js.map +1 -1
- package/package.json +31 -21
- package/scripts/add-cross-references.sql +200 -0
- package/scripts/analyze-survey-responses.ts +0 -0
- package/scripts/build-db.ts +55 -0
- package/scripts/bulk-reingest-all.ts +0 -0
- package/scripts/extract-eprivacy-recitals.ts +98 -0
- package/scripts/ingest-eurlex.ts +17 -2
- package/scripts/ingest-unece.ts +17 -3
- package/scripts/migrate-postgres.ts +445 -0
- package/scripts/migrate-to-postgres.ts +353 -0
- package/scripts/reingest-all-with-recitals.sh +0 -0
- package/scripts/sync-versions.ts +147 -0
- package/scripts/test-cross-refs.js +26 -0
- package/scripts/test-postgres-adapter.ts +146 -0
- package/scripts/update-dora-rts-metadata.ts +112 -0
- package/src/tools/applicability.ts +80 -2
- package/src/tools/article.ts +19 -1
- package/src/tools/evidence.ts +96 -0
- package/src/tools/registry.ts +36 -4
- package/src/tools/search.ts +31 -8
package/README.md
CHANGED
|
@@ -6,8 +6,14 @@
|
|
|
6
6
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
7
|
[](https://github.com/Ansvar-Systems/EU_compliance_MCP)
|
|
8
8
|
[](https://github.com/Ansvar-Systems/EU_compliance_MCP/actions/workflows/check-updates.yml)
|
|
9
|
+
[](https://github.com/Ansvar-Systems/EU_compliance_MCP/actions/workflows/deploy-azure.yml)
|
|
9
10
|
[](docs/COVERAGE_GAPS.md)
|
|
10
11
|
[](docs/COVERAGE_GAPS.md)
|
|
12
|
+
[](https://eu-regulations-mcp.jollysea-916ea475.westeurope.azurecontainerapps.io/health)
|
|
13
|
+
|
|
14
|
+
<a href="https://glama.ai/mcp/servers/@Mortalus/eu-regulations">
|
|
15
|
+
<img width="380" height="200" src="https://glama.ai/mcp/servers/@Mortalus/eu-regulations/badge" />
|
|
16
|
+
</a>
|
|
11
17
|
|
|
12
18
|
Query **37 EU regulations** — from GDPR and AI Act to DORA, MiFID II, eIDAS, Medical Device Regulation, and more — directly from Claude, Cursor, or any MCP-compatible client.
|
|
13
19
|
|
|
@@ -31,180 +37,14 @@ This MCP server makes EU regulations **searchable, cross-referenceable, and AI-r
|
|
|
31
37
|
|
|
32
38
|
---
|
|
33
39
|
|
|
34
|
-
##
|
|
35
|
-
|
|
36
|
-
### 37 Regulations — Full Text, Searchable
|
|
37
|
-
|
|
38
|
-
**Core Data Protection & Cybersecurity**
|
|
39
|
-
| Regulation | Articles | Definitions |
|
|
40
|
-
|------------|----------|-------------|
|
|
41
|
-
| GDPR | 99 | 26 |
|
|
42
|
-
| NIS2 | 46 | 41 |
|
|
43
|
-
| DORA | 64 | 65 |
|
|
44
|
-
| AI Act | 113 | 68 |
|
|
45
|
-
| Cyber Resilience Act | 71 | 51 |
|
|
46
|
-
| EU Cybersecurity Act | 69 | 22 |
|
|
47
|
-
| Cyber Solidarity Act | 26 | 17 |
|
|
48
|
-
| ePrivacy Directive | 21 | — |
|
|
49
|
-
| Law Enforcement Directive | 65 | 16 |
|
|
50
|
-
| EUCC (Cybersecurity Certification) | 50 | 15 |
|
|
51
|
-
|
|
52
|
-
**Digital Services & Identity**
|
|
53
|
-
| Regulation | Articles | Definitions |
|
|
54
|
-
|------------|----------|-------------|
|
|
55
|
-
| eIDAS 2.0 | 49 | 57 |
|
|
56
|
-
| Data Act | 50 | 42 |
|
|
57
|
-
| DSA | 93 | 24 |
|
|
58
|
-
| DMA | 54 | 33 |
|
|
59
|
-
| Data Governance Act | 38 | 21 |
|
|
60
|
-
| EECC (Electronic Communications) | 128 | 42 |
|
|
61
|
-
|
|
62
|
-
**Healthcare & Medical**
|
|
63
|
-
| Regulation | Articles | Definitions |
|
|
64
|
-
|------------|----------|-------------|
|
|
65
|
-
| EHDS (Health Data Space) | 105 | — |
|
|
66
|
-
| MDR (Medical Devices) | 123 | 64 |
|
|
67
|
-
| IVDR (In Vitro Diagnostics) | 113 | 70 |
|
|
68
|
-
|
|
69
|
-
**Financial Services**
|
|
70
|
-
| Regulation | Articles | Definitions |
|
|
71
|
-
|------------|----------|-------------|
|
|
72
|
-
| MiCA (Crypto-Assets) | 149 | 51 |
|
|
73
|
-
| PSD2 (Payment Services) | 117 | 48 |
|
|
74
|
-
| MiFID II | 97 | 63 |
|
|
75
|
-
| MiFIR | 55 | 47 |
|
|
76
|
-
| AIFMD | 71 | — |
|
|
77
|
-
| SFDR (ESG Disclosure) | 20 | 24 |
|
|
78
|
-
| EU Taxonomy | 27 | 23 |
|
|
79
|
-
|
|
80
|
-
**Product Safety & Sustainability**
|
|
81
|
-
| Regulation | Articles | Definitions |
|
|
82
|
-
|------------|----------|-------------|
|
|
83
|
-
| GPSR (Product Safety) | 52 | 28 |
|
|
84
|
-
| Machinery Regulation | 54 | 36 |
|
|
85
|
-
| PLD (Product Liability) | 24 | 18 |
|
|
86
|
-
| RED (Radio Equipment) | 52 | 26 |
|
|
87
|
-
| CSRD (Sustainability Reporting) | 8 | — |
|
|
88
|
-
| CSDDD (Due Diligence) | 39 | — |
|
|
89
|
-
| CBAM (Carbon Border) | 36 | 34 |
|
|
90
|
-
| EUDR (Deforestation) | 38 | 40 |
|
|
91
|
-
| CER (Critical Entities) | 29 | 10 |
|
|
92
|
-
|
|
93
|
-
**Automotive**
|
|
94
|
-
| Regulation | Articles | Definitions |
|
|
95
|
-
|------------|----------|-------------|
|
|
96
|
-
| UN R155 (Vehicle Cybersecurity) | 17 | 13 |
|
|
97
|
-
| UN R156 (Software Updates) | 16 | 11 |
|
|
98
|
-
|
|
99
|
-
**Total: 2,278 articles, 1,145 definitions across 37 regulations**
|
|
100
|
-
|
|
101
|
-
Plus:
|
|
102
|
-
- **686 security framework control mappings**:
|
|
103
|
-
- 313 ISO 27001:2022 controls mapped to regulation requirements
|
|
104
|
-
- 373 NIST CSF 2.0 controls mapped to regulation requirements
|
|
105
|
-
- **305 sector applicability rules** for determining which regulations apply
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Who This Is For
|
|
110
|
-
|
|
111
|
-
This isn't just for security teams. If you're building **anything** that touches the EU market, you need these regulations:
|
|
112
|
-
|
|
113
|
-
**🏦 Fintech & Banking**
|
|
114
|
-
- Payment processors → PSD2, DORA, MiFID II
|
|
115
|
-
- Crypto platforms → MiCA, DORA
|
|
116
|
-
- Trading systems → MiFIR, DORA
|
|
117
|
-
- Fund management → AIFMD, SFDR
|
|
118
|
-
|
|
119
|
-
**🏥 Healthcare & MedTech**
|
|
120
|
-
- Health apps → GDPR, EHDS, MDR
|
|
121
|
-
- Medical devices → MDR, IVDR, CRA
|
|
122
|
-
- Clinical systems → NIS2, GDPR, EHDS
|
|
123
|
-
|
|
124
|
-
**🤖 AI & Machine Learning**
|
|
125
|
-
- Any AI system → EU AI Act (high-risk classification)
|
|
126
|
-
- HR tech, recruitment → AI Act + GDPR
|
|
127
|
-
- Content moderation → DSA, AI Act
|
|
128
|
-
|
|
129
|
-
**🏭 IoT & Connected Products**
|
|
130
|
-
- Smart devices → CRA, RED, GDPR
|
|
131
|
-
- Industrial IoT → Machinery, NIS2, CRA
|
|
132
|
-
- Automotive → UN R155/R156, CRA
|
|
133
|
-
|
|
134
|
-
**☁️ SaaS & Digital Platforms**
|
|
135
|
-
- Cloud services → Data Act, GDPR, NIS2
|
|
136
|
-
- Marketplaces → DSA, DMA, Consumer Rights
|
|
137
|
-
- B2B platforms → Data Act, DGA
|
|
138
|
-
|
|
139
|
-
**📱 Consumer Tech**
|
|
140
|
-
- Mobile apps → GDPR, DSA, ePrivacy, CRA
|
|
141
|
-
- E-commerce → GDPR, Consumer Rights, DSA
|
|
142
|
-
- Social platforms → DSA, DMA, GDPR
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## 🗺️ Roadmap & Your Input
|
|
147
|
-
|
|
148
|
-
### Current Status: v0.4.1
|
|
149
|
-
✅ 37 regulations with 3,508 recitals
|
|
150
|
-
✅ Full-text search across articles and recitals
|
|
151
|
-
✅ Webhook notifications for EUR-Lex updates
|
|
152
|
-
✅ ISO 27001 & NIST CSF control mappings
|
|
153
|
-
|
|
154
|
-
### What's Next: Validation Phase
|
|
155
|
-
|
|
156
|
-
We're evaluating **delegated acts and technical standards** support (v0.5.0):
|
|
157
|
-
- EBA/EIOPA/ESMA technical standards (RTS/ITS)
|
|
158
|
-
- Commission delegated regulations
|
|
159
|
-
- Implementing acts with detailed requirements
|
|
160
|
-
- Harmonized standards (AI Act, CRA, MDR/IVDR)
|
|
161
|
-
|
|
162
|
-
**📊 Your input shapes the roadmap!** Survey launching soon after v0.4.1 release.
|
|
163
|
-
|
|
164
|
-
**Example queries this would enable:**
|
|
165
|
-
- "Show me DORA incident reporting RTS (EBA/2024/XXX)"
|
|
166
|
-
- "AI Act harmonized standards for cybersecurity"
|
|
167
|
-
- "NIS2 implementing act notification templates"
|
|
168
|
-
|
|
169
|
-
📁 **Documentation:** See `docs/demand-validation-2026-q1.md` for validation framework
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Installation
|
|
174
|
-
|
|
175
|
-
### For Users (Recommended)
|
|
40
|
+
## Quick Start
|
|
176
41
|
|
|
177
|
-
|
|
42
|
+
### Installation
|
|
178
43
|
|
|
179
44
|
```bash
|
|
180
45
|
npm install @ansvar/eu-regulations-mcp
|
|
181
46
|
```
|
|
182
47
|
|
|
183
|
-
The database includes:
|
|
184
|
-
- ✅ 37 EU regulations (2,278 articles)
|
|
185
|
-
- ✅ 3,508 recitals with legislative intent (33/37 regulations)
|
|
186
|
-
- ✅ 1,145 definitions
|
|
187
|
-
- ✅ ISO 27001:2022 & NIST CSF 2.0 mappings
|
|
188
|
-
|
|
189
|
-
**No build step needed** - the package ships with a complete database.
|
|
190
|
-
|
|
191
|
-
### For Maintainers/Contributors
|
|
192
|
-
|
|
193
|
-
If you need to re-ingest regulations (e.g., after EUR-Lex updates):
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
git clone https://github.com/Ansvar-Systems/EU_compliance_MCP.git
|
|
197
|
-
cd EU_compliance_MCP
|
|
198
|
-
npm install
|
|
199
|
-
npm run reingest:all # Uses Puppeteer to bypass EUR-Lex WAF
|
|
200
|
-
npm run build:db # Rebuild database from updated JSON
|
|
201
|
-
npm test # Verify everything works
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
## Quick Start
|
|
207
|
-
|
|
208
48
|
### Claude Desktop
|
|
209
49
|
|
|
210
50
|
Add to your `claude_desktop_config.json`:
|
|
@@ -238,95 +78,21 @@ Restart Claude Desktop. Done.
|
|
|
238
78
|
}
|
|
239
79
|
```
|
|
240
80
|
|
|
241
|
-
###
|
|
81
|
+
### Hosted Service (Zero Setup)
|
|
242
82
|
|
|
243
|
-
|
|
244
|
-
docker run -d --name eu-regs-mcp \
|
|
245
|
-
ansvar/eu-regulations-mcp:latest
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## Testing & Coverage
|
|
251
|
-
|
|
252
|
-
**Want to try it out?**
|
|
253
|
-
- [TEST_QUERIES.md](./TEST_QUERIES.md) - 60+ example queries organized by category
|
|
254
|
-
- [COVERAGE_GAPS.md](./COVERAGE_GAPS.md) - Known limitations and roadmap
|
|
255
|
-
|
|
256
|
-
**TL;DR:** Base regulations work perfectly. Recitals available for GDPR (173); other regulations blocked by EUR-Lex WAF protection (2026-01-27). Delegated acts and national transpositions are roadmap items.
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
|
-
## Available Tools
|
|
261
|
-
|
|
262
|
-
### `search_regulations`
|
|
263
|
-
Full-text search across all regulations.
|
|
264
|
-
|
|
265
|
-
```
|
|
266
|
-
"Search for incident reporting requirements across all regulations"
|
|
267
|
-
→ Returns matching articles from DORA, NIS2, GDPR with context
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
### `get_article`
|
|
271
|
-
Retrieve a specific article with full text and context.
|
|
272
|
-
|
|
273
|
-
```
|
|
274
|
-
"Get DORA Article 17"
|
|
275
|
-
→ Returns ICT-related incident management process requirements
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### `get_recital`
|
|
279
|
-
Retrieve legislative intent and interpretation guidance from regulation preambles.
|
|
280
|
-
|
|
281
|
-
```
|
|
282
|
-
"Get GDPR Recital 83"
|
|
283
|
-
→ Returns: Context for "appropriate technical measures"
|
|
284
|
-
(encryption, pseudonymization, resilience testing)
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
### `list_regulations`
|
|
288
|
-
List available regulations or show detailed structure.
|
|
289
|
-
|
|
290
|
-
```
|
|
291
|
-
"List all regulations"
|
|
292
|
-
→ Returns overview of all 37 regulations with article counts
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
### `get_definitions`
|
|
296
|
-
Get official definitions from any regulation.
|
|
297
|
-
|
|
298
|
-
```
|
|
299
|
-
"What does NIS2 define as an 'essential entity'?"
|
|
300
|
-
→ Returns Article 3 definition + criteria
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
### `compare_requirements`
|
|
304
|
-
Side-by-side comparison between frameworks.
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
"Compare incident reporting timelines between DORA and NIS2"
|
|
308
|
-
→ DORA: 4 hours (major), 24 hours (intermediate)
|
|
309
|
-
→ NIS2: 24 hours (early warning), 72 hours (full notification)
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
### `check_applicability`
|
|
313
|
-
Determine if a regulation applies to an entity type.
|
|
314
|
-
|
|
315
|
-
```
|
|
316
|
-
"Does DORA apply to a Swedish fintech with 50 employees?"
|
|
317
|
-
→ Yes, if providing financial services covered under Article 2
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
### `map_controls`
|
|
321
|
-
Map security framework controls to regulation requirements. Supports ISO 27001:2022 and NIST CSF.
|
|
83
|
+
Already running on Azure - just add to your config:
|
|
322
84
|
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"mcpServers": {
|
|
88
|
+
"eu-regulations": {
|
|
89
|
+
"url": "https://eu-regulations-mcp.jollysea-916ea475.westeurope.azurecontainerapps.io/mcp"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
323
93
|
```
|
|
324
|
-
"Which regulations require access control (ISO 27001 A.5.15)?"
|
|
325
|
-
→ Returns mappings to GDPR Art 32, DORA Art 9, NIS2 Art 21
|
|
326
94
|
|
|
327
|
-
|
|
328
|
-
→ Returns RS.MA-01 mappings to GDPR Art 33-34, NIS2 Art 23, DORA Art 17-19
|
|
329
|
-
```
|
|
95
|
+
See [HANDOVER.md](HANDOVER.md) and [SETUP-CICD.md](SETUP-CICD.md) for deployment details.
|
|
330
96
|
|
|
331
97
|
---
|
|
332
98
|
|
|
@@ -340,24 +106,39 @@ Once connected, just ask naturally:
|
|
|
340
106
|
- *"Does the EU AI Act apply to my recruitment screening tool?"*
|
|
341
107
|
- *"What are the essential cybersecurity requirements under the Cyber Resilience Act?"*
|
|
342
108
|
- *"Which regulations apply to a healthcare organization in Germany?"*
|
|
343
|
-
- *"
|
|
344
|
-
- *"What is a Cybersecurity Management System (CSMS) under R155?"*
|
|
345
|
-
- *"What are the requirements for OTA software updates under R156?"*
|
|
346
|
-
- *"What is RXSWIN and how is it used in R156?"*
|
|
109
|
+
- *"Map DORA ICT risk management to ISO 27001 controls"*
|
|
347
110
|
- *"What is an EU Digital Identity Wallet under eIDAS 2.0?"*
|
|
348
|
-
- *"What are the trust service provider requirements in eIDAS?"*
|
|
349
111
|
- *"What are my data access rights under the Data Act?"*
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
- *"What obligations do Very Large Online Platforms have under DSA?"*
|
|
353
|
-
- *"What is a gatekeeper under the Digital Markets Act?"*
|
|
354
|
-
- *"What interoperability requirements does the DMA impose on messaging apps?"*
|
|
112
|
+
|
|
113
|
+
**More examples:** [TEST_QUERIES.md](./TEST_QUERIES.md) — 60+ example queries organized by category
|
|
355
114
|
|
|
356
115
|
---
|
|
357
116
|
|
|
358
|
-
##
|
|
117
|
+
## What's Included
|
|
118
|
+
|
|
119
|
+
- **37 Regulations** — GDPR, DORA, NIS2, AI Act, MiCA, eIDAS 2.0, Medical Device Regulation, and 30 more
|
|
120
|
+
- **2,438 Articles** + 3,712 Recitals + 1,138 Official Definitions
|
|
121
|
+
- **Full-Text Search** — Find relevant articles across all regulations instantly
|
|
122
|
+
- **Control Mappings** — 686 mappings to ISO 27001:2022 & NIST CSF 2.0
|
|
123
|
+
- **Sector Rules** — Check which regulations apply to your industry
|
|
124
|
+
- **Daily Updates** — Automatic freshness checks against EUR-Lex
|
|
125
|
+
|
|
126
|
+
**Detailed coverage:** [docs/coverage.md](docs/coverage.md)
|
|
127
|
+
**Use cases by industry:** [docs/use-cases.md](docs/use-cases.md)
|
|
128
|
+
**Available tools:** [docs/tools.md](docs/tools.md)
|
|
129
|
+
|
|
130
|
+
---
|
|
359
131
|
|
|
360
|
-
|
|
132
|
+
## 🎬 See It In Action
|
|
133
|
+
|
|
134
|
+
### Why This Works
|
|
135
|
+
|
|
136
|
+
**Smart Context Management:**
|
|
137
|
+
- Search returns **relevant snippets**, not entire regulations
|
|
138
|
+
- Article retrieval includes **token usage warnings** for large content
|
|
139
|
+
- Cross-references help navigate without loading everything
|
|
140
|
+
|
|
141
|
+
### Example: EUR-Lex vs. This MCP
|
|
361
142
|
|
|
362
143
|
| EUR-Lex | This MCP Server |
|
|
363
144
|
|---------|-----------------|
|
|
@@ -369,121 +150,39 @@ EUR-Lex is authoritative. It's also **designed for lawyers, not developers**.
|
|
|
369
150
|
| Check 37 sites for updates | Daily automated freshness checks |
|
|
370
151
|
| No API, no integration | MCP protocol → AI-native |
|
|
371
152
|
|
|
372
|
-
**
|
|
373
|
-
- EUR-Lex: Download DORA PDF → Ctrl+F "incident" → Read Article 17 → Google "What's a major incident?" → Cross-reference NIS2 → Repeat for 5 regulations
|
|
374
|
-
- This MCP: *"Compare incident reporting requirements across DORA, NIS2, and CRA"* → Done.
|
|
375
|
-
|
|
376
|
-
This isn't replacing EUR-Lex. It's making it **usable in 2026**.
|
|
153
|
+
**EUR-Lex example:** Download DORA PDF → Ctrl+F "incident" → Read Article 17 → Google "What's a major incident?" → Cross-reference NIS2 → Repeat for 5 regulations
|
|
377
154
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
## Data Sources
|
|
381
|
-
|
|
382
|
-
All content is sourced from official public sources:
|
|
383
|
-
|
|
384
|
-
- **[EUR-Lex](https://eur-lex.europa.eu/)** — Official EU law portal (CC BY 4.0)
|
|
385
|
-
- **[UNECE](https://unece.org/)** — UN Economic Commission for Europe (UN R155, R156)
|
|
386
|
-
- **[ENISA](https://enisa.europa.eu/)** — EU Agency for Cybersecurity guidance
|
|
387
|
-
|
|
388
|
-
No copyrighted ISO standards are included. For ISO 27001 full text, you'll need to purchase licenses from ISO.
|
|
155
|
+
**This MCP:** *"Compare incident reporting requirements across DORA, NIS2, and CRA"* → Done.
|
|
389
156
|
|
|
390
157
|
---
|
|
391
158
|
|
|
392
|
-
##
|
|
159
|
+
## ⚠️ Important Disclaimers
|
|
393
160
|
|
|
394
|
-
|
|
395
|
-
# Clone the repository
|
|
396
|
-
git clone https://github.com/Ansvar-Systems/EU_compliance_MCP
|
|
397
|
-
cd eu-regulations-mcp
|
|
398
|
-
|
|
399
|
-
# Install dependencies
|
|
400
|
-
npm install
|
|
401
|
-
|
|
402
|
-
# Run tests
|
|
403
|
-
npm test
|
|
161
|
+
### Legal Advice
|
|
404
162
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
163
|
+
> **🚨 THIS TOOL IS NOT LEGAL ADVICE 🚨**
|
|
164
|
+
>
|
|
165
|
+
> Regulation text is sourced verbatim from EUR-Lex and UNECE (official public sources). However:
|
|
166
|
+
> - **Control mappings** (ISO 27001, NIST CSF) are interpretive aids, not official guidance
|
|
167
|
+
> - **Applicability rules** are generalizations, not legal determinations
|
|
168
|
+
> - **Cross-references** are research helpers, not compliance mandates
|
|
169
|
+
>
|
|
170
|
+
> **Always verify against official sources and consult qualified legal counsel for compliance decisions.**
|
|
411
171
|
|
|
412
|
-
###
|
|
172
|
+
### Token Usage
|
|
413
173
|
|
|
414
|
-
|
|
174
|
+
> **⚠️ Context Window Warning**
|
|
175
|
+
>
|
|
176
|
+
> Some articles are very large (e.g., MDR Article 123 = ~70,000 tokens). The MCP server:
|
|
177
|
+
> - **Search tool**: Returns smart snippets (safe for context)
|
|
178
|
+
> - **Get article tool**: Returns full text (may consume significant tokens)
|
|
179
|
+
> - **Recommendation**: Use search first, then fetch specific articles as needed
|
|
180
|
+
>
|
|
181
|
+
> Claude Desktop has a 200k token context window. Monitor your usage when retrieving multiple large articles.
|
|
415
182
|
|
|
416
|
-
|
|
417
|
-
# Ingest an EU regulation from EUR-Lex
|
|
418
|
-
npx tsx scripts/ingest-eurlex.ts 32024R1183 data/seed/eidas2.json
|
|
419
|
-
npm run build:db
|
|
420
|
-
|
|
421
|
-
# That's it. The regulation is now:
|
|
422
|
-
# - In the database
|
|
423
|
-
# - Automatically monitored by daily EUR-Lex checker
|
|
424
|
-
# - Included in auto-update workflow
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
### Freshness Monitoring
|
|
428
|
-
|
|
429
|
-
A GitHub Actions workflow runs daily at 6 AM UTC to ensure regulations stay current:
|
|
430
|
-
|
|
431
|
-
- **Checks EUR-Lex RSS feeds** for recent legislative changes
|
|
432
|
-
- **Compares versions** against local database
|
|
433
|
-
- **Creates GitHub issues** when updates are available
|
|
434
|
-
- **Auto-closes issues** when regulations are current
|
|
435
|
-
|
|
436
|
-
To manually check for updates:
|
|
437
|
-
|
|
438
|
-
```bash
|
|
439
|
-
npm run check-updates
|
|
440
|
-
```
|
|
183
|
+
### ISO Standards Copyright
|
|
441
184
|
|
|
442
|
-
|
|
443
|
-
1. Go to Actions → Daily EUR-Lex Update Check
|
|
444
|
-
2. Run workflow with `auto_update: true`
|
|
445
|
-
|
|
446
|
-
### Webhook Notifications
|
|
447
|
-
|
|
448
|
-
Get instant alerts when EUR-Lex updates are detected. All webhooks are optional — the workflow continues to work with GitHub issues if no secrets are configured.
|
|
449
|
-
|
|
450
|
-
**Slack Setup:**
|
|
451
|
-
1. Create an [Incoming Webhook](https://api.slack.com/messaging/webhooks) in your Slack workspace
|
|
452
|
-
2. Add secret `SLACK_WEBHOOK_URL` in repository Settings → Secrets and variables → Actions
|
|
453
|
-
3. The workflow will post formatted notifications with links to the issue and workflow run
|
|
454
|
-
|
|
455
|
-
**Discord Setup:**
|
|
456
|
-
1. Create a webhook in your Discord server settings (Server Settings → Integrations → Webhooks)
|
|
457
|
-
2. Add secret `DISCORD_WEBHOOK_URL` in repository settings
|
|
458
|
-
3. Optional: Add `DISCORD_MENTION_ROLE_ID` to mention a specific role (get role ID from Discord developer mode)
|
|
459
|
-
|
|
460
|
-
**Generic Webhook (Microsoft Teams, PagerDuty, etc.):**
|
|
461
|
-
Add `GENERIC_WEBHOOK_URL` secret to receive JSON payloads:
|
|
462
|
-
|
|
463
|
-
```json
|
|
464
|
-
{
|
|
465
|
-
"event": "regulation_update_detected",
|
|
466
|
-
"timestamp": "2026-01-27T06:00:00Z",
|
|
467
|
-
"repository": "owner/repo",
|
|
468
|
-
"run_url": "https://github.com/owner/repo/actions/runs/123",
|
|
469
|
-
"issue_url": "https://github.com/owner/repo/issues/45",
|
|
470
|
-
"summary": {
|
|
471
|
-
"total_monitored": 37,
|
|
472
|
-
"updates_found": 3,
|
|
473
|
-
"details": "..."
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
All webhook notifications use `continue-on-error: true`, so failures won't break the workflow.
|
|
479
|
-
|
|
480
|
-
---
|
|
481
|
-
|
|
482
|
-
## Disclaimer
|
|
483
|
-
|
|
484
|
-
**This tool is not legal advice.** Regulation text is sourced verbatim from EUR-Lex and UNECE. Control mappings, applicability rules, and cross-references are interpretive aids — useful for compliance research, but not a substitute for qualified legal counsel.
|
|
485
|
-
|
|
486
|
-
Always verify against official sources for compliance decisions.
|
|
185
|
+
**No copyrighted ISO standards are included.** Control mappings reference ISO 27001:2022 control IDs only (e.g., "A.5.1", "A.8.2"). The actual text of ISO standards requires a paid license from ISO. This tool helps map regulations to controls but doesn't replace the standard itself.
|
|
487
186
|
|
|
488
187
|
---
|
|
489
188
|
|
|
@@ -497,37 +196,16 @@ So we're open-sourcing it. Navigating 37 regulations shouldn't require a legal t
|
|
|
497
196
|
|
|
498
197
|
---
|
|
499
198
|
|
|
500
|
-
##
|
|
501
|
-
|
|
502
|
-
### Database Not Found Error
|
|
503
|
-
|
|
504
|
-
If you see `Failed to open database at .../data/regulations.db`:
|
|
199
|
+
## Documentation
|
|
505
200
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
The database contains all 37 regulations (~15MB). It's gitignored in the source repo but built during:
|
|
517
|
-
- `npm install` (postinstall hook)
|
|
518
|
-
- `npm publish` (prepublishOnly hook)
|
|
519
|
-
|
|
520
|
-
### MCP Server Not Starting
|
|
521
|
-
|
|
522
|
-
Check that you're using Node.js 18 or higher:
|
|
523
|
-
|
|
524
|
-
```bash
|
|
525
|
-
node --version # Should be v18.0.0 or higher
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
### Slow First Query
|
|
529
|
-
|
|
530
|
-
The first query after startup may be slow (~1-2s) as SQLite loads the database into memory. Subsequent queries are fast (<50ms).
|
|
201
|
+
- **[Coverage Details](docs/coverage.md)** — All 37 regulations with article counts
|
|
202
|
+
- **[Use Cases](docs/use-cases.md)** — Industry-specific guidance (fintech, healthcare, IoT, etc.)
|
|
203
|
+
- **[Available Tools](docs/tools.md)** — Detailed tool descriptions
|
|
204
|
+
- **[Development Guide](docs/development.md)** — Adding regulations, webhooks, CI/CD
|
|
205
|
+
- **[Troubleshooting](docs/troubleshooting.md)** — Common issues and fixes
|
|
206
|
+
- **[Roadmap](ROADMAP.md)** — Upcoming features (delegated acts, national transpositions)
|
|
207
|
+
- **[Coverage Gaps](docs/COVERAGE_GAPS.md)** — Known limitations
|
|
208
|
+
- **[Test Queries](TEST_QUERIES.md)** — 60+ example queries
|
|
531
209
|
|
|
532
210
|
---
|
|
533
211
|
|
|
@@ -537,19 +215,6 @@ Apache License 2.0. See [LICENSE](./LICENSE) for details.
|
|
|
537
215
|
|
|
538
216
|
---
|
|
539
217
|
|
|
540
|
-
## Contributing
|
|
541
|
-
|
|
542
|
-
PRs welcome, especially for:
|
|
543
|
-
- Additional regulation coverage
|
|
544
|
-
- Improved cross-references
|
|
545
|
-
- National transposition details
|
|
546
|
-
- Bug fixes and improvements
|
|
547
|
-
|
|
548
|
-
See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
549
|
-
|
|
550
|
-
---
|
|
551
|
-
|
|
552
218
|
<p align="center">
|
|
553
219
|
<sub>Built with care in Stockholm, Sweden</sub>
|
|
554
220
|
</p>
|
|
555
|
-
|
package/data/regulations.db
CHANGED
|
Binary file
|