pseudonym-mcp

v0.9.0
io.github.woladi/pseudonym-mcp Checked 4 days ago Published 3 months ago

Locally 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…

ParameterTypeDescription
text *stringThe text to pseudonymize
custom_literalsarraySpecific strings to always redact (names, IDs, phone numbers)
session_idstringOptional: reuse an existing session to preserve token numbering across multiple calls
wait_for_nerbooleanIf 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.

ParameterTypeDescription
session_id *stringThe session_id returned by mask_text
text *stringThe text containing [TAG:N] tokens to restore