@privacyscrubber/mcp-server 2.0.3 β†’ 2.2.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/README.md CHANGED
@@ -2,11 +2,16 @@
2
2
 
3
3
  [![NPM Version](https://img.shields.io/npm/v/@privacyscrubber/mcp-server?color=blue)](https://www.npmjs.com/package/@privacyscrubber/mcp-server)
4
4
  [![NPM Downloads](https://img.shields.io/npm/dm/@privacyscrubber/mcp-server?color=3b82f6)](https://www.npmjs.com/package/@privacyscrubber/mcp-server)
5
+ [![NPM SDK](https://img.shields.io/npm/v/@privacyscrubber/sdk?label=%40privacyscrubber%2Fsdk&color=10b981)](https://www.npmjs.com/package/@privacyscrubber/sdk)
5
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
7
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.22058770.svg)](https://zenodo.org/records/22058770)
7
8
  [![OSF DOI](https://img.shields.io/badge/OSF%20DOI-10.17605%2FOSF.IO%2F5BYJF-blue.svg)](https://osf.io/5byjf/)
8
9
  [![SSRN](https://img.shields.io/badge/SSRN-7335581-darkred.svg)](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7335581)
9
10
  [![smithery badge](https://smithery.ai/badge/privacyscrubber/pii-masking-mcp)](https://smithery.ai/servers/privacyscrubber/pii-masking-mcp)
11
+ [![Cursor Directory](https://img.shields.io/badge/Cursor%20Directory-Verified%20Plugin-000000.svg)](https://cursor.directory/plugins/privacyscrubber-mcp)
12
+ [![Glama.ai](https://glama.ai/mcp/servers/moxno/privacyscrubber-mcp/badge)](https://glama.ai/mcp/servers/moxno/privacyscrubber-mcp)
13
+ [![TensorBlock MCP Index](https://img.shields.io/badge/TensorBlock-Indexed%20MCP-FF6B6B.svg)](https://github.com/TensorBlock/awesome-mcp-servers)
14
+ [![There's An AI For That](https://img.shields.io/badge/There's_An_AI_For_That-Live-06b6d4.svg)](https://theresanaiforthat.com/ai/privacy-scrubber/)
10
15
  [![Security: 100% Local](https://img.shields.io/badge/Security-100%25%20Local-emerald)](https://privacyscrubber.com)
11
16
  [![Parity: 100% Core Match](https://img.shields.io/badge/Parity-100%25%20Core%20Match-blueviolet)](https://privacyscrubber.com)
12
17
 
@@ -43,6 +48,23 @@ Run the server directly without local installation:
43
48
  npx -y @privacyscrubber/mcp-server
44
49
  ```
45
50
 
51
+ ### 3. Programmatic Node.js / TypeScript SDK
52
+ Need direct, in-memory zero-trust PII sanitization in your backend microservice or custom AI agent rather than an MCP server? Use our official zero-dependency SDK:
53
+
54
+ ```bash
55
+ npm install @privacyscrubber/sdk
56
+ ```
57
+
58
+ ```javascript
59
+ import OpenAI from 'openai';
60
+ import { wrapOpenAI } from '@privacyscrubber/sdk';
61
+
62
+ // Transparently masks PII before sending to LLM and rehydrates responses:
63
+ const openai = wrapOpenAI(new OpenAI({ apiKey: process.env.OPENAI_API_KEY }));
64
+ ```
65
+
66
+ πŸ‘‰ [View @privacyscrubber/sdk on NPM](https://www.npmjs.com/package/@privacyscrubber/sdk) | Includes `wrapOpenAI()` middleware, TypeScript definitions, and 25 compliance profiles.
67
+
46
68
  ---
47
69
 
48
70
  ## βš™οΈ Client Integrations
@@ -74,6 +96,28 @@ Add this to your Claude Desktop config file:
74
96
  * **Command:** `npx -y @privacyscrubber/mcp-server`
75
97
  3. Optional: Set `PRIVACYSCRUBBER_KEY` as an environment variable in your system shell.
76
98
 
99
+ ### Cline / Roo Code
100
+ Add to `cline_mcp_settings.json`:
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "privacyscrubber": {
105
+ "command": "npx",
106
+ "args": ["-y", "@privacyscrubber/mcp-server"],
107
+ "env": {
108
+ "PRIVACYSCRUBBER_KEY": "YOUR_OPTIONAL_PRO_LICENSE_KEY"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ ### Claude Code CLI
116
+ Add directly from your terminal:
117
+ ```bash
118
+ claude mcp add privacyscrubber -- npx -y @privacyscrubber/mcp-server
119
+ ```
120
+
77
121
  ---
78
122
 
79
123
  ## πŸ› οΈ Provided Tools & JSON-RPC Specifications
@@ -145,35 +189,47 @@ Reads a local file, extracts text, sanitizes it, and returns the redacted templa
145
189
  * `filePath` (string, required): Absolute file path to read and sanitize.
146
190
  * `profile` (string, optional): The industry detection profile.
147
191
 
148
- ---
192
+ ### 4. `guard_exec` (Command Execution Firewall)
193
+ Safely executes terminal commands in an isolated child process, masking stdout/stderr PII, database credentials, and API keys in local RAM before passing them to the AI agent. Includes a CISO audit receipt in stderr.
149
194
 
150
- ## 🌐 Browser Extension & Web Client
195
+ * **Arguments:**
196
+ * `command` (string, required): The shell command to execute (e.g. `cat .env`, `docker logs web`, `git diff`).
197
+ * `cwd` (string, optional): Working directory.
198
+ * `profile` (string, optional): Detection profile (defaults to `Dev`).
199
+ * `timeout_ms` (number, optional): Timeout in ms (defaults to `15000`).
151
200
 
152
- Looking for real-time protection directly inside your web browser?
153
- * **Chrome Extension:** Get the [PrivacyScrubber Chrome Extension](https://chromewebstore.google.com/detail/privacyscrubber-%E2%80%94-pii-red/pimoejgefeilajmmbpghifdmhdlkgjol) to sanitize prompts directly inside ChatGPT, Claude, and Gemini in real-time.
154
- * **Web Sandbox:** Use the zero-server browser sanitization tools at [PrivacyScrubber Homepage](https://privacyscrubber.com/?utm_source=npm&utm_medium=readme&utm_campaign=mcp_server).
201
+ ### 5. `guard_read_file` (Credential-Masking File Reader)
202
+ Reads files (.env, configs, source code, database dumps) and tokenizes all passwords, JWTs, and PII in volatile memory, returning safe redacted content for AI reasoning.
155
203
 
156
- ## πŸ“„ License & Commercial Upgrade
204
+ * **Arguments:**
205
+ * `file_path` (string, required): Path to file.
206
+ * `profile` (string, optional): Detection profile (defaults to `Dev`).
207
+ * `max_lines` (number, optional): Line cap for large files (defaults to `500`).
157
208
 
158
- By default, the server runs under the **Free Tier** (restricted to 50,000 characters per request and the basic `General` PII profile). To unlock advanced engineering, medical, legal, and financial PII profiles, as well as team-wide custom rules, you can purchase a commercial license.
209
+ ### 6. `guard_git_diff` (Pre-Commit & Diff Sanitizer)
210
+ Inspects staged (`--cached`) or unstaged repository diffs, redacting any newly introduced secrets or PII in local RAM before AI code review or commit message generation.
159
211
 
160
- ### Feature Comparison
212
+ * **Arguments:**
213
+ * `staged` (boolean, optional): If `true`, inspects staged changes (`git diff --cached`). Defaults to `false`.
214
+ * `cwd` (string, optional): Working directory.
215
+ * `profile` (string, optional): Detection profile (defaults to `Dev`).
161
216
 
162
- | Feature | Free Tier | PRO Tier | TEAMS Tier |
163
- | :--- | :--- | :--- | :--- |
164
- | **Volatile Tokenization** | βœ… Yes | βœ… Yes | βœ… Yes |
165
- | **Standard PII Masking** | βœ… Yes | βœ… Yes | βœ… Yes |
166
- | **Max Character Length** | 50,000 chars | ♾️ Unlimited | ♾️ Unlimited |
167
- | **Industry Profiles** | General Only | 22+ Profiles | 22+ Profiles |
168
- | **Custom Regex Rules** | ❌ Locked | ♾️ Unlimited | ♾️ Unlimited |
169
- | **Team Rules Sync (GPO)** | ❌ No | ❌ No | βœ… Yes (Shared Link) |
170
- | **Licensing Cost** | $0 | **$110 Lifetime** | **$99/mo Flat Rate** |
217
+ ### 7. `guard_apply_patch` (Safe Patch Applicator)
218
+ Reverses token placeholders (`[API_KEY_1]`, `[SECRET_1]`) in AI-generated code or text by looking up the local RAM session map, creating a `.bak` backup, and writing authentic cleartext directly to disk. The remote LLM never sees real secrets.
171
219
 
172
- πŸ‘‰ **[Acquire a PRO / TEAMS License Key at privacyscrubber.com/pricing](https://privacyscrubber.com/pricing?utm_source=npm&utm_medium=readme&utm_campaign=mcp_server)**
220
+ * **Arguments:**
221
+ * `file_path` (string, required): Path to target file.
222
+ * `content` (string, required): Content containing tokens to restore on disk.
223
+ * `create_backup` (boolean, optional): Backup existing file before write (defaults to `true`).
173
224
 
174
- ---
225
+ ### 8. `create_agent_rules` (1-Click Agent Rule Injection)
226
+ Automatically scaffolds CISO-grade Zero-Trust directives into `.cursorrules`, `.windsurfrules`, `CLAUDE.md`, `.github/copilot-instructions.md`, or `.clinerules`.
175
227
 
176
- ### 4. `check_status`
228
+ * **Arguments:**
229
+ * `agent_types` (array, optional): `["all"]`, `["cursor"]`, `["windsurf"]`, `["claude_code"]`, `["copilot"]`, `["cline"]`. Defaults to `["all"]`.
230
+ * `workspace_dir` (string, optional): Workspace directory.
231
+
232
+ ### 9. `check_status`
177
233
 
178
234
  Returns a visual dashboard showing your current tier, session request count, active profiles, and upgrade instructions. Use it at any time to check your license status or get setup help.
179
235
 
@@ -188,13 +244,13 @@ Returns a visual dashboard showing your current tier, session request count, act
188
244
  * **Response Example (Free Tier):**
189
245
  ```
190
246
  ╔══════════════════════════════════════════════════╗
191
- β•‘ PrivacyScrubber MCP Server v1.6.6 β•‘
247
+ β•‘ PrivacyScrubber MCP Server v2.2.0 β•‘
192
248
  ╠══════════════════════════════════════════════════╣
193
249
  β•‘ πŸ”“ Tier: FREE β•‘
194
250
  β•‘ πŸ“Š Session requests: 5 β•‘
195
- β•‘ πŸ“ Input size limit: 50,000 characters per requestβ•‘
251
+ β•‘ πŸ“ Input size limit: 15,000 characters/request β•‘
196
252
  ╠══════════════════════════════════════════════════╣
197
- β•‘ 🏷️ Profiles: General only β€” PRO unlocks 22 more β•‘
253
+ β•‘ 🏷️ Profiles: General only β€” PRO unlocks 25 more β•‘
198
254
  β•‘ πŸ“‹ Custom rules: πŸ”’ Locked β€” requires PRO β•‘
199
255
  ╠══════════════════════════════════════════════════╣
200
256
  β•‘ πŸ’³ Upgrade to PRO β€” $110 Lifetime β•‘
@@ -209,6 +265,52 @@ Returns a visual dashboard showing your current tier, session request count, act
209
265
 
210
266
  ---
211
267
 
268
+ ## πŸ›‘οΈ Standalone CLI: `ps-guard`
269
+
270
+ PrivacyScrubber bundles `ps-guard` for Unix pipe, pre-commit, and agentic workflows:
271
+
272
+ ```bash
273
+ # Pipe any output through RAM redaction
274
+ cat .env | npx ps-guard --profile dev
275
+
276
+ # Execute commands through the ZTDS safety wrapper
277
+ npx ps-guard -- npm test
278
+
279
+ # Review git diff with secrets redacted
280
+ npx ps-guard --diff --staged
281
+
282
+ # Generate rules for all AI IDEs (.cursorrules, .windsurfrules, CLAUDE.md, copilot, cline)
283
+ npx ps-guard --rules
284
+ ```
285
+
286
+ ---
287
+
288
+ ## 🌐 Browser Extension & Web Client
289
+
290
+ Looking for real-time protection directly inside your web browser?
291
+ * **Chrome Extension:** Get the [PrivacyScrubber Chrome Extension](https://chromewebstore.google.com/detail/privacyscrubber-%E2%80%94-pii-red/pimoejgefeilajmmbpghifdmhdlkgjol) to sanitize prompts directly inside ChatGPT, Claude, and Gemini in real-time.
292
+ * **Web Sandbox:** Use the zero-server browser sanitization tools at [PrivacyScrubber Homepage](https://privacyscrubber.com/?utm_source=npm&utm_medium=readme&utm_campaign=mcp_server).
293
+
294
+ ## πŸ“„ License & Commercial Upgrade
295
+
296
+ By default, the server runs under the **Free Tier** (restricted to 15,000 characters per request and the basic `General` PII profile). To unlock 25 specialized engineering, medical, legal, and financial PII profiles, as well as team-wide custom rules, you can purchase a commercial license.
297
+
298
+ ### Feature Comparison
299
+
300
+ | Feature | Free Tier | PRO Tier | TEAMS Tier |
301
+ | :--- | :--- | :--- | :--- |
302
+ | **Volatile Tokenization** | βœ… Yes | βœ… Yes | βœ… Yes |
303
+ | **Standard PII Masking** | βœ… Yes | βœ… Yes | βœ… Yes |
304
+ | **Max Character Length** | 15,000 chars | ♾️ Unlimited | ♾️ Unlimited |
305
+ | **Industry Profiles** | General Only | 25 Profiles | 25 Profiles |
306
+ | **Custom Regex Rules** | ❌ Locked | ♾️ Unlimited | ♾️ Unlimited |
307
+ | **Team Rules Sync (GPO)** | ❌ No | ❌ No | βœ… Yes (Shared Link) |
308
+ | **Licensing Cost** | $0 | **$110 Lifetime** | **$99/mo Flat Rate** |
309
+
310
+ πŸ‘‰ **[Acquire a PRO / TEAMS License Key at privacyscrubber.com/pricing](https://privacyscrubber.com/pricing?utm_source=npm&utm_medium=readme&utm_campaign=mcp_server)**
311
+
312
+ ---
313
+
212
314
  ## πŸ” After Purchase: Activate PRO in Your MCP Client
213
315
 
214
316
  After purchasing a PRO license at [privacyscrubber.com/pricing](https://privacyscrubber.com/pricing?utm_source=npm&utm_medium=readme&utm_campaign=mcp_server), you will receive a license key. Add it to your MCP client config as an environment variable: `PRIVACYSCRUBBER_KEY`.
package/bundle.mcpb ADDED
Binary file