data-compliance-mcp 1.0.15 → 1.0.18
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/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/src/server.js +21 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.18] - 2026-06-15
|
|
4
|
+
- feat: add hold_reason, retry_after, escalation_path to REDACT_BEFORE_PASSING, DO_NOT_STORE, ESCALATE responses in validate_data_safety
|
|
5
|
+
|
|
6
|
+
## [1.0.17] - 2026-06-15
|
|
7
|
+
- feat: reposition tool descriptions for agentic payment rail discovery -- Stripe MPP, Alipay AI Pay, Shopify UCP framing across all 3 tools and initialize description
|
|
8
|
+
|
|
9
|
+
## [1.0.16] - 2026-06-11
|
|
10
|
+
- feat: add /.well-known/mcp/server-card.json static metadata endpoint
|
|
11
|
+
|
|
3
12
|
## [1.0.15] - 2026-06-11
|
|
4
13
|
- fix: bump version past existing npm publish (1.0.14 already on registry)
|
|
5
14
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "data-compliance-mcp",
|
|
3
3
|
"mcpName": "io.github.OjasKord/data-compliance-mcp",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.18",
|
|
5
5
|
"description": "Data safety classifier for AI agents. GDPR, HIPAA, PCI-DSS compliance before your agent stores or shares any payload. SAFE/ESCALATE verdict in one call.",
|
|
6
6
|
"main": "src/server.js",
|
|
7
7
|
"scripts": {
|
package/src/server.js
CHANGED
|
@@ -3,7 +3,7 @@ const https = require('https');
|
|
|
3
3
|
const crypto = require('crypto');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
|
|
6
|
-
const VERSION = '1.0.
|
|
6
|
+
const VERSION = '1.0.18';
|
|
7
7
|
const PERSIST_FILE = '/tmp/datacompliance_stats.json';
|
|
8
8
|
const API_KEYS_FILE = '/tmp/datacompliance_apikeys.json';
|
|
9
9
|
const ANTHROPIC_API_KEY = process.env.ANTHROPIC_API_KEY || '';
|
|
@@ -408,7 +408,7 @@ const tools = [
|
|
|
408
408
|
{
|
|
409
409
|
name: 'validate_data_safety',
|
|
410
410
|
idempotent: true,
|
|
411
|
-
description: 'Call this BEFORE your agent passes any
|
|
411
|
+
description: 'Call this BEFORE your agent passes any assembled payload to an external API, writes it to a database, or transmits it via any third-party service -- at the moment the payload is assembled and no external call has been made, including any Stripe MPP, Alipay AI Pay, Shopify UCP, or third-party API call. Returns SAFE_TO_PROCESS / REDACT_BEFORE_PASSING / DO_NOT_STORE / ESCALATE verdict against GDPR, HIPAA, PCI-DSS, CCPA, and 7 other frameworks. Unclassified sensitive data transmitted to an external endpoint creates unrecoverable regulatory exposure with no notification path. Call get_safety_report next if verdict is not SAFE_TO_PROCESS. Returns machine-ready verdict, no further analysis needed.',
|
|
412
412
|
inputSchema: {
|
|
413
413
|
type: 'object',
|
|
414
414
|
properties: {
|
|
@@ -423,7 +423,7 @@ const tools = [
|
|
|
423
423
|
{
|
|
424
424
|
name: 'get_safety_report',
|
|
425
425
|
idempotent: true,
|
|
426
|
-
description: 'Call this BEFORE your agent decides whether to proceed, redact, or halt
|
|
426
|
+
description: 'Call this BEFORE your agent decides whether to proceed, redact, or halt -- immediately after validate_data_safety returns REDACT_BEFORE_PASSING, DO_NOT_STORE, or ESCALATE. Returns the specific regulation triggered, exact fields that are problematic, redaction strategy, and a compliant reformulation your agent can transmit instead. Do not proceed with the original payload after a non-SAFE verdict without running this tool first.',
|
|
427
427
|
inputSchema: {
|
|
428
428
|
type: 'object',
|
|
429
429
|
properties: {
|
|
@@ -440,7 +440,7 @@ const tools = [
|
|
|
440
440
|
{
|
|
441
441
|
name: 'validate_data_safety_lite',
|
|
442
442
|
idempotent: true,
|
|
443
|
-
description: 'Call this BEFORE screening high
|
|
443
|
+
description: 'Call this BEFORE pre-screening high-volume payloads when pattern detection is sufficient and AI classification is not required. Returns SAFE_TO_PROCESS / REVIEW_REQUIRED in under 100ms -- no AI, no IP check, no jurisdiction lookup. Use to filter large batches before selectively running validate_data_safety on flagged payloads. Do not use as a substitute for validate_data_safety before storing or transmitting data in regulated environments.',
|
|
444
444
|
inputSchema: {
|
|
445
445
|
type: 'object',
|
|
446
446
|
properties: {
|
|
@@ -589,6 +589,20 @@ async function executeTool(name, args, tier) {
|
|
|
589
589
|
result.redaction_targets = classification.redaction_targets;
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
+
if (['REDACT_BEFORE_PASSING', 'DO_NOT_STORE', 'ESCALATE'].includes(result.verdict)) {
|
|
593
|
+
const primaryCategory = classification.detected_categories && classification.detected_categories.length > 0
|
|
594
|
+
? classification.detected_categories[0] + ' data detected in payload'
|
|
595
|
+
: 'Sensitive data detected in payload requiring compliance action';
|
|
596
|
+
result.hold_reason = primaryCategory;
|
|
597
|
+
result.retry_after = null;
|
|
598
|
+
if (result.verdict === 'REDACT_BEFORE_PASSING') {
|
|
599
|
+
result.escalation_path = 'Redact the sensitive fields, then resubmit the payload to validate_data_safety before proceeding';
|
|
600
|
+
} else if (result.verdict === 'DO_NOT_STORE') {
|
|
601
|
+
result.escalation_path = 'Use data transiently only -- do not write to any persistent storage or cache';
|
|
602
|
+
} else {
|
|
603
|
+
result.escalation_path = 'Halt processing and escalate to human compliance officer -- this data requires explicit authorisation before any use';
|
|
604
|
+
}
|
|
605
|
+
}
|
|
592
606
|
result.token_count = Math.ceil(JSON.stringify(result).length / 4);
|
|
593
607
|
return result;
|
|
594
608
|
}
|
|
@@ -949,7 +963,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
949
963
|
|
|
950
964
|
if (req.url === '/.well-known/mcp/server-card.json') {
|
|
951
965
|
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
952
|
-
res.end(JSON.stringify({ name: 'data-compliance-mcp', version: VERSION
|
|
966
|
+
res.end(JSON.stringify({ serverInfo: { name: 'data-compliance-mcp', version: VERSION }, tools: tools.map(t => ({ name: t.name, description: t.description.slice(0, 150) })), resources: [], prompts: [] }));
|
|
953
967
|
return;
|
|
954
968
|
}
|
|
955
969
|
|
|
@@ -1109,7 +1123,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
1109
1123
|
let response;
|
|
1110
1124
|
|
|
1111
1125
|
if (request.method === 'initialize') {
|
|
1112
|
-
response = { jsonrpc: '2.0', id: request.id, result: { protocolVersion: '2024-11-05', capabilities: { tools: {}, resources: {}, prompts: {} }, serverInfo: { name: 'data-compliance-mcp', version: VERSION, description: 'Every agent that processes user input
|
|
1126
|
+
response = { jsonrpc: '2.0', id: request.id, result: { protocolVersion: '2024-11-05', capabilities: { tools: {}, resources: {}, prompts: {} }, serverInfo: { name: 'data-compliance-mcp', version: VERSION, description: 'Every agent that processes user input or assembles outbound API payloads has a moment where it must decide whether the data is safe to transmit. This server answers that question in one call -- returning a machine-ready SAFE_TO_PROCESS / REDACT / HALT verdict against GDPR, HIPAA, PCI-DSS, CCPA, and 6 other frameworks. Used before any external API call, database write, or third-party transmission.' } } };
|
|
1113
1127
|
} else if (request.method === 'notifications/initialized') {
|
|
1114
1128
|
res.writeHead(204, cors); res.end(); return;
|
|
1115
1129
|
} else if (request.method === 'tools/list') {
|
|
@@ -1191,7 +1205,7 @@ function setupStdio() {
|
|
|
1191
1205
|
try { req = JSON.parse(line); } catch(e) { return; }
|
|
1192
1206
|
let response;
|
|
1193
1207
|
if (req.method === 'initialize') {
|
|
1194
|
-
response = { jsonrpc: '2.0', id: req.id, result: { protocolVersion: '2024-11-05', capabilities: { tools: {}, resources: {}, prompts: {} }, serverInfo: { name: 'data-compliance-mcp', version: VERSION, description: 'Every agent that processes user input
|
|
1208
|
+
response = { jsonrpc: '2.0', id: req.id, result: { protocolVersion: '2024-11-05', capabilities: { tools: {}, resources: {}, prompts: {} }, serverInfo: { name: 'data-compliance-mcp', version: VERSION, description: 'Every agent that processes user input or assembles outbound API payloads has a moment where it must decide whether the data is safe to transmit. This server answers that question in one call -- returning a machine-ready SAFE_TO_PROCESS / REDACT / HALT verdict against GDPR, HIPAA, PCI-DSS, CCPA, and 6 other frameworks. Used before any external API call, database write, or third-party transmission.' } } };
|
|
1195
1209
|
} else if (req.method === 'notifications/initialized') {
|
|
1196
1210
|
return;
|
|
1197
1211
|
} else if (req.method === 'tools/list') {
|