@privacyscrubber/mcp-server 2.3.6 β 2.3.8
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 +88 -10
- package/index.js +421 -30
- package/install.js +80 -10
- package/manifest.json +5 -1
- package/package.json +1 -1
- package/pii-masking-run.js +1 -2
- package/ps-license-manager.cjs +1 -1
- package/ps-pii-engine.cjs +13 -12
- package/ps-pii-engine.js +13 -12
- package/scrubber-core.cjs +1795 -8
- package/server.json +2 -2
package/index.js
CHANGED
|
@@ -66,6 +66,7 @@ PrivacyScrubberCore.init();
|
|
|
66
66
|
// Volatile in-memory token map per session (multi-task agent isolation)
|
|
67
67
|
const agentSessions = new Map();
|
|
68
68
|
const MAX_CONCURRENT_SESSIONS = 200;
|
|
69
|
+
const MAX_SESSION_TOKENS = parseInt(process.env.PRIVACYSCRUBBER_MAX_SESSION_TOKENS || '5000', 10);
|
|
69
70
|
|
|
70
71
|
function getSession(sessionId = 'default') {
|
|
71
72
|
const sid = (sessionId || 'default').toString().trim() || 'default';
|
|
@@ -218,7 +219,7 @@ function checkFreeTierLimit(isPro) {
|
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
if (count >= FREE_TIER_DAILY_LIMIT) {
|
|
221
|
-
mcpLog(`${colors.redBold}π« [PrivacyScrubber] Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Request BLOCKED.${colors.reset}\n${colors.cyan}π Get a PRO key for unlimited use: https://privacyscrubber.com/pricing${colors.reset}\n`);
|
|
222
|
+
mcpLog(`${colors.redBold}π« [PrivacyScrubber] Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Request BLOCKED.${colors.reset}\n${colors.cyan}π Get a PRO key for unlimited use: https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=daily_limit&utm_campaign=pro_upgrade${colors.reset}\n`);
|
|
222
223
|
return { blocked: true, count };
|
|
223
224
|
}
|
|
224
225
|
|
|
@@ -286,8 +287,7 @@ function buildCisoAuditTelemetry(currentTokenMap = {}) {
|
|
|
286
287
|
const ipHoldings = {
|
|
287
288
|
standard: 'IETF draft-sibiryakov-ztds-protocol-00',
|
|
288
289
|
standardUrl: 'https://datatracker.ietf.org/doc/draft-sibiryakov-ztds-protocol/',
|
|
289
|
-
patent: '
|
|
290
|
-
wipoDas: 'B17B',
|
|
290
|
+
patent: "U.S. & Int'l Patents Pending (Paris Convention Priority)",
|
|
291
291
|
trademark: 'ZTDSβ’ Reg. #182655957 (ILPO Cl 9 & 42)'
|
|
292
292
|
};
|
|
293
293
|
|
|
@@ -334,24 +334,24 @@ function buildCisoAuditTelemetry(currentTokenMap = {}) {
|
|
|
334
334
|
function formatAuditReceipt(telemetry, compact = false, wasTruncated = false, charLimit = 15000) {
|
|
335
335
|
const isCompact = compact === true || process.env.PRIVACYSCRUBBER_COMPACT_RECEIPT === '1' || process.env.PRIVACYSCRUBBER_COMPACT_RECEIPT === 'true';
|
|
336
336
|
const truncationLine = wasTruncated
|
|
337
|
-
? `> * **Notice:** Input truncated to ${charLimit.toLocaleString()} chars (Free Tier Limit). Upgrade to PRO ($15/mo or $110 Lifetime), TEAMS ($99/mo) or Developer SDK ($299/mo): [privacyscrubber.com/pricing](https://privacyscrubber.com/pricing)\n`
|
|
337
|
+
? `> * **Notice:** Input truncated to ${charLimit.toLocaleString()} chars (Free Tier Limit). Upgrade to PRO ($15/mo or $110 Lifetime), TEAMS ($99/mo) or Developer SDK ($299/mo): [privacyscrubber.com/pricing](https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp&utm_medium=truncation&utm_campaign=teams_upgrade)\n`
|
|
338
338
|
: '';
|
|
339
339
|
|
|
340
340
|
if (isCompact) {
|
|
341
341
|
if (telemetry.totalCount === 0) {
|
|
342
342
|
return wasTruncated
|
|
343
|
-
? `\n\n> [ZTDS: CLEAN (ZERO PII DETECTED) | TRUNCATED (${charLimit.toLocaleString()} chars) | Upgrade: https://privacyscrubber.com/pricing]\n`
|
|
343
|
+
? `\n\n> [ZTDS: CLEAN (ZERO PII DETECTED) | TRUNCATED (${charLimit.toLocaleString()} chars) | Upgrade: https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=truncation_compact&utm_campaign=pro_upgrade]\n`
|
|
344
344
|
: "\n\n> [ZTDS: CLEAN (ZERO PII DETECTED)]\n";
|
|
345
345
|
}
|
|
346
346
|
const entitiesList = Object.entries(telemetry.entities)
|
|
347
347
|
.map(([type, count]) => `${count} ${type}`)
|
|
348
348
|
.join(', ');
|
|
349
|
-
const truncNotice = wasTruncated ? ` | TRUNCATED (${charLimit.toLocaleString()} chars) | Upgrade: https://privacyscrubber.com/pricing` : '';
|
|
349
|
+
const truncNotice = wasTruncated ? ` | TRUNCATED (${charLimit.toLocaleString()} chars) | Upgrade: https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=truncation_compact&utm_campaign=pro_upgrade` : '';
|
|
350
350
|
return `\n\n> [ZTDS: ${telemetry.totalCount} masked (${entitiesList}) | Risk: ${telemetry.riskLevel} | Compliance: ${telemetry.frameworksList.join(', ')}${truncNotice}]\n`;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
if (telemetry.totalCount === 0) {
|
|
354
|
-
return `\n\n> π‘οΈ **PrivacyScrubber Audit Receipt**: CLEAN (ZERO PII DETECTED)\n${truncationLine}> * β **Star on GitHub:** [moxno/privacyscrubber-mcp](https://github.com/moxno/privacyscrubber-mcp) (\`gh repo star moxno/privacyscrubber-mcp\`) | **SDK & Enterprise:** [privacyscrubber.com/sdk](https://privacyscrubber.com/sdk
|
|
354
|
+
return `\n\n> π‘οΈ **PrivacyScrubber Audit Receipt**: CLEAN (ZERO PII DETECTED)\n${truncationLine}> * β **Star on GitHub:** [moxno/privacyscrubber-mcp](https://github.com/moxno/privacyscrubber-mcp) (\`gh repo star moxno/privacyscrubber-mcp\`) | **SDK & Enterprise:** [privacyscrubber.com/sdk](https://privacyscrubber.com/sdk/?tier=sdk&utm_source=mcp&utm_medium=audit_receipt&utm_campaign=sdk_pipeline)\n`;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
const entitiesList = Object.entries(telemetry.entities)
|
|
@@ -360,7 +360,7 @@ function formatAuditReceipt(telemetry, compact = false, wasTruncated = false, ch
|
|
|
360
360
|
|
|
361
361
|
const icon = telemetry.riskLevel.includes('CRITICAL') ? 'π΄' : (telemetry.riskLevel.includes('MODERATE') ? 'π ' : 'π’');
|
|
362
362
|
|
|
363
|
-
return `\n\n> π‘οΈ **PrivacyScrubber Audit Receipt**\n> * **Risk Level:** ${icon} ${telemetry.riskLevel}\n> * **Compliance Enforced:** ${telemetry.frameworksList.join(', ')}\n> * **Tokens Masked:** ${telemetry.totalCount} (${entitiesList})\n${truncationLine}> * β **Star on GitHub:** [moxno/privacyscrubber-mcp](https://github.com/moxno/privacyscrubber-mcp) (\`gh repo star moxno/privacyscrubber-mcp\`) | **SDK & Enterprise:** [privacyscrubber.com/sdk](https://privacyscrubber.com/sdk
|
|
363
|
+
return `\n\n> π‘οΈ **PrivacyScrubber Audit Receipt**\n> * **Risk Level:** ${icon} ${telemetry.riskLevel}\n> * **Compliance Enforced:** ${telemetry.frameworksList.join(', ')}\n> * **Tokens Masked:** ${telemetry.totalCount} (${entitiesList})\n${truncationLine}> * β **Star on GitHub:** [moxno/privacyscrubber-mcp](https://github.com/moxno/privacyscrubber-mcp) (\`gh repo star moxno/privacyscrubber-mcp\`) | **SDK & Enterprise:** [privacyscrubber.com/sdk](https://privacyscrubber.com/sdk/?tier=sdk&utm_source=mcp&utm_medium=audit_receipt&utm_campaign=sdk_pipeline)\n`;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
function formatCefEvent(eventData = {}) {
|
|
@@ -471,6 +471,325 @@ function formatJsonlEvent(eventData = {}) {
|
|
|
471
471
|
return JSON.stringify(record);
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
+
/**
|
|
475
|
+
* Generates an executive Procurement & ROI Memorandum for CISOs, DPOs, and Engineering leadership.
|
|
476
|
+
* Compares Cloud DLP TCO ($1.5kβ$4k/mo) vs PrivacyScrubber TEAMS ($99/mo) / Developer SDK ($299/mo).
|
|
477
|
+
*
|
|
478
|
+
* @param {Object} [options]
|
|
479
|
+
* @param {'teams'|'sdk'|'both'} [options.targetTier='teams'] - Target license tier.
|
|
480
|
+
* @param {string} [options.appName] - Target system or project name.
|
|
481
|
+
* @param {string} [options.developer] - Requester name or team.
|
|
482
|
+
* @param {number} [options.teamSize=10] - Size of engineering team.
|
|
483
|
+
* @param {string} [options.estimatedVolume='50M - 500M characters/month'] - Projected token volume.
|
|
484
|
+
* @param {'markdown'|'text'} [options.format='markdown'] - Output format.
|
|
485
|
+
* @returns {string}
|
|
486
|
+
*/
|
|
487
|
+
export function generateProcurementMemo(options = {}) {
|
|
488
|
+
const {
|
|
489
|
+
targetTier = 'teams',
|
|
490
|
+
appName = 'Internal AI IDE Toolchain & Workflows',
|
|
491
|
+
developer = 'Engineering / AI Platform Team',
|
|
492
|
+
format = 'markdown',
|
|
493
|
+
teamSize = 10,
|
|
494
|
+
estimatedVolume = '50M - 500M characters/month'
|
|
495
|
+
} = options;
|
|
496
|
+
|
|
497
|
+
const normalizedTier = (targetTier || 'teams').toLowerCase();
|
|
498
|
+
const dateStr = new Date().toISOString().split('T')[0];
|
|
499
|
+
|
|
500
|
+
if (normalizedTier === 'sdk') {
|
|
501
|
+
if (format === 'text') {
|
|
502
|
+
return `MEMORANDUM: ADOPTION OF PRIVACYSCRUBBER DEVELOPER SDK (ZTDS STANDARD)
|
|
503
|
+
|
|
504
|
+
TO: Chief Information Security Officer (CISO), Data Protection Officer (DPO), VP Engineering
|
|
505
|
+
FROM: ${developer}
|
|
506
|
+
DATE: ${dateStr}
|
|
507
|
+
SUBJECT: Approval Request: Zero-Trust Data Sanitization (@privacyscrubber/sdk)
|
|
508
|
+
TARGET SYSTEM: ${appName}
|
|
509
|
+
ESTIMATED VOLUME: ${estimatedVolume}
|
|
510
|
+
|
|
511
|
+
1. EXECUTIVE SUMMARY
|
|
512
|
+
We propose standardizing on the PrivacyScrubber Developer SDK (@privacyscrubber/sdk) for in-memory Zero-Trust Data Sanitization across our AI ingestion pipelines. The SDK intercepts and redacts PII, regulatory identifiers, and cloud secrets locally in RAM before any prompt leaves our infrastructure.
|
|
513
|
+
|
|
514
|
+
2. ZERO-TRUST ARCHITECTURAL INVARIANTS
|
|
515
|
+
* Zero Network Egress: 100% local in-memory processing. Zero external API calls, zero telemetry egress, zero third-party sub-processors.
|
|
516
|
+
* In-Memory Volatility: All masking maps remain in volatile process RAM and are discarded after request completion.
|
|
517
|
+
* Sub-Millisecond Latency: Executes in <0.1ms per prompt in local RAM, eliminating latency overhead.
|
|
518
|
+
|
|
519
|
+
3. COMPLIANCE & REGULATORY COVERAGE
|
|
520
|
+
Pre-configured for 30 specialized industry profiles and compliance frameworks:
|
|
521
|
+
* GDPR (Art. 4, 9, 32) & CCPA/CPRA: Ephemeral tokenization.
|
|
522
|
+
* HIPAA (Β§164.514 Safe Harbor): MRNs, medical record codes, patient identifiers.
|
|
523
|
+
* SOC 2 Type II & ISO 27001 (A.8.11): Zero persistent unencrypted PII.
|
|
524
|
+
* PCI DSS v4.0: PAN, CVV, IBAN, bank ledger sanitization.
|
|
525
|
+
* NIST SP 800-53: Cloud API keys, JWT tokens, AWS/Stripe secret leak protection.
|
|
526
|
+
* EU AI Act (Art. 50): Data minimization and 0-byte external network transmission.
|
|
527
|
+
|
|
528
|
+
4. TOTAL COST OF OWNERSHIP (TCO) COMPARISON
|
|
529
|
+
* Cloud DLP Proxies (AWS Macie, GCP DLP, Nightfall):
|
|
530
|
+
- Cost: $1,500 - $4,000 / month (usage-based billing).
|
|
531
|
+
- Latency: +200ms - 400ms added network roundtrip per AI prompt.
|
|
532
|
+
- Sub-processor Risk: Requires vendor DPA, external network egress.
|
|
533
|
+
* PrivacyScrubber Developer SDK:
|
|
534
|
+
- Cost: $299 / month flat (or $2,990 / year) for unlimited nodes, microservices, and prompts.
|
|
535
|
+
- Latency: <0.1ms (in-process RAM).
|
|
536
|
+
- Sub-processor Risk: Zero (pure in-memory software library).
|
|
537
|
+
|
|
538
|
+
5. ACTION REQUESTED
|
|
539
|
+
Approve commercial license upgrade for ${developer} (${teamSize} engineers, unlimited backend nodes):
|
|
540
|
+
* License Tier: Developer SDK ($299/month flat or $2,990/year)
|
|
541
|
+
* Direct Procurement & License Activation: https://privacyscrubber.com/pricing?tier=sdk&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=sdk_procurement
|
|
542
|
+
* Enterprise / Invoicing Contact: enterprise@privacyscrubber.com
|
|
543
|
+
`;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
return `# Internal Memo: Adoption of PrivacyScrubber Developer SDK (ZTDS Standard)
|
|
547
|
+
|
|
548
|
+
| **To** | Chief Information Security Officer (CISO), Data Protection Officer (DPO), VP Engineering |
|
|
549
|
+
| :--- | :--- |
|
|
550
|
+
| **From** | ${developer} |
|
|
551
|
+
| **Date** | ${dateStr} |
|
|
552
|
+
| **Subject** | Architectural Approval & License Procurement for Zero-Trust AI Sanitization |
|
|
553
|
+
| **Target System** | ${appName} |
|
|
554
|
+
| **Estimated Scope** | ~${teamSize} engineers / ${estimatedVolume} |
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
558
|
+
### 1. Executive Summary
|
|
559
|
+
We recommend adopting the **PrivacyScrubber Developer SDK** (\`@privacyscrubber/sdk\`) to enforce **Zero-Trust Data Sanitization (ZTDS)** across all internal AI pipelines, LangChain agents, microservices, and developer toolchains.
|
|
560
|
+
|
|
561
|
+
The SDK redacts PII, regulatory identifiers, and developer secrets **in-process before external API egress to OpenAI, Anthropic, or external LLM providers**, and deterministically restores original values upon response return.
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
### 2. Architectural Invariants (Zero-Trust Data Sanitization)
|
|
566
|
+
* **Zero Remote Network Egress:** 100% of sanitization and token restoration executes in local Node.js process RAM. No prompt data or telemetry ever leaves our VPC/infrastructure.
|
|
567
|
+
* **Ephemeral In-Memory Tokens:** Masking mappings (\`[EMAIL_1]\`, \`[NAME_1]\`, \`[SECRET_1]\`) are volatile and strictly scoped to request execution context.
|
|
568
|
+
* **Ultra-Low Latency:** Micro-benchmarks verify <0.1ms execution overhead per prompt, compared to 200β400ms for network-based cloud DLP proxies.
|
|
569
|
+
* **Full Reversibility:** Bidirectional round-trip reconstruction ensures downstream application logic receives intact responses without exposing sensitive data to model providers.
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
### 3. Compliance Framework Mapping
|
|
574
|
+
The SDK enforces out-of-the-box sanitization matching mandatory compliance controls:
|
|
575
|
+
* **GDPR (Regulation (EU) 2016/679) & CCPA/CPRA:** Eliminates cross-border PII transfer risk to third-party AI models.
|
|
576
|
+
* **HIPAA (Β§164.514 Safe Harbor):** Automated scrubbing of Medical Record Numbers (MRNs), patient identifiers, and health insurance IDs.
|
|
577
|
+
* **SOC 2 Type II & ISO 27001 (Control A.8.11):** Enforces data masking and prevents unauthorized logging of confidential client data.
|
|
578
|
+
* **PCI DSS v4.0:** Sanitization of payment cards, IBANs, and financial ledger data.
|
|
579
|
+
* **NIST SP 800-53:** DevOps secret interception for AWS keys, JWT tokens, database URIs, and private API keys.
|
|
580
|
+
* **EU AI Act (Art. 50):** Data minimization and audit receipt verification.
|
|
581
|
+
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
### 4. Financial & Architectural Comparison (TCO)
|
|
585
|
+
|
|
586
|
+
| Evaluation Factor | Traditional Cloud DLP (AWS/GCP/Nightfall) | PrivacyScrubber Developer SDK |
|
|
587
|
+
| :--- | :--- | :--- |
|
|
588
|
+
| **Pricing Model** | \$1,500 β \$4,000 / month (metered per GB/token) | **\$299 / month flat** (unlimited nodes & tokens) |
|
|
589
|
+
| **Network Egress** | Requires outbound network calls to DLP vendor | **0 bytes** (100% local Node.js process memory) |
|
|
590
|
+
| **Added Latency** | +200ms β +450ms network round-trip | **<0.1ms** (in-memory regular expressions) |
|
|
591
|
+
| **Vendor Sub-processors** | Third-party cloud vendor added to vendor list | **None** (zero-network software library) |
|
|
592
|
+
| **Deployment** | Complex API gateways and proxy configurations | \`npm install @privacyscrubber/sdk\` in 3 minutes |
|
|
593
|
+
|
|
594
|
+
---
|
|
595
|
+
|
|
596
|
+
### 5. Procurement Recommendation
|
|
597
|
+
We request approval to acquire a **Developer SDK License** (\$299/month flat or \$2,990/year) to unlock unlimited throughput across all microservices and CI/CD pipelines.
|
|
598
|
+
|
|
599
|
+
* **Direct Procurement Portal:** [https://privacyscrubber.com/pricing?tier=sdk&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=sdk_procurement](https://privacyscrubber.com/pricing?tier=sdk&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=sdk_procurement)
|
|
600
|
+
* **Procurement / Invoicing Contact:** \`enterprise@privacyscrubber.com\`
|
|
601
|
+
`;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
if (normalizedTier === 'both') {
|
|
605
|
+
if (format === 'text') {
|
|
606
|
+
return `MEMORANDUM: ENTERPRISE ADOPTION OF PRIVACYSCRUBBER (TEAMS + DEVELOPER SDK)
|
|
607
|
+
|
|
608
|
+
TO: Chief Information Security Officer (CISO), Data Protection Officer (DPO), VP Engineering
|
|
609
|
+
FROM: ${developer}
|
|
610
|
+
DATE: ${dateStr}
|
|
611
|
+
SUBJECT: Approval Request: Comprehensive Zero-Trust Data Sanitization (TEAMS + SDK)
|
|
612
|
+
TARGET SYSTEMS: AI IDEs (Cursor, Claude Desktop, Windsurf) + Backend AI Pipelines
|
|
613
|
+
ESTIMATED VOLUME: ${estimatedVolume} across ~${teamSize} engineers
|
|
614
|
+
|
|
615
|
+
1. EXECUTIVE SUMMARY
|
|
616
|
+
We propose standardizing on PrivacyScrubber across our entire AI stack:
|
|
617
|
+
1. PrivacyScrubber TEAMS ($99/mo flat): Secures developer AI IDEs (Cursor, Claude Desktop, Windsurf, Claude Code, Zed).
|
|
618
|
+
2. PrivacyScrubber Developer SDK ($299/mo flat): In-memory sanitization for backend microservices, ETL, and RAG pipelines.
|
|
619
|
+
Combined cost is $398/mo flat, completely replacing $4,000β$8,000/mo in legacy metered cloud DLP proxies with 0 network latency.
|
|
620
|
+
|
|
621
|
+
2. ZERO-TRUST ARCHITECTURAL INVARIANTS
|
|
622
|
+
* 100% Local In-Memory Processing: 0 bytes network egress, 0 third-party sub-processors.
|
|
623
|
+
* In-Memory Token Mapping: Masking maps remain in volatile RAM.
|
|
624
|
+
* Sub-Millisecond Execution: Eliminates latency overhead on developer IDEs and microservices.
|
|
625
|
+
|
|
626
|
+
3. COMPLIANCE COVERAGE
|
|
627
|
+
Pre-configured for 30 specialized industry profiles: GDPR, CCPA/CPRA, HIPAA Safe Harbor, SOC 2 Type II, PCI DSS v4.0, NIST SP 800-53, EU AI Act Art. 50.
|
|
628
|
+
|
|
629
|
+
4. TOTAL COST OF OWNERSHIP (TCO) COMPARISON
|
|
630
|
+
* Traditional Cloud DLP: $4,000 - $8,000 / month (metered usage + per-seat IDE licenses).
|
|
631
|
+
* PrivacyScrubber Bundle (TEAMS + SDK): $398 / month flat (unlimited engineers + unlimited backend nodes).
|
|
632
|
+
|
|
633
|
+
5. ACTION REQUESTED
|
|
634
|
+
Approve enterprise commercial license activation ($398/month flat):
|
|
635
|
+
* TEAMS Portal ($99/mo): https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=bundle_procurement
|
|
636
|
+
* SDK Portal ($299/mo): https://privacyscrubber.com/pricing?tier=sdk&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=bundle_procurement
|
|
637
|
+
* Enterprise Contact: enterprise@privacyscrubber.com
|
|
638
|
+
`;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
return `# Internal Memo: Enterprise Adoption of PrivacyScrubber (TEAMS + Developer SDK)
|
|
642
|
+
|
|
643
|
+
| **To** | Chief Information Security Officer (CISO), Data Protection Officer (DPO), VP Engineering |
|
|
644
|
+
| :--- | :--- |
|
|
645
|
+
| **From** | ${developer} |
|
|
646
|
+
| **Date** | ${dateStr} |
|
|
647
|
+
| **Subject** | Comprehensive Approval: Zero-Trust AI Sanitization (IDE Agents + Backend Pipelines) |
|
|
648
|
+
| **Target Systems** | ${appName} |
|
|
649
|
+
| **Estimated Scope** | ~${teamSize} engineers / ${estimatedVolume} |
|
|
650
|
+
|
|
651
|
+
---
|
|
652
|
+
|
|
653
|
+
### 1. Executive Summary
|
|
654
|
+
We recommend standardizing on **PrivacyScrubber** across our full technology stack to enforce **Zero-Trust Data Sanitization (ZTDS)**:
|
|
655
|
+
1. **PrivacyScrubber TEAMS (\$99/month flat):** Secures all developer AI IDEs (Cursor, Claude Desktop, Windsurf, Claude Code, Zed) with unlimited seats.
|
|
656
|
+
2. **PrivacyScrubber Developer SDK (\$299/month flat):** In-memory PII/secret scrubbing for backend microservices, ETL pipelines, and RAG vector databases.
|
|
657
|
+
|
|
658
|
+
Combined TCO is **\$398/month flat**, replacing **\$4,000β\$8,000/month** in legacy metered cloud DLP tools while reducing latency to <0.1ms.
|
|
659
|
+
|
|
660
|
+
---
|
|
661
|
+
|
|
662
|
+
### 2. Architectural Invariants (Zero-Trust Data Sanitization)
|
|
663
|
+
* **Zero Remote Network Egress:** 100% of sanitization executes in local process RAM (IDE developer machines and backend container VPCs).
|
|
664
|
+
* **0 Bytes Third-Party Sub-processor Liability:** Eliminates GDPR Article 28 processor transfer risks.
|
|
665
|
+
* **Deterministic Round-Trip Restoration:** Automatically detokenizes placeholders in response payloads.
|
|
666
|
+
|
|
667
|
+
---
|
|
668
|
+
|
|
669
|
+
### 3. Financial & Architectural Comparison (TCO)
|
|
670
|
+
|
|
671
|
+
| Evaluation Metric | Enterprise Cloud DLP (Nightfall, AWS Macie, GCP DLP) | PrivacyScrubber Enterprise Bundle (TEAMS + SDK) |
|
|
672
|
+
| :--- | :--- | :--- |
|
|
673
|
+
| **Monthly Cost** | \$4,000 β \$8,000 / month (per-seat + usage metered) | **\$398 / month flat** (unlimited seats & nodes) |
|
|
674
|
+
| **Network Egress** | Outbound traffic to third-party vendor clouds | **0 bytes** (100% volatile in-memory RAM) |
|
|
675
|
+
| **Added Latency** | +200ms β +450ms network round-trip per prompt | **<0.1ms** (in-process regular expression engine) |
|
|
676
|
+
| **Vendor Sub-processors** | Added to corporate DPA vendor roster | **None** (zero-network software libraries) |
|
|
677
|
+
|
|
678
|
+
---
|
|
679
|
+
|
|
680
|
+
### 4. Procurement Recommendation
|
|
681
|
+
We request approval to activate the enterprise bundle:
|
|
682
|
+
* **TEAMS License (\$99/mo flat):** [https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=bundle_procurement](https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=bundle_procurement)
|
|
683
|
+
* **Developer SDK License (\$299/mo flat):** [https://privacyscrubber.com/pricing?tier=sdk&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=bundle_procurement](https://privacyscrubber.com/pricing?tier=sdk&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=bundle_procurement)
|
|
684
|
+
* **Enterprise / Invoicing Contact:** \`enterprise@privacyscrubber.com\`
|
|
685
|
+
`;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
// Default: TEAMS ($99/mo flat)
|
|
689
|
+
if (format === 'text') {
|
|
690
|
+
return `MEMORANDUM: ADOPTION OF PRIVACYSCRUBBER TEAMS FOR AI IDES (ZTDS STANDARD)
|
|
691
|
+
|
|
692
|
+
TO: Chief Information Security Officer (CISO), Data Protection Officer (DPO), VP Engineering
|
|
693
|
+
FROM: ${developer}
|
|
694
|
+
DATE: ${dateStr}
|
|
695
|
+
SUBJECT: Approval Request: Zero-Trust AI IDE Protection & Team Governance (@privacyscrubber/mcp-server)
|
|
696
|
+
TARGET SYSTEM: ${appName}
|
|
697
|
+
ESTIMATED SCOPE: ~${teamSize} engineers / ${estimatedVolume}
|
|
698
|
+
|
|
699
|
+
1. EXECUTIVE SUMMARY
|
|
700
|
+
We propose standardizing on PrivacyScrubber TEAMS across our engineering organization for AI IDEs (Cursor, Claude Desktop, Windsurf, Claude Code, Zed, Copilot). PrivacyScrubber intercepts and scrubs proprietary source code, cloud credentials, database connection strings, and customer PII locally in developer RAM before any prompt leaves the developer's workstation.
|
|
701
|
+
|
|
702
|
+
2. ZERO-TRUST ARCHITECTURAL INVARIANTS
|
|
703
|
+
* 100% Local In-Memory Processing: 0 bytes network egress. All redaction runs directly in developer RAM via the MCP stdio protocol.
|
|
704
|
+
* Bidirectional Round-Trip Detokenization: Restores authentic secrets locally in memory before showing the AI response to the developer.
|
|
705
|
+
* In-Memory Volatility: All session token mappings remain in volatile process RAM and are discarded upon session close.
|
|
706
|
+
* Zero Sub-Processor Risk: Eliminates third-party DLP data processor liability (GDPR Art. 28).
|
|
707
|
+
|
|
708
|
+
3. COMPLIANCE & REGULATORY COVERAGE
|
|
709
|
+
Pre-configured for 30 specialized industry profiles and compliance frameworks:
|
|
710
|
+
* GDPR (Art. 4, 9, 32) & CCPA/CPRA: Ephemeral tokenization.
|
|
711
|
+
* HIPAA (Β§164.514 Safe Harbor): MRNs, medical record codes, patient identifiers.
|
|
712
|
+
* SOC 2 Type II & ISO 27001 (A.8.11): Zero persistent unencrypted PII.
|
|
713
|
+
* PCI DSS v4.0: PAN, CVV, IBAN, bank ledger sanitization.
|
|
714
|
+
* NIST SP 800-53: Cloud API keys, JWT tokens, AWS/Stripe secret leak protection.
|
|
715
|
+
* EU AI Act (Art. 50): Data minimization and 0-byte external network transmission.
|
|
716
|
+
|
|
717
|
+
4. TOTAL COST OF OWNERSHIP (TCO) COMPARISON
|
|
718
|
+
* Per-Seat Enterprise DLP (Nightfall, Cyberhaven, AWS Macie):
|
|
719
|
+
- Cost: $30 - $60 / developer / month ($300 - $600/mo for 10 devs; $3,000/mo for 50 devs).
|
|
720
|
+
- Latency: +200ms - 400ms added network roundtrip per AI interaction.
|
|
721
|
+
- Sub-processor Risk: Requires vendor DPA, external network egress.
|
|
722
|
+
* PrivacyScrubber TEAMS:
|
|
723
|
+
- Cost: $99 / month flat for the ENTIRE engineering team (unlimited seats and agents).
|
|
724
|
+
- Latency: <0.1ms (in-process RAM).
|
|
725
|
+
- Sub-processor Risk: Zero (pure local stdio MCP server).
|
|
726
|
+
|
|
727
|
+
5. ACTION REQUESTED
|
|
728
|
+
Approve commercial license upgrade for ${developer} (~${teamSize} engineers, unlimited seats):
|
|
729
|
+
* License Tier: PrivacyScrubber TEAMS ($99/month flat)
|
|
730
|
+
* Direct Procurement & License Activation: https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=teams_procurement
|
|
731
|
+
* Enterprise / Invoicing Contact: enterprise@privacyscrubber.com
|
|
732
|
+
`;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
return `# Internal Memo: Adoption of PrivacyScrubber TEAMS for AI IDEs (ZTDS Standard)
|
|
736
|
+
|
|
737
|
+
| **To** | Chief Information Security Officer (CISO), Data Protection Officer (DPO), VP Engineering |
|
|
738
|
+
| :--- | :--- |
|
|
739
|
+
| **From** | ${developer} |
|
|
740
|
+
| **Date** | ${dateStr} |
|
|
741
|
+
| **Subject** | Architectural Approval & License Procurement for Zero-Trust AI IDE Protection |
|
|
742
|
+
| **Target System** | ${appName} |
|
|
743
|
+
| **Estimated Scope** | ~${teamSize} engineers / ${estimatedVolume} |
|
|
744
|
+
|
|
745
|
+
---
|
|
746
|
+
|
|
747
|
+
### 1. Executive Summary
|
|
748
|
+
We recommend adopting **PrivacyScrubber TEAMS** (\`@privacyscrubber/mcp-server\`) to enforce **Zero-Trust Data Sanitization (ZTDS)** across all developer AI IDEs (Cursor, Claude Desktop, Windsurf, Claude Code, Zed, Copilot).
|
|
749
|
+
|
|
750
|
+
PrivacyScrubber intercepts and scrubs proprietary source code, cloud credentials (AWS, JWT, Stripe), database connection strings, and customer PII **locally in developer RAM before external API transmission to OpenAI, Anthropic, or model providers**, and deterministically restores authentic values upon response return.
|
|
751
|
+
|
|
752
|
+
---
|
|
753
|
+
|
|
754
|
+
### 2. Architectural Invariants (Zero-Trust Data Sanitization)
|
|
755
|
+
* **Zero Remote Network Egress:** 100% of sanitization and token restoration executes in local developer workstation RAM via the MCP stdio protocol. No code or credentials ever leave our machines.
|
|
756
|
+
* **Ephemeral In-Memory Tokens:** Masking mappings (\`[EMAIL_1]\`, \`[NAME_1]\`, \`[SECRET_1]\`) are volatile and strictly scoped to request execution context.
|
|
757
|
+
* **Sub-Millisecond Execution:** Micro-benchmarks verify <0.1ms execution overhead per prompt, completely eliminating latency impact on developer flow.
|
|
758
|
+
* **Zero Sub-processor Overhead:** Operates with 0 bytes outbound network traffic, eliminating GDPR Article 28 data processor liability.
|
|
759
|
+
|
|
760
|
+
---
|
|
761
|
+
|
|
762
|
+
### 3. Compliance Framework Mapping
|
|
763
|
+
PrivacyScrubber enforces out-of-the-box sanitization matching mandatory compliance controls:
|
|
764
|
+
* **GDPR (Regulation (EU) 2016/679) & CCPA/CPRA:** Eliminates cross-border PII transfer risk to third-party AI models.
|
|
765
|
+
* **HIPAA (Β§164.514 Safe Harbor):** Automated scrubbing of Medical Record Numbers (MRNs), patient identifiers, and health insurance IDs.
|
|
766
|
+
* **SOC 2 Type II & ISO 27001 (Control A.8.11):** Enforces data masking and prevents unauthorized logging of confidential client data.
|
|
767
|
+
* **PCI DSS v4.0:** Sanitization of payment cards, IBANs, and financial ledger data.
|
|
768
|
+
* **NIST SP 800-53:** DevOps secret interception for AWS keys, JWT tokens, database URIs, and private API keys.
|
|
769
|
+
* **EU AI Act (Art. 50):** Data minimization and audit receipt verification.
|
|
770
|
+
|
|
771
|
+
---
|
|
772
|
+
|
|
773
|
+
### 4. Financial & Architectural Comparison (TCO)
|
|
774
|
+
|
|
775
|
+
| Evaluation Factor | Traditional Per-Seat DLP (Nightfall, Cyberhaven) | PrivacyScrubber TEAMS |
|
|
776
|
+
| :--- | :--- | :--- |
|
|
777
|
+
| **Pricing Model** | \$30 β \$60 / user / month (\$300β\$600/mo for 10 devs) | **\$99 / month flat** (unlimited seats & agents) |
|
|
778
|
+
| **Network Egress** | Outbound network calls to vendor cloud inspection proxy | **0 bytes** (100% local workstation RAM) |
|
|
779
|
+
| **Added Latency** | +200ms β +450ms network round-trip | **<0.1ms** (in-memory regular expressions) |
|
|
780
|
+
| **Vendor Sub-processors** | Third-party cloud vendor added to vendor list | **None** (100% local stdio software) |
|
|
781
|
+
| **Deployment** | Complex enterprise proxy configuration | \`npx @privacyscrubber/mcp-server init\` in 30 seconds |
|
|
782
|
+
|
|
783
|
+
---
|
|
784
|
+
|
|
785
|
+
### 5. Procurement Recommendation
|
|
786
|
+
We request approval to acquire a **PrivacyScrubber TEAMS License** (\$99/month flat) to unlock centralized governance and unlimited protection for our engineering team.
|
|
787
|
+
|
|
788
|
+
* **Direct Procurement Portal:** [https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=teams_procurement](https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp_memo&utm_medium=ciso_memo&utm_campaign=teams_procurement)
|
|
789
|
+
* **Procurement / Invoicing Contact:** \`enterprise@privacyscrubber.com\`
|
|
790
|
+
`;
|
|
791
|
+
}
|
|
792
|
+
|
|
474
793
|
// Create the MCP server
|
|
475
794
|
const server = new Server(
|
|
476
795
|
{
|
|
@@ -1027,6 +1346,42 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
1027
1346
|
}
|
|
1028
1347
|
}
|
|
1029
1348
|
}
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
name: "generate_procurement_memo",
|
|
1352
|
+
description: "Zero-Trust Enterprise Procurement: Generates an executive-ready Procurement & ROI Memorandum for Chief Information Security Officers (CISO), Data Protection Officers (DPO), and VP of Engineering. Compares TCO of traditional Cloud DLP ($1.5kβ$4k/mo) vs PrivacyScrubber TEAMS ($99/mo flat) or Developer SDK ($299/mo flat), citing statutory frameworks (GDPR Art. 4/28, HIPAA Β§164.514, SOC 2 Type II, PCI DSS v4.0, NIST SP 800-53, EU AI Act Art. 50).",
|
|
1353
|
+
inputSchema: {
|
|
1354
|
+
type: "object",
|
|
1355
|
+
properties: {
|
|
1356
|
+
target_tier: {
|
|
1357
|
+
type: "string",
|
|
1358
|
+
enum: ["teams", "sdk", "both"],
|
|
1359
|
+
description: "Target license tier: 'teams' ($99/mo flat, for Cursor/Claude/Windsurf/IDE agents), 'sdk' ($299/mo flat, for backend microservices/RAG pipelines), or 'both'. Defaults to 'teams'."
|
|
1360
|
+
},
|
|
1361
|
+
app_name: {
|
|
1362
|
+
type: "string",
|
|
1363
|
+
description: "Target project, repository, or system name (e.g. 'Engineering AI Toolchain & Autonomous Agents'). Defaults to 'Internal AI IDE Toolchain & Workflows'."
|
|
1364
|
+
},
|
|
1365
|
+
developer: {
|
|
1366
|
+
type: "string",
|
|
1367
|
+
description: "Requester name, role, or team (e.g. 'Engineering Platform Team'). Defaults to 'Engineering / AI Platform Team'."
|
|
1368
|
+
},
|
|
1369
|
+
team_size: {
|
|
1370
|
+
type: "number",
|
|
1371
|
+
description: "Size of engineering team / seats. Defaults to 10."
|
|
1372
|
+
},
|
|
1373
|
+
estimated_volume: {
|
|
1374
|
+
type: "string",
|
|
1375
|
+
description: "Projected prompt or token volume. Defaults to '50M - 500M characters/month'."
|
|
1376
|
+
},
|
|
1377
|
+
format: {
|
|
1378
|
+
type: "string",
|
|
1379
|
+
enum: ["markdown", "text"],
|
|
1380
|
+
description: "Output format: 'markdown' (default) or 'text'."
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
required: []
|
|
1384
|
+
}
|
|
1030
1385
|
}
|
|
1031
1386
|
]
|
|
1032
1387
|
};
|
|
@@ -1281,13 +1636,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1281
1636
|
if (limitStatus.blocked) {
|
|
1282
1637
|
return {
|
|
1283
1638
|
isError: true,
|
|
1284
|
-
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing` }]
|
|
1639
|
+
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=daily_limit&utm_campaign=pro_upgrade` }]
|
|
1285
1640
|
};
|
|
1286
1641
|
}
|
|
1287
1642
|
|
|
1288
1643
|
const charLimit = (isAdvanced && !isAutoElevated && !license.isPro) ? 5000 : 15000;
|
|
1289
1644
|
if (isAdvanced && !license.isPro) {
|
|
1290
|
-
mcpLog(`${colors.yellowBold}[PrivacyScrubber] Profile '${targetProfile}' active on Free Tier (5,000 char trial quota).${colors.reset}\n${colors.cyan}[Upgrade] Commercial TEAMS ($99/mo flat) & Developer SDK ($299/mo): https://privacyscrubber.com/pricing${colors.reset}\n`);
|
|
1645
|
+
mcpLog(`${colors.yellowBold}[PrivacyScrubber] Profile '${targetProfile}' active on Free Tier (5,000 char trial quota).${colors.reset}\n${colors.cyan}[Upgrade] Commercial TEAMS ($99/mo flat) & Developer SDK ($299/mo): https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp&utm_medium=profile_quota&utm_campaign=teams_upgrade${colors.reset}\n`);
|
|
1291
1646
|
}
|
|
1292
1647
|
|
|
1293
1648
|
const { processedText, wasTruncated } = truncateIfFree(text, license.isPro, charLimit);
|
|
@@ -1452,13 +1807,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1452
1807
|
if (limitStatus.blocked) {
|
|
1453
1808
|
return {
|
|
1454
1809
|
isError: true,
|
|
1455
|
-
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing` }]
|
|
1810
|
+
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=daily_limit&utm_campaign=pro_upgrade` }]
|
|
1456
1811
|
};
|
|
1457
1812
|
}
|
|
1458
1813
|
|
|
1459
1814
|
const charLimit = (isAdvanced && !license.isPro) ? 5000 : 15000;
|
|
1460
1815
|
if (isAdvanced && !license.isPro) {
|
|
1461
|
-
mcpLog(`${colors.yellowBold}[PrivacyScrubber] Profile '${targetProfile}' active on Free Tier (5,000 char trial quota).${colors.reset}\n${colors.cyan}[Upgrade] Commercial TEAMS ($99/mo flat) & Developer SDK ($299/mo): https://privacyscrubber.com/pricing${colors.reset}\n`);
|
|
1816
|
+
mcpLog(`${colors.yellowBold}[PrivacyScrubber] Profile '${targetProfile}' active on Free Tier (5,000 char trial quota).${colors.reset}\n${colors.cyan}[Upgrade] Commercial TEAMS ($99/mo flat) & Developer SDK ($299/mo): https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp&utm_medium=profile_quota&utm_campaign=teams_upgrade${colors.reset}\n`);
|
|
1462
1817
|
}
|
|
1463
1818
|
|
|
1464
1819
|
const { processedText: processedContent, wasTruncated } = truncateIfFree(content, license.isPro, charLimit);
|
|
@@ -1495,7 +1850,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1495
1850
|
content: [
|
|
1496
1851
|
{
|
|
1497
1852
|
type: "text",
|
|
1498
|
-
text: `π [PrivacyScrubber PRO] Sanitizing ${isPdf ? 'PDF' : 'Excel/XLSX'} files is a PRO feature.\n\nπ Set your PRIVACYSCRUBBER_KEY environment variable to a valid PRO license key.\nπ Upgrade at: https://privacyscrubber.com/pricing?utm_source=mcp_cli&utm_medium=
|
|
1853
|
+
text: `π [PrivacyScrubber PRO] Sanitizing ${isPdf ? 'PDF' : 'Excel/XLSX'} files is a PRO feature.\n\nπ Set your PRIVACYSCRUBBER_KEY environment variable to a valid PRO license key.\nπ Upgrade at: https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp_cli&utm_medium=file_type&utm_campaign=pro_upgrade\nπ Alternatively, sanitize plain text, code, CSV, and DOCX files for free.`
|
|
1499
1854
|
}
|
|
1500
1855
|
]
|
|
1501
1856
|
};
|
|
@@ -1605,13 +1960,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1605
1960
|
if (limitStatus.blocked) {
|
|
1606
1961
|
return {
|
|
1607
1962
|
isError: true,
|
|
1608
|
-
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing` }]
|
|
1963
|
+
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=daily_limit&utm_campaign=pro_upgrade` }]
|
|
1609
1964
|
};
|
|
1610
1965
|
}
|
|
1611
1966
|
|
|
1612
1967
|
const charLimit = (isAdvanced && !isAutoElevated && !license.isPro) ? 5000 : 15000;
|
|
1613
1968
|
if (isAdvanced && !license.isPro) {
|
|
1614
|
-
mcpLog(`${colors.yellowBold}[PrivacyScrubber] Profile '${targetProfile}' active on Free Tier (5,000 char trial quota).${colors.reset}\n${colors.cyan}[Upgrade] Commercial TEAMS ($99/mo flat) & Developer SDK ($299/mo): https://privacyscrubber.com/pricing${colors.reset}\n`);
|
|
1969
|
+
mcpLog(`${colors.yellowBold}[PrivacyScrubber] Profile '${targetProfile}' active on Free Tier (5,000 char trial quota).${colors.reset}\n${colors.cyan}[Upgrade] Commercial TEAMS ($99/mo flat) & Developer SDK ($299/mo): https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp&utm_medium=profile_quota&utm_campaign=teams_upgrade${colors.reset}\n`);
|
|
1615
1970
|
}
|
|
1616
1971
|
|
|
1617
1972
|
const { processedText: processedContent2, wasTruncated } = truncateIfFree(content, license.isPro, charLimit);
|
|
@@ -1653,7 +2008,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1653
2008
|
if (limitStatus.blocked) {
|
|
1654
2009
|
return {
|
|
1655
2010
|
isError: true,
|
|
1656
|
-
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing` }]
|
|
2011
|
+
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=daily_limit&utm_campaign=pro_upgrade` }]
|
|
1657
2012
|
};
|
|
1658
2013
|
}
|
|
1659
2014
|
const localSessionMap = {};
|
|
@@ -1692,7 +2047,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1692
2047
|
}
|
|
1693
2048
|
|
|
1694
2049
|
if (isSecretLeak) {
|
|
1695
|
-
return { isError: true, content: [{ type: "text", text: `Error: API Key or Secret detected. Sanitization of raw secrets requires PRO Profile. Upgrade at https://privacyscrubber.com/pricing?utm_source=mcp_cli&utm_medium=
|
|
2050
|
+
return { isError: true, content: [{ type: "text", text: `Error: API Key or Secret detected. Sanitization of raw secrets requires PRO Profile. Upgrade at https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp_cli&utm_medium=secrets_detected&utm_campaign=pro_upgrade` }] };
|
|
1696
2051
|
}
|
|
1697
2052
|
|
|
1698
2053
|
if (!no_backup) {
|
|
@@ -1825,12 +2180,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1825
2180
|
lines.push(
|
|
1826
2181
|
'β β
PRO is active. All features unlocked. β',
|
|
1827
2182
|
'β To regenerate your key or manage billing: β',
|
|
1828
|
-
'β https://privacyscrubber.com/pricing?utm_source=
|
|
2183
|
+
'β https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp_status&utm_medium=terminalβ'
|
|
1829
2184
|
);
|
|
1830
2185
|
} else {
|
|
1831
2186
|
lines.push(
|
|
1832
2187
|
'β π³ Upgrade to PRO β $110 Lifetime β',
|
|
1833
|
-
'β https://privacyscrubber.com/pricing?utm_source=
|
|
2188
|
+
'β https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp_status&utm_medium=terminalβ',
|
|
1834
2189
|
'β βββββββββββββββββββββββββββββββββββββββββββββββββββ£',
|
|
1835
2190
|
'β After purchase, add your key to MCP config: β',
|
|
1836
2191
|
'β β',
|
|
@@ -1892,7 +2247,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1892
2247
|
if (limitStatus.blocked) {
|
|
1893
2248
|
return {
|
|
1894
2249
|
isError: true,
|
|
1895
|
-
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing` }]
|
|
2250
|
+
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Please set your PRO license key to continue. Get a key at: https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=daily_limit&utm_campaign=pro_upgrade` }]
|
|
1896
2251
|
};
|
|
1897
2252
|
}
|
|
1898
2253
|
|
|
@@ -2050,7 +2405,7 @@ ${telemetry.frameworksList.map(f => `- **${f}**`).join('\n')}
|
|
|
2050
2405
|
if (limitStatus.blocked) {
|
|
2051
2406
|
return {
|
|
2052
2407
|
isError: true,
|
|
2053
|
-
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Get a PRO key at https://privacyscrubber.com/pricing` }]
|
|
2408
|
+
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Get a PRO key at https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=daily_limit&utm_campaign=pro_upgrade` }]
|
|
2054
2409
|
};
|
|
2055
2410
|
}
|
|
2056
2411
|
|
|
@@ -2134,7 +2489,7 @@ ${telemetry.frameworksList.map(f => `- **${f}**`).join('\n')}
|
|
|
2134
2489
|
if (limitStatus.blocked) {
|
|
2135
2490
|
return {
|
|
2136
2491
|
isError: true,
|
|
2137
|
-
content: [{ type: "text", text: `Error: Free tier daily limit exhausted. Get a PRO key at https://privacyscrubber.com/pricing` }]
|
|
2492
|
+
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Get a PRO key at https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=daily_limit&utm_campaign=pro_upgrade` }]
|
|
2138
2493
|
};
|
|
2139
2494
|
}
|
|
2140
2495
|
|
|
@@ -2178,7 +2533,7 @@ ${telemetry.frameworksList.map(f => `- **${f}**`).join('\n')}
|
|
|
2178
2533
|
if (limitStatus.blocked) {
|
|
2179
2534
|
return {
|
|
2180
2535
|
isError: true,
|
|
2181
|
-
content: [{ type: "text", text: `Error: Free tier daily limit exhausted. Get a PRO key at https://privacyscrubber.com/pricing` }]
|
|
2536
|
+
content: [{ type: "text", text: `Error: Free tier daily limit exhausted (${FREE_TIER_DAILY_LIMIT} requests). Get a PRO key at https://privacyscrubber.com/pricing?tier=pro&utm_source=mcp&utm_medium=daily_limit&utm_campaign=pro_upgrade` }]
|
|
2182
2537
|
};
|
|
2183
2538
|
}
|
|
2184
2539
|
|
|
@@ -2658,8 +3013,8 @@ Before reading sensitive files, running terminal commands that may print credent
|
|
|
2658
3013
|
zero_egress_verified: true,
|
|
2659
3014
|
verification_url: `https://privacyscrubber.com/features/audit-receipt/#verify?hash=${sessionHash.substring(0, 16)}`,
|
|
2660
3015
|
licensing_and_governance: {
|
|
2661
|
-
teams_governance_url: "https://privacyscrubber.com/teams?
|
|
2662
|
-
sdk_pipeline_url: "https://privacyscrubber.com/sdk/?
|
|
3016
|
+
teams_governance_url: "https://privacyscrubber.com/teams?tier=teams&utm_source=mcp_audit_export&utm_medium=json&utm_campaign=teams_upgrade",
|
|
3017
|
+
sdk_pipeline_url: "https://privacyscrubber.com/sdk/?tier=sdk&utm_source=mcp_audit_export&utm_medium=json&utm_campaign=sdk_pipeline"
|
|
2663
3018
|
}
|
|
2664
3019
|
}, null, 2);
|
|
2665
3020
|
} else if (format === "markdown") {
|
|
@@ -2690,8 +3045,8 @@ ${telemetry.frameworksList.map(f => `- **${f}**`).join('\n')}
|
|
|
2690
3045
|
3. **Cryptographic Verification:** Tamper-evident session verification hash: \`${sessionHash}\`
|
|
2691
3046
|
|
|
2692
3047
|
### π’ Enterprise & Team Governance
|
|
2693
|
-
* **Team Governance & Encrypted Handoff:** Centrally deploy redaction rules, audit logs, and zero-knowledge session handoff with **PrivacyScrubber TEAMS** ($99/mo flat): [privacyscrubber.com/teams](https://privacyscrubber.com/teams?
|
|
2694
|
-
* **Backend Microservices & RAG Pipelines:** Integrate in-memory sanitization (<1ms) into your Node.js/Python infrastructure with **Developer SDK** ($299/mo): [privacyscrubber.com/sdk](https://privacyscrubber.com/sdk/?
|
|
3048
|
+
* **Team Governance & Encrypted Handoff:** Centrally deploy redaction rules, audit logs, and zero-knowledge session handoff with **PrivacyScrubber TEAMS** ($99/mo flat): [privacyscrubber.com/teams](https://privacyscrubber.com/teams?tier=teams&utm_source=mcp_audit_export&utm_medium=markdown&utm_campaign=teams_upgrade)
|
|
3049
|
+
* **Backend Microservices & RAG Pipelines:** Integrate in-memory sanitization (<1ms) into your Node.js/Python infrastructure with **Developer SDK** ($299/mo): [privacyscrubber.com/sdk](https://privacyscrubber.com/sdk/?tier=sdk&utm_source=mcp_audit_export&utm_medium=markdown&utm_campaign=sdk_pipeline)
|
|
2695
3050
|
|
|
2696
3051
|
*Certified Offline by PrivacyScrubber Engine v${MCP_VERSION}*
|
|
2697
3052
|
*Verify at: https://privacyscrubber.com/features/audit-receipt/* | β *Star on GitHub: https://github.com/moxno/privacyscrubber-mcp*`;
|
|
@@ -2723,6 +3078,33 @@ ${telemetry.frameworksList.map(f => `- **${f}**`).join('\n')}
|
|
|
2723
3078
|
};
|
|
2724
3079
|
}
|
|
2725
3080
|
|
|
3081
|
+
if (name === "generate_procurement_memo") {
|
|
3082
|
+
const {
|
|
3083
|
+
target_tier = "teams",
|
|
3084
|
+
app_name = "Internal AI IDE Toolchain & Workflows",
|
|
3085
|
+
developer = "Engineering / AI Platform Team",
|
|
3086
|
+
team_size = 10,
|
|
3087
|
+
estimated_volume = "50M - 500M characters/month",
|
|
3088
|
+
format = "markdown"
|
|
3089
|
+
} = args || {};
|
|
3090
|
+
|
|
3091
|
+
const memo = generateProcurementMemo({
|
|
3092
|
+
targetTier: target_tier,
|
|
3093
|
+
appName: app_name,
|
|
3094
|
+
developer,
|
|
3095
|
+
teamSize: team_size,
|
|
3096
|
+
estimatedVolume: estimated_volume,
|
|
3097
|
+
format
|
|
3098
|
+
});
|
|
3099
|
+
|
|
3100
|
+
return {
|
|
3101
|
+
content: [{
|
|
3102
|
+
type: "text",
|
|
3103
|
+
text: memo
|
|
3104
|
+
}]
|
|
3105
|
+
};
|
|
3106
|
+
}
|
|
3107
|
+
|
|
2726
3108
|
return {
|
|
2727
3109
|
isError: true,
|
|
2728
3110
|
content: [{ type: "text", text: `Unknown tool: ${name}` }]
|
|
@@ -2830,6 +3212,15 @@ function performSanitization(text, profile, ignoreList = null, customSessionMap
|
|
|
2830
3212
|
targetMap[token] = original;
|
|
2831
3213
|
newTokens[token] = original;
|
|
2832
3214
|
});
|
|
3215
|
+
|
|
3216
|
+
// Bounded in-memory FIFO pruning to prevent OOM during massive continuous RAG ingestion
|
|
3217
|
+
const keys = Object.keys(targetMap);
|
|
3218
|
+
if (keys.length > MAX_SESSION_TOKENS) {
|
|
3219
|
+
const pruneCount = keys.length - MAX_SESSION_TOKENS;
|
|
3220
|
+
for (let i = 0; i < pruneCount; i++) {
|
|
3221
|
+
delete targetMap[keys[i]];
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
2833
3224
|
}
|
|
2834
3225
|
|
|
2835
3226
|
return { scrubbedText: result.scrubbedText, newTokens };
|
|
@@ -2837,8 +3228,8 @@ function performSanitization(text, profile, ignoreList = null, customSessionMap
|
|
|
2837
3228
|
|
|
2838
3229
|
function truncateIfFree(text, isPro, charLimit = 15000) {
|
|
2839
3230
|
if (!isPro && text.length > charLimit) {
|
|
2840
|
-
mcpLog(`${colors.yellowBold}[PrivacyScrubber] Input truncated to ${charLimit.toLocaleString()} characters (Free Tier Limit).${colors.reset}\n${colors.cyan}[Upgrade] Set PRIVACYSCRUBBER_KEY to your PRO/TEAMS/SDK license key for unlimited throughput: https://privacyscrubber.com/pricing${colors.reset}\n`);
|
|
2841
|
-
const upsellNotice = `\n\n[PrivacyScrubber Free Tier: Payload truncated to ${charLimit.toLocaleString()} chars. Upgrade to PRO ($15/mo or $110 Lifetime) or Developer SDK ($299/mo) for unlimited payload processing: https://privacyscrubber.com/pricing]`;
|
|
3231
|
+
mcpLog(`${colors.yellowBold}[PrivacyScrubber] Input truncated to ${charLimit.toLocaleString()} characters (Free Tier Limit).${colors.reset}\n${colors.cyan}[Upgrade] Set PRIVACYSCRUBBER_KEY to your PRO/TEAMS/SDK license key for unlimited throughput: https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp&utm_medium=truncation&utm_campaign=teams_upgrade${colors.reset}\n`);
|
|
3232
|
+
const upsellNotice = `\n\n[PrivacyScrubber Free Tier: Payload truncated to ${charLimit.toLocaleString()} chars. Upgrade to PRO ($15/mo or $110 Lifetime) or Developer SDK ($299/mo) for unlimited payload processing: https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp&utm_medium=truncation&utm_campaign=teams_upgrade]`;
|
|
2842
3233
|
return { processedText: text.substring(0, charLimit), wasTruncated: true, upsellNotice, charLimit };
|
|
2843
3234
|
}
|
|
2844
3235
|
return { processedText: text, wasTruncated: false, upsellNotice: "", charLimit };
|
|
@@ -2858,7 +3249,7 @@ server.connect(transport).then(() => {
|
|
|
2858
3249
|
mcpLog(`${colors.cyan}[Architecture] 100% Local In-Memory RAM | 0 Bytes Network Egress${colors.reset}\n`);
|
|
2859
3250
|
mcpLog(`${licenseNotice}\n`);
|
|
2860
3251
|
mcpLog(`${colors.dim}[Developer SDK] In-code headless redaction: npm install @privacyscrubber/sdk${colors.reset}\n`);
|
|
2861
|
-
mcpLog(`${colors.dim}[TEAMS & Enterprise] Multi-seat governance & Air-gap: https://privacyscrubber.com/pricing${colors.reset}\n`);
|
|
3252
|
+
mcpLog(`${colors.dim}[TEAMS & Enterprise] Multi-seat governance & Air-gap: https://privacyscrubber.com/pricing?tier=teams&utm_source=mcp_banner&utm_medium=terminal&utm_campaign=teams_upgrade${colors.reset}\n`);
|
|
2862
3253
|
mcpLog(`${colors.yellow}[GitHub] Public Server Repository: https://github.com/moxno/privacyscrubber-mcp${colors.reset}\n`);
|
|
2863
3254
|
mcpLog(`${colors.cyanBold}======================================================================${colors.reset}\n\n`);
|
|
2864
3255
|
}).catch((error) => {
|