@eucomplyhub/mcp-eu-ai-act 0.1.0
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/LICENSE +27 -0
- package/README.md +213 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +331 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Piotr Reder / eucomplyhub.com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
Risk classification logic in src/index.ts is adapted from
|
|
16
|
+
@clustral/risk-compass (MIT) by Clustral AI Labs. Attribution preserved.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
SOFTWARE.
|
|
25
|
+
|
|
26
|
+
This software is an educational tool for orientation, not legal advice.
|
|
27
|
+
For binding compliance mapping, consult a qualified expert.
|
package/README.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# @eucomplyhub/mcp-eu-ai-act
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server exposing free EU AI Act compliance classifiers to AI assistants. Built for **Claude Desktop**, **Cursor**, **Windsurf**, and any MCP-compatible client.
|
|
4
|
+
|
|
5
|
+
> Powers AI assistants to evaluate mid-market SaaS systems against EU AI Act, NIST AI RMF, ISO/IEC 42001, OECD, GDPR, and sector-specific overlays.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@eucomplyhub/mcp-eu-ai-act)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Tools exposed
|
|
13
|
+
|
|
14
|
+
### 1. `quick_risk_class` β 30-second multi-jurisdiction risk classifier
|
|
15
|
+
|
|
16
|
+
Deterministic, rule-based AI risk classification. **No LLM call** β same inputs always produce the same outputs.
|
|
17
|
+
|
|
18
|
+
**Frameworks covered:**
|
|
19
|
+
- πͺπΊ EU AI Act (Articles 5, 9β15, 26, 27, 50, 53)
|
|
20
|
+
- πΊπΈ NIST AI RMF (Govern Β· Map Β· Measure Β· Manage)
|
|
21
|
+
- π ISO/IEC 42001 (Clauses 4β10 + Annex B)
|
|
22
|
+
- π OECD AI Principles
|
|
23
|
+
- πΈπ¬ Singapore Model AI Governance
|
|
24
|
+
- π¨π³ PRC GenAI Interim Measures (for generation archetype)
|
|
25
|
+
- π GDPR + UK GDPR + DPDP + CCPA + LGPD + PIPEDA (privacy stack)
|
|
26
|
+
- π₯ HIPAA / FDA SaMD / EU MDR-AI (healthcare overlay)
|
|
27
|
+
- βοΈ EEOC + NYC AEDT + Colorado SB 24-205 (US employment overlay)
|
|
28
|
+
- ποΈ OMB M-24-10 + CoE AI Convention (public sector overlay)
|
|
29
|
+
|
|
30
|
+
**Inputs:**
|
|
31
|
+
- `industry`: healthcare, publicSector, education, hr, retail, industrial, media, other
|
|
32
|
+
- `archetype`: decisioning, generation, classification, recommendation, automation, forecasting
|
|
33
|
+
- `impact`: internal, b2b, consumer, regulated
|
|
34
|
+
|
|
35
|
+
**Returns:** Risk class (Critical / High / Limited / Minimal), 5-axis risk profile, per-framework verdicts.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### 2. `classify_annex3` β Deep Annex III classification (Claude-powered)
|
|
40
|
+
|
|
41
|
+
Full EU AI Act mapping using Claude (Anthropic) with complete regulatory context β Articles 6, 9β15, 26, 27, 50, 53 plus the postponement nuance (Annex III standalone enforcement postponed to Dec 2 2027; Article 50 + GPAI Article 53 lock in Aug 2 2026).
|
|
42
|
+
|
|
43
|
+
**Inputs:**
|
|
44
|
+
- `company`: Company name
|
|
45
|
+
- `industry`: Industry/vertical
|
|
46
|
+
- `features`: Array of AI features
|
|
47
|
+
- `useCase`: Plain-English description (min 20 chars)
|
|
48
|
+
- `euExposure`: eu-customers-output, eu-employees-only, no-eu, considering-eu
|
|
49
|
+
|
|
50
|
+
**Returns:**
|
|
51
|
+
- Overall risk classification (high-risk / limited-risk / gpai / minimal-risk)
|
|
52
|
+
- 8 Annex III categories with applies status + reasoning
|
|
53
|
+
- Article 50 transparency obligations + reasoning
|
|
54
|
+
- GPAI Article 53 applicability (provider / deployer) + reasoning
|
|
55
|
+
- 5 priority remediation actions tailored to your stack
|
|
56
|
+
|
|
57
|
+
> Calls https://eucomplyhub.com/api/annex3-classify β free, no signup, ~60s response time.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Install
|
|
62
|
+
|
|
63
|
+
### For Claude Desktop
|
|
64
|
+
|
|
65
|
+
1. Install the package globally:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm install -g @eucomplyhub/mcp-eu-ai-act
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
2. Edit your Claude Desktop config file:
|
|
72
|
+
|
|
73
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
74
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
75
|
+
|
|
76
|
+
3. Add the server:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"mcpServers": {
|
|
81
|
+
"eucomplyhub": {
|
|
82
|
+
"command": "npx",
|
|
83
|
+
"args": ["-y", "@eucomplyhub/mcp-eu-ai-act"]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
4. Restart Claude Desktop.
|
|
90
|
+
|
|
91
|
+
5. In a new chat, ask:
|
|
92
|
+
|
|
93
|
+
> Use the eucomplyhub tools to classify Acme Inc β an HR-tech SaaS with CV screening features for European enterprise customers.
|
|
94
|
+
|
|
95
|
+
Claude will call `classify_annex3` and return a structured Annex III mapping + priority remediation actions.
|
|
96
|
+
|
|
97
|
+
### For Cursor
|
|
98
|
+
|
|
99
|
+
Add to `.cursor/mcp.json` (workspace) or `~/.cursor/mcp.json` (global):
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"eucomplyhub": {
|
|
105
|
+
"command": "npx",
|
|
106
|
+
"args": ["-y", "@eucomplyhub/mcp-eu-ai-act"]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### For Windsurf
|
|
113
|
+
|
|
114
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"eucomplyhub": {
|
|
120
|
+
"command": "npx",
|
|
121
|
+
"args": ["-y", "@eucomplyhub/mcp-eu-ai-act"]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Generic stdio client
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npx -y @eucomplyhub/mcp-eu-ai-act
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The server runs over stdio (standard MCP transport).
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Example prompts
|
|
138
|
+
|
|
139
|
+
Once installed, ask your AI assistant questions like:
|
|
140
|
+
|
|
141
|
+
- *"What's the EU AI Act risk class for an HR-tech SaaS using AI to score job candidates?"*
|
|
142
|
+
- *"Run the quick risk classifier for a healthcare diagnostic AI used by EU regulated medical providers."*
|
|
143
|
+
- *"Deep-classify Acme Inc β they're a B2B fintech using AI to score loan applicants in the EU."*
|
|
144
|
+
- *"For Notion AI features, what Annex III categories apply and what's the Article 50 obligation?"*
|
|
145
|
+
|
|
146
|
+
The assistant will call the appropriate tool and return structured results you can act on.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## What does this cost?
|
|
151
|
+
|
|
152
|
+
**Free.** Both tools call free public endpoints at `eucomplyhub.com`:
|
|
153
|
+
|
|
154
|
+
- `quick_risk_class` runs entirely locally (deterministic JavaScript, no network call)
|
|
155
|
+
- `classify_annex3` calls `https://eucomplyhub.com/api/annex3-classify` (rate-limited free public API)
|
|
156
|
+
|
|
157
|
+
Rate limits apply for abuse prevention. Heavy usage should consider commissioning a full audit via [eucomplyhub.com/audit](https://eucomplyhub.com/audit).
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Disclaimer
|
|
162
|
+
|
|
163
|
+
This MCP server is an **educational tool for orientation**, not legal advice. Each framework has specific clauses, exceptions, and edge cases. For binding compliance mapping (audit deliverables, certification prep, regulatory submission), consult an expert.
|
|
164
|
+
|
|
165
|
+
For a paid expert audit:
|
|
166
|
+
- π **Tier 1 Quick Audit (β¬799):** Free /risk-class + /annex3 + 60-min consultation
|
|
167
|
+
- π¬ **Tier 2 Full Audit (β¬1,999):** Triple-framework methodology + audit-ready deliverable
|
|
168
|
+
- π‘οΈ **Tier 3 Continuous Monitoring (β¬299/mo):** Post-audit ongoing review
|
|
169
|
+
|
|
170
|
+
Book at [eucomplyhub.com/audit](https://eucomplyhub.com/audit).
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Methodology
|
|
175
|
+
|
|
176
|
+
Built and maintained by [Piotr Reder](https://www.linkedin.com/in/piotrreder/) ([eucomplyhub.com](https://eucomplyhub.com)). Triple-framework specialist for mid-market SaaS preparing for EU AI Act enforcement.
|
|
177
|
+
|
|
178
|
+
**Risk class logic** adapted from [@clustral/risk-compass](https://github.com/king-star-12/risk-compass) (MIT).
|
|
179
|
+
|
|
180
|
+
**Annex III deep classifier** powered by [Anthropic Claude](https://www.anthropic.com/) (claude-sonnet-4-6).
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Web versions
|
|
185
|
+
|
|
186
|
+
Prefer a browser?
|
|
187
|
+
|
|
188
|
+
- π [eucomplyhub.com/risk-class](https://eucomplyhub.com/risk-class) β interactive Tier 0 classifier (same logic as `quick_risk_class`)
|
|
189
|
+
- π¬ [eucomplyhub.com/annex3](https://eucomplyhub.com/annex3) β Tier 1 deep classifier (same as `classify_annex3`)
|
|
190
|
+
- πΊοΈ [eucomplyhub.com/crosswalk](https://eucomplyhub.com/crosswalk) β interactive EU AI Act β ISO 42001 β NIST mapping
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## License
|
|
195
|
+
|
|
196
|
+
MIT β see [LICENSE](LICENSE).
|
|
197
|
+
|
|
198
|
+
## Contributing
|
|
199
|
+
|
|
200
|
+
Issues + PRs welcome at https://github.com/eucomplyhub/mcp-eu-ai-act
|
|
201
|
+
|
|
202
|
+
For questions about the audit methodology behind the tools, reach out: [piotr@eucomplyhub.com](mailto:piotr@eucomplyhub.com)
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Changelog
|
|
207
|
+
|
|
208
|
+
### 0.1.0 β 2026-05-14
|
|
209
|
+
|
|
210
|
+
- Initial release
|
|
211
|
+
- Two tools: `quick_risk_class` + `classify_annex3`
|
|
212
|
+
- 10+ frameworks covered
|
|
213
|
+
- Claude Desktop / Cursor / Windsurf install instructions
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @eucomplyhub/mcp-eu-ai-act
|
|
4
|
+
*
|
|
5
|
+
* MCP (Model Context Protocol) server exposing eucomplyhub.com's free EU AI Act
|
|
6
|
+
* compliance classifiers to AI assistants (Claude Desktop, Cursor, Windsurf, etc.)
|
|
7
|
+
*
|
|
8
|
+
* Two tools exposed:
|
|
9
|
+
* 1. classify_annex3 β Deep Annex III classification (Claude-powered)
|
|
10
|
+
* Maps to: https://eucomplyhub.com/api/annex3-classify
|
|
11
|
+
* 2. quick_risk_class β 30-second multi-jurisdiction risk classifier
|
|
12
|
+
* (deterministic, no LLM call β same logic as eucomplyhub.com/risk-class)
|
|
13
|
+
*
|
|
14
|
+
* @license MIT
|
|
15
|
+
* @see https://eucomplyhub.com
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @eucomplyhub/mcp-eu-ai-act
|
|
4
|
+
*
|
|
5
|
+
* MCP (Model Context Protocol) server exposing eucomplyhub.com's free EU AI Act
|
|
6
|
+
* compliance classifiers to AI assistants (Claude Desktop, Cursor, Windsurf, etc.)
|
|
7
|
+
*
|
|
8
|
+
* Two tools exposed:
|
|
9
|
+
* 1. classify_annex3 β Deep Annex III classification (Claude-powered)
|
|
10
|
+
* Maps to: https://eucomplyhub.com/api/annex3-classify
|
|
11
|
+
* 2. quick_risk_class β 30-second multi-jurisdiction risk classifier
|
|
12
|
+
* (deterministic, no LLM call β same logic as eucomplyhub.com/risk-class)
|
|
13
|
+
*
|
|
14
|
+
* @license MIT
|
|
15
|
+
* @see https://eucomplyhub.com
|
|
16
|
+
*/
|
|
17
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
18
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
19
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
20
|
+
const SERVER_NAME = "@eucomplyhub/mcp-eu-ai-act";
|
|
21
|
+
const SERVER_VERSION = "0.1.0";
|
|
22
|
+
const API_BASE = "https://eucomplyhub.com";
|
|
23
|
+
// βββ Deterministic risk-class logic (mirror of /risk-class page) βββββββββββββ
|
|
24
|
+
const INDUSTRY_W = {
|
|
25
|
+
healthcare: [8, 10, 7, 9, 9],
|
|
26
|
+
publicSector: [9, 8, 9, 8, 9],
|
|
27
|
+
education: [7, 7, 8, 6, 6],
|
|
28
|
+
hr: [8, 8, 9, 6, 7],
|
|
29
|
+
retail: [3, 5, 4, 4, 4],
|
|
30
|
+
industrial: [4, 4, 3, 7, 4],
|
|
31
|
+
media: [4, 4, 6, 7, 4],
|
|
32
|
+
other: [5, 5, 5, 5, 5],
|
|
33
|
+
};
|
|
34
|
+
const ARCHETYPE_W = {
|
|
35
|
+
decisioning: [9, 5, 9, 8, 8],
|
|
36
|
+
generation: [4, 5, 5, 8, 4],
|
|
37
|
+
classification: [6, 5, 7, 6, 5],
|
|
38
|
+
recommendation: [5, 5, 7, 4, 5],
|
|
39
|
+
automation: [7, 5, 5, 9, 7],
|
|
40
|
+
forecasting: [4, 5, 6, 7, 4],
|
|
41
|
+
};
|
|
42
|
+
const IMPACT_W = {
|
|
43
|
+
internal: [2, 3, 3, 4, 2],
|
|
44
|
+
b2b: [4, 5, 5, 6, 5],
|
|
45
|
+
consumer: [6, 7, 7, 7, 7],
|
|
46
|
+
regulated: [10, 9, 10, 9, 10],
|
|
47
|
+
};
|
|
48
|
+
const AXES = ["decisionalImpact", "dataSensitivity", "biasRisk", "hallucinationCost", "regulatoryLoad"];
|
|
49
|
+
function r1(x) {
|
|
50
|
+
return Math.round(x * 10) / 10;
|
|
51
|
+
}
|
|
52
|
+
function classifyRisk(industry, archetype, impact) {
|
|
53
|
+
const i = INDUSTRY_W[industry];
|
|
54
|
+
const a = ARCHETYPE_W[archetype];
|
|
55
|
+
const p = IMPACT_W[impact];
|
|
56
|
+
if (!i || !a || !p) {
|
|
57
|
+
throw new Error(`Invalid input. industry must be one of: ${Object.keys(INDUSTRY_W).join(", ")}. archetype: ${Object.keys(ARCHETYPE_W).join(", ")}. impact: ${Object.keys(IMPACT_W).join(", ")}.`);
|
|
58
|
+
}
|
|
59
|
+
const scores = {};
|
|
60
|
+
for (let k = 0; k < 5; k++) {
|
|
61
|
+
scores[AXES[k]] = r1((i[k] + a[k] + p[k]) / 3);
|
|
62
|
+
}
|
|
63
|
+
const m = Math.max(scores.decisionalImpact, scores.biasRisk, scores.regulatoryLoad);
|
|
64
|
+
let cls, summary;
|
|
65
|
+
if (m >= 9) {
|
|
66
|
+
cls = "Critical";
|
|
67
|
+
summary = "Re-scope before any build. Conformity assessment, fundamental-rights review and sector-specific approvals are mandatory before deployment.";
|
|
68
|
+
}
|
|
69
|
+
else if (m >= 7) {
|
|
70
|
+
cls = "High";
|
|
71
|
+
summary = "Engineer for conformity assessment, fairness evaluation and tamper-evident audit trail from day one. Annex III obligations apply.";
|
|
72
|
+
}
|
|
73
|
+
else if (m >= 5) {
|
|
74
|
+
cls = "Limited";
|
|
75
|
+
summary = "Ship with transparency disclosures, output grounding and a documented incident-response plan. Article 50 transparency applies.";
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
cls = "Minimal";
|
|
79
|
+
summary = "Move fast β but maintain an audit trail and basic ISO/IEC 42001 hygiene. Re-classify when scope changes.";
|
|
80
|
+
}
|
|
81
|
+
const di = scores.decisionalImpact, br = scores.biasRisk, rl = scores.regulatoryLoad, hc = scores.hallucinationCost, ds = scores.dataSensitivity;
|
|
82
|
+
const frameworks = [
|
|
83
|
+
{
|
|
84
|
+
id: "eu_ai_act",
|
|
85
|
+
label: "EU AI Act",
|
|
86
|
+
region: "EU",
|
|
87
|
+
verdict: di >= 9
|
|
88
|
+
? "Review for Art. 5 prohibited practices before any deployment."
|
|
89
|
+
: (di >= 7 || impact === "regulated")
|
|
90
|
+
? "High-risk system β full Annex III obligations apply (Articles 9β15, 26, 27)."
|
|
91
|
+
: di >= 5
|
|
92
|
+
? "Limited risk β Article 50 transparency duties apply (user notification + content labelling)."
|
|
93
|
+
: "Minimal risk β voluntary best-practice + ISO/IEC 42001 alignment.",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "nist_ai_rmf",
|
|
97
|
+
label: "NIST AI RMF",
|
|
98
|
+
region: "US / global",
|
|
99
|
+
verdict: br >= 8
|
|
100
|
+
? "Govern + Measure priority β fairness, validity and reliability controls."
|
|
101
|
+
: hc >= 7
|
|
102
|
+
? "Measure + Manage β robustness and reliability emphasis."
|
|
103
|
+
: "Map + Govern β full functional alignment across all four functions.",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "iso_42001",
|
|
107
|
+
label: "ISO/IEC 42001",
|
|
108
|
+
region: "Global",
|
|
109
|
+
verdict: rl >= 8
|
|
110
|
+
? "Full AIMS implementation with sector annex controls (Clauses 4β10)."
|
|
111
|
+
: rl >= 6
|
|
112
|
+
? "Core AIMS implementation with documented risk treatment plan."
|
|
113
|
+
: "Lightweight AIMS aligned with existing ISO 27001 program.",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "oecd",
|
|
117
|
+
label: "OECD AI Principles",
|
|
118
|
+
region: "50+ countries",
|
|
119
|
+
verdict: (br >= 7 || di >= 7)
|
|
120
|
+
? "Human-centred values, transparency and accountability obligations."
|
|
121
|
+
: "Standard accountability + transparency posture sufficient.",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "singapore",
|
|
125
|
+
label: "Singapore Model AI Governance",
|
|
126
|
+
region: "Singapore",
|
|
127
|
+
verdict: (impact === "consumer" || impact === "regulated")
|
|
128
|
+
? "Apply AI Verify testing toolkit before deployment."
|
|
129
|
+
: "Internal governance committee + risk impact assessment.",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: "gdpr",
|
|
133
|
+
label: "GDPR Β· UK GDPR Β· DPDP Β· CCPA Β· LGPD Β· PIPEDA",
|
|
134
|
+
region: "Global privacy",
|
|
135
|
+
verdict: ds >= 7
|
|
136
|
+
? "Strong: DPA(s), DPIA, DPO consultation, Article 22 / DPDP Β§11 automated-decision review."
|
|
137
|
+
: "Standard: lawful basis, transparency notices, data subject rights operationalised.",
|
|
138
|
+
},
|
|
139
|
+
];
|
|
140
|
+
// PRC GenAI overlay
|
|
141
|
+
if (archetype === "generation") {
|
|
142
|
+
frameworks.push({
|
|
143
|
+
id: "prc_genai",
|
|
144
|
+
label: "PRC GenAI Interim Measures",
|
|
145
|
+
region: "China",
|
|
146
|
+
verdict: "Pre-launch security assessment + watermarking obligations apply for PRC users.",
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
// Sector overlays
|
|
150
|
+
if (industry === "healthcare") {
|
|
151
|
+
frameworks.push({
|
|
152
|
+
id: "hipaa_fda_samd",
|
|
153
|
+
label: "HIPAA / FDA SaMD / EU MDR-AI",
|
|
154
|
+
region: "Health",
|
|
155
|
+
verdict: "PHI minimisation, BAAs, and software-as-medical-device classification check required.",
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
else if (industry === "hr") {
|
|
159
|
+
frameworks.push({
|
|
160
|
+
id: "us_employment",
|
|
161
|
+
label: "EEOC + NYC AEDT + Colorado SB 24-205",
|
|
162
|
+
region: "US employment",
|
|
163
|
+
verdict: "Pre-deployment bias audit + candidate notice + annual disparate-impact testing.",
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
else if (industry === "publicSector") {
|
|
167
|
+
frameworks.push({
|
|
168
|
+
id: "us_public_sector",
|
|
169
|
+
label: "OMB M-24-10 + CoE AI Convention",
|
|
170
|
+
region: "Public sector",
|
|
171
|
+
verdict: "Rights-impact assessment + public AI use case inventory + human rights safeguards.",
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
class: cls,
|
|
176
|
+
summary,
|
|
177
|
+
scores,
|
|
178
|
+
frameworks,
|
|
179
|
+
methodology: "Deterministic, rule-based classification. Same inputs always produce the same outputs. Logic adapted from @clustral/risk-compass (MIT). Triple-framework methodology by eucomplyhub.com.",
|
|
180
|
+
disclaimer: "This is a high-level orientation tool, not legal advice. For binding compliance mapping, consult an expert. See https://eucomplyhub.com/risk-class for the interactive web version.",
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
// βββ MCP Server setup ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
184
|
+
const server = new Server({
|
|
185
|
+
name: SERVER_NAME,
|
|
186
|
+
version: SERVER_VERSION,
|
|
187
|
+
}, {
|
|
188
|
+
capabilities: {
|
|
189
|
+
tools: {},
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
// List available tools
|
|
193
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
194
|
+
return {
|
|
195
|
+
tools: [
|
|
196
|
+
{
|
|
197
|
+
name: "quick_risk_class",
|
|
198
|
+
description: "30-second deterministic multi-jurisdiction AI risk classification across EU AI Act, NIST AI RMF, ISO/IEC 42001, OECD, Singapore Model AI Governance, GDPR, and sector-specific overlays (HIPAA, NYC AEDT, Colorado SB 24-205). No LLM call. Same inputs always produce same outputs. Use this for quick orientation before deeper analysis.",
|
|
199
|
+
inputSchema: {
|
|
200
|
+
type: "object",
|
|
201
|
+
properties: {
|
|
202
|
+
industry: {
|
|
203
|
+
type: "string",
|
|
204
|
+
enum: ["healthcare", "publicSector", "education", "hr", "retail", "industrial", "media", "other"],
|
|
205
|
+
description: "Industry vertical. Use 'other' for fintech/banking/insurance.",
|
|
206
|
+
},
|
|
207
|
+
archetype: {
|
|
208
|
+
type: "string",
|
|
209
|
+
enum: ["decisioning", "generation", "classification", "recommendation", "automation", "forecasting"],
|
|
210
|
+
description: "What the AI primarily does: decisioning (approve/deny, score, allocate), generation (draft, summarise), classification (label, route, triage), recommendation (rank, suggest), automation (multi-step actions), forecasting (predict outcomes).",
|
|
211
|
+
},
|
|
212
|
+
impact: {
|
|
213
|
+
type: "string",
|
|
214
|
+
enum: ["internal", "b2b", "consumer", "regulated"],
|
|
215
|
+
description: "Who is affected: internal (employee-only), b2b (business customers), consumer (end users), regulated (healthcare, finance, public sector).",
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
required: ["industry", "archetype", "impact"],
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: "classify_annex3",
|
|
223
|
+
description: "Deep Annex III classification using Claude (Anthropic) with full EU AI Act regulatory context. Maps your product against all 8 Annex III high-risk categories + Article 50 transparency + GPAI Article 53 + GPAI provider/deployer reasoning. Returns 5 priority remediation actions tailored to your stack. ~60 seconds (LLM-powered).",
|
|
224
|
+
inputSchema: {
|
|
225
|
+
type: "object",
|
|
226
|
+
properties: {
|
|
227
|
+
company: {
|
|
228
|
+
type: "string",
|
|
229
|
+
description: "Company name being classified.",
|
|
230
|
+
},
|
|
231
|
+
industry: {
|
|
232
|
+
type: "string",
|
|
233
|
+
description: "Industry/vertical (e.g., 'HR-tech', 'fintech', 'healthtech', 'productivity', 'voice-AI').",
|
|
234
|
+
},
|
|
235
|
+
features: {
|
|
236
|
+
type: "array",
|
|
237
|
+
items: { type: "string" },
|
|
238
|
+
description: "AI features in the product. Examples: 'content-generation', 'scoring', 'decision-making', 'api-consumer', 'own-model', 'recommendation', 'classification'.",
|
|
239
|
+
},
|
|
240
|
+
useCase: {
|
|
241
|
+
type: "string",
|
|
242
|
+
description: "Plain-English description of what the AI does and who it serves. Min 20 chars.",
|
|
243
|
+
},
|
|
244
|
+
euExposure: {
|
|
245
|
+
type: "string",
|
|
246
|
+
enum: ["eu-customers-output", "eu-employees-only", "no-eu", "considering-eu"],
|
|
247
|
+
description: "EU exposure level. 'eu-customers-output' = serves EU customers with AI-influenced outputs. 'eu-employees-only' = internal tools used by EU employees only. 'no-eu' = no EU footprint. 'considering-eu' = planning EU expansion.",
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
required: ["company", "industry", "features", "useCase", "euExposure"],
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
};
|
|
255
|
+
});
|
|
256
|
+
// Handle tool calls
|
|
257
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
258
|
+
const { name, arguments: args } = request.params;
|
|
259
|
+
if (!args) {
|
|
260
|
+
throw new Error("Missing arguments");
|
|
261
|
+
}
|
|
262
|
+
if (name === "quick_risk_class") {
|
|
263
|
+
const { industry, archetype, impact } = args;
|
|
264
|
+
try {
|
|
265
|
+
const result = classifyRisk(industry, archetype, impact);
|
|
266
|
+
return {
|
|
267
|
+
content: [
|
|
268
|
+
{
|
|
269
|
+
type: "text",
|
|
270
|
+
text: JSON.stringify(result, null, 2),
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
catch (err) {
|
|
276
|
+
return {
|
|
277
|
+
content: [
|
|
278
|
+
{
|
|
279
|
+
type: "text",
|
|
280
|
+
text: `Error: ${err.message}`,
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
isError: true,
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (name === "classify_annex3") {
|
|
288
|
+
try {
|
|
289
|
+
const response = await fetch(`${API_BASE}/api/annex3-classify`, {
|
|
290
|
+
method: "POST",
|
|
291
|
+
headers: { "Content-Type": "application/json" },
|
|
292
|
+
body: JSON.stringify(args),
|
|
293
|
+
});
|
|
294
|
+
if (!response.ok) {
|
|
295
|
+
const errText = await response.text();
|
|
296
|
+
throw new Error(`Classifier API returned ${response.status}: ${errText.slice(0, 200)}`);
|
|
297
|
+
}
|
|
298
|
+
const result = await response.json();
|
|
299
|
+
return {
|
|
300
|
+
content: [
|
|
301
|
+
{
|
|
302
|
+
type: "text",
|
|
303
|
+
text: JSON.stringify(result, null, 2),
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
catch (err) {
|
|
309
|
+
return {
|
|
310
|
+
content: [
|
|
311
|
+
{
|
|
312
|
+
type: "text",
|
|
313
|
+
text: `Error calling classifier: ${err.message}. Try the web version: https://eucomplyhub.com/annex3`,
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
isError: true,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
321
|
+
});
|
|
322
|
+
// Start server
|
|
323
|
+
async function main() {
|
|
324
|
+
const transport = new StdioServerTransport();
|
|
325
|
+
await server.connect(transport);
|
|
326
|
+
console.error(`[${SERVER_NAME}] v${SERVER_VERSION} listening on stdio.`);
|
|
327
|
+
}
|
|
328
|
+
main().catch((err) => {
|
|
329
|
+
console.error("Fatal error:", err);
|
|
330
|
+
process.exit(1);
|
|
331
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@eucomplyhub/mcp-eu-ai-act",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for EU AI Act compliance β Annex III deep classifier + multi-jurisdiction risk classifier. Powers AI assistants (Claude Desktop, Cursor, Windsurf) to evaluate mid-market SaaS systems against EU AI Act, NIST AI RMF, ISO/IEC 42001, OECD, and more frameworks.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"eu-ai-act",
|
|
9
|
+
"annex-iii",
|
|
10
|
+
"ai-governance",
|
|
11
|
+
"compliance",
|
|
12
|
+
"audit",
|
|
13
|
+
"iso-42001",
|
|
14
|
+
"nist-ai-rmf",
|
|
15
|
+
"gdpr",
|
|
16
|
+
"ai-act-classifier"
|
|
17
|
+
],
|
|
18
|
+
"author": {
|
|
19
|
+
"name": "Piotr Reder",
|
|
20
|
+
"email": "piotr@eucomplyhub.com",
|
|
21
|
+
"url": "https://eucomplyhub.com"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"homepage": "https://eucomplyhub.com",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/eucomplyhub/mcp-eu-ai-act.git"
|
|
28
|
+
},
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/eucomplyhub/mcp-eu-ai-act/issues"
|
|
31
|
+
},
|
|
32
|
+
"type": "module",
|
|
33
|
+
"main": "dist/index.js",
|
|
34
|
+
"bin": {
|
|
35
|
+
"mcp-eu-ai-act": "dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc",
|
|
44
|
+
"start": "node dist/index.js",
|
|
45
|
+
"dev": "tsx src/index.ts",
|
|
46
|
+
"prepublishOnly": "npm run build"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/node": "^22.0.0",
|
|
53
|
+
"tsx": "^4.19.0",
|
|
54
|
+
"typescript": "^5.6.0"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=18.0.0"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public",
|
|
61
|
+
"registry": "https://registry.npmjs.org/"
|
|
62
|
+
}
|
|
63
|
+
}
|