MCP server for privacy-preserving pseudonymization of sensitive data before cloud LLM processing
Two well-defined tools with clear, detailed descriptions (194 - 250 chars each) and complete Zod schemas. Both tools have all parameters typed and described. Naming is verb-forward (mask_text, unmask_text) and unambiguous. Output structure is documented in descriptions. Error handling returns structured JSON with isError flag. Main gaps: no output schema formally documented in code, no enum constraints on parameters, no pagination/limits (though not applicable here), and no explicit recovery guidance in error messages.
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 values later using 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.
Output schema not formally documented. Descriptions mention 'Returns the masked text plus a session_id' and response fields (active_locales, disabled_locales, locale_warning, ner_status, ner_warning, auto_unmask) but no structured schema definition visible in code or comments.
Error messages lack recovery guidance. When session_id not found in unmask_text, error returns 'Session not found' but does not suggest calling mask_text first or listing available sessions.
No input validation constraints visible. Parameters like 'text' accept any string; 'wait_for_ner' timeout is hardcoded to 30s with no way to override. No min/max bounds or regex patterns documented.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) present. Both tools are read-only and idempotent but this is not declared to the client.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | 2026-07-28+ | v2 |
Session management is in-memory and ephemeral. No persistence layer documented; sessions lost on server restart. For a privacy-critical tool, this may be intentional but should be explicitly documented.