pseudonym-mcp 0.2.0 → 0.2.2

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.
Files changed (2) hide show
  1. package/README.md +63 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -140,12 +140,67 @@ Polish (--lang pl):
140
140
 
141
141
  The mapping is stored in a session-scoped in-memory store. Each `mask_text` call returns a `session_id`; pass it back to `unmask_text` to restore originals.
142
142
 
143
+ ## Real-world example
144
+
145
+ ### Meeting note in Claude Code / Obsidian
146
+
147
+ You have a note:
148
+
149
+ ```
150
+ Meeting with Jan Kowalski (PESEL: 90010112318) from Acme sp. z o.o.
151
+ We discussed a contract for 45 000 zł. Contact: jan.kowalski@acme.pl
152
+ ```
153
+
154
+ In Claude Code you type:
155
+
156
+ ```
157
+ Use mask_text on this note, then summarize the key points of the meeting.
158
+ ```
159
+
160
+ **pseudonym-mcp replaces PII locally before sending to Claude:**
161
+
162
+ ```
163
+ Meeting with [PERSON:1] ([PESEL:1]) from [ORG:1].
164
+ We discussed a contract for 45 000 zł. Contact: [EMAIL:1]
165
+ ```
166
+
167
+ **Claude responds (sees tokens only):**
168
+
169
+ ```
170
+ Meeting with [PERSON:1] from [ORG:1] covered a contract
171
+ for 45 000 zł. Follow up via [EMAIL:1].
172
+ ```
173
+
174
+ **pseudonym-mcp restores originals locally:**
175
+
176
+ ```
177
+ Meeting with Jan Kowalski from Acme sp. z o.o. covered
178
+ a contract for 45 000 zł. Follow up via jan.kowalski@acme.pl
179
+ ```
180
+
181
+ Anthropic / OpenAI never saw any real data. The entire swap happens on your machine.
182
+
183
+ ### Obsidian vault with `session_id`
184
+
185
+ ```
186
+ # mask the entire vault once — save the session_id
187
+ Use mask_text on my notes — remember the session_id
188
+
189
+ # ask Claude anything across multiple prompts
190
+ Summarize all meetings from Q1
191
+
192
+ # Claude replies with tokens; restore originals
193
+ Use unmask_text with session_id abc123 on the response
194
+ ```
195
+
196
+ The `session_id` keeps the token map alive for the entire session — the same `[PERSON:1]` always refers to the same person, no matter how many times they appear across different notes.
197
+
143
198
  ## Quick Start
144
199
 
145
- **Step 1** — Install the package:
200
+ **Step 1** — Add to your MCP client (example for Claude Code — no install needed):
146
201
 
147
202
  ```sh
148
- npm install -g pseudonym-mcp
203
+ claude mcp add pseudonym-mcp -- npx -y pseudonym-mcp --engines hybrid
149
204
  ```
150
205
 
151
206
  **Step 2** — (Optional) Pull an Ollama model for full hybrid NER:
@@ -156,11 +211,7 @@ ollama pull llama3
156
211
 
157
212
  Skip this step if you only need regex-based masking (`--engines regex`).
158
213
 
159
- **Step 3** — Add to your MCP client (example for Claude Code):
160
-
161
- ```sh
162
- claude mcp add pseudonym-mcp -- pseudonym-mcp --engines hybrid
163
- ```
214
+ > **Global install** — if you prefer `npm install -g pseudonym-mcp`, replace `npx -y pseudonym-mcp` with `pseudonym-mcp` in all snippets below.
164
215
 
165
216
  Restart your client. The `mask_text` and `unmask_text` tools appear automatically.
166
217
 
@@ -243,7 +294,7 @@ pseudonym-mcp --lang en --engines regex --ollama-model llama3 --auto-unmask
243
294
  ### Claude Code
244
295
 
245
296
  ```sh
246
- claude mcp add pseudonym-mcp -- pseudonym-mcp --engines hybrid
297
+ claude mcp add pseudonym-mcp -- npx -y pseudonym-mcp --engines hybrid
247
298
  ```
248
299
 
249
300
  ### Claude Desktop
@@ -254,8 +305,8 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
254
305
  {
255
306
  "mcpServers": {
256
307
  "pseudonym-mcp": {
257
- "command": "pseudonym-mcp",
258
- "args": ["--engines", "hybrid"]
308
+ "command": "npx",
309
+ "args": ["-y", "pseudonym-mcp", "--engines", "hybrid"]
259
310
  }
260
311
  }
261
312
  }
@@ -269,8 +320,8 @@ Add to `~/.cursor/mcp.json`:
269
320
  {
270
321
  "mcpServers": {
271
322
  "pseudonym-mcp": {
272
- "command": "pseudonym-mcp",
273
- "args": ["--engines", "regex"]
323
+ "command": "npx",
324
+ "args": ["-y", "pseudonym-mcp", "--engines", "regex"]
274
325
  }
275
326
  }
276
327
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pseudonym-mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "MCP server for privacy-preserving pseudonymization of sensitive data before cloud LLM processing",
5
5
  "type": "module",
6
6
  "bin": {