Model Context Protocol (MCP) server for PII and PHI redaction with Philter.
Philter-mcp demonstrates solid tool design with clear naming (verb_noun pattern), comprehensive descriptions (avg 180 chars), and proper parameter documentation. All 6 tools have input schemas with types and descriptions. Tool annotations are present (readOnlyHint, destructiveHint, openWorldHint). However, output schemas are not formally documented in the code, responses are inferred from the _report() helper and API calls. Error handling returns error dicts but lacks recovery guidance (e.g., 'Try list_policies() first'). The redact_text and redact_file tools correctly omit sensitive values from reports by default, showing privacy-aware design. Parameter descriptions are actionable (e.g., 'Logical grouping for consistent anonymization'). Missing: explicit output schema documentation, per-parameter constraints (enums, ranges), and recovery hints in error messages.
Dry-run for debugging a policy: show what Philter would redact and why. Returns each detection's filter type, character position, confidence, and replacement token. The original matched values are omitted by default so they do not enter the model context.
Return the JSON definition of a single Philter policy.
List the names of the redaction policies available on the connected Philter instance.
Redact PII and PHI from a UTF-8 text file (logs, CSV exports, tickets, transcripts). Reads the file locally, sends its contents to Philter, and returns the redacted content plus a redaction report (no original sensitive values). The file on disk is not modified. PDF and other binary files are not supported in this version. The file's name is passed to Philter as the document filename.
Redact PII and PHI from a string using Philter. Returns the redacted text plus a report of what was redacted (filter types, positions, confidence) WITHOUT the original sensitive values. Use this before sending text that may contain personal data to an LLM or storing it.
Output schemas not formally documented. Responses are inferred from code (e.g., _report() helper returns dict with redaction_count, redactions_by_type, spans). LLMs cannot plan downstream calls without knowing what fields to expect.
Error messages lack recovery guidance. When PhilterError occurs, response is {'error': str(exc)} with no hint on next steps. Should suggest 'Try list_policies() first' or 'Check PHILTER_BASE_URL configuration'.
get_policy description is minimal (inferred from code: 'Return the JSON definition of a single Philter policy'). Does not explain when to call it, what structure it returns, or how it relates to list_policies().
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 65 | 2026-07-28+ | v2 |
Return the status and health of the connected Philter instance.
status tool description is vague ('Return the status and health of the connected Philter instance'). Does not explain what fields are returned or when to call it for debugging.
No parameter constraints (enums, ranges, patterns) declared. E.g., policy parameter accepts any string; should document fallback behavior and valid policy names. include_text is boolean but lacks guidance on privacy implications.