@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 +125 -23
- package/bundle.mcpb +0 -0
- package/index.js +431 -3
- package/manifest.json +5 -3
- package/package.json +3 -1
- package/pii-masking-run.js +205 -53
- package/ps-pii-engine.cjs +289 -140
- package/ps-pii-engine.js +289 -140
- package/scrubber-core.cjs +7 -7
- package/server.json +3 -3
- package/.well-known/mcp/server-card.json +0 -78
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@privacyscrubber/mcp-server)
|
|
4
4
|
[](https://www.npmjs.com/package/@privacyscrubber/mcp-server)
|
|
5
|
+
[](https://www.npmjs.com/package/@privacyscrubber/sdk)
|
|
5
6
|
[](https://opensource.org/licenses/MIT)
|
|
6
7
|
[](https://zenodo.org/records/22058770)
|
|
7
8
|
[](https://osf.io/5byjf/)
|
|
8
9
|
[](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7335581)
|
|
9
10
|
[](https://smithery.ai/servers/privacyscrubber/pii-masking-mcp)
|
|
11
|
+
[](https://cursor.directory/plugins/privacyscrubber-mcp)
|
|
12
|
+
[](https://glama.ai/mcp/servers/moxno/privacyscrubber-mcp)
|
|
13
|
+
[](https://github.com/TensorBlock/awesome-mcp-servers)
|
|
14
|
+
[](https://theresanaiforthat.com/ai/privacy-scrubber/)
|
|
10
15
|
[](https://privacyscrubber.com)
|
|
11
16
|
[](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
|
-
|
|
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
|
-
|
|
153
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
247
|
+
β PrivacyScrubber MCP Server v2.2.0 β
|
|
192
248
|
β βββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
|
193
249
|
β π Tier: FREE β
|
|
194
250
|
β π Session requests: 5 β
|
|
195
|
-
β π Input size limit:
|
|
251
|
+
β π Input size limit: 15,000 characters/request β
|
|
196
252
|
β βββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
|
197
|
-
β π·οΈ Profiles: General only β PRO unlocks
|
|
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
|