pseudonym-mcp
v0.9.0Locally pseudonymizes sensitive text before cloud LLM work and restores the tokens afterward.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
mask_text
Pseudonymize sensitive entities in text before sending to a cloud LLM. Replaces national ID numbers, tax IDs, phone numbers, IBANs, cards and email addresses via regex, and person names and organization names via local Ollama NER — with opaque tokens like [PESEL:1], [PERSON:2], [ORG:1]. Every locale pack runs by default. The response reports active_locales, and disabled_locales plus a locale_warning whenever the server was narrowed with --lang and can therefore miss identifiers from other countries. Returns the masked text plus a session_id. Store the session_id to restore the original va…
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to pseudonymize |
custom_literals | array | Specific strings to always redact (names, IDs, phone numbers) |
session_id | string | Optional: reuse an existing session to preserve token numbering across multiple calls |
wait_for_ner | boolean | If true, wait up to 30 s for Ollama to finish loading the model before processing (default: false) |
unmask_text
Restore original sensitive values in text that was previously masked by mask_text. Replaces tokens like [PESEL:1], [PERSON:2] with the original values stored in the session identified by session_id.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | The session_id returned by mask_text |
text * | string | The text containing [TAG:N] tokens to restore |