Doc Sanitizer MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Doc Sanitizer MCP Server
A local, containerized MCP (Model Context Protocol) server that uses a local LLM (via Ollama) to sanitize documents by removing or transforming PII before content is sent to public LLM services.
Features
Document Support: Word (.docx), PDF, Excel (.xlsx/.xls), CSV, Plain text, Email (.eml)
PII Detection: Names, emails, phone numbers, companies, addresses, financial data, IDs
Flexible Actions: Delete, invent synthetic data, or keep partial information
Profile Management: Create and manage multiple sanitization profiles via CLI
MCP Integration: Works with Claude Desktop, Claude.ai, and Claude Code
Privacy First: All processing happens locally - nothing sent to external services
Related MCP server: pii-anonymizer
Quick Start
Prerequisites
Docker and Docker Compose
Ollama (installed automatically via Docker)
Installation
git clone https://github.com/yourusername/doc-sanitizer-mcp.git
cd doc-sanitizer-mcp
./setup.shConfiguration
Edit .env to customize settings:
# Change LLM model (no rebuild required)
OLLAMA_MODEL=phi4:14b
# Alternative models:
# OLLAMA_MODEL=qwen2.5:7b # Faster, less RAM
# OLLAMA_MODEL=llama3.2:3b # Fastest, minimal RAMTo switch models:
# Pull new model
docker exec doc-sanitizer-ollama ollama pull qwen2.5:7b
# Update .env
sed -i '' 's/OLLAMA_MODEL=.*/OLLAMA_MODEL=qwen2.5:7b/' .env
# Restart
docker compose restart doc-sanitizerClaude Desktop Integration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"doc-sanitizer": {
"url": "http://localhost:8000/sse"
}
}
}Usage
Via Claude (MCP Tools)
Once configured, you can ask Claude:
"List available sanitization profiles"
"Show me the default profile settings"
"Sanitize this document using the high_privacy profile"
Via CLI
# List profiles
doc-sanitizer profiles list
# Create a new profile
doc-sanitizer profiles create high_privacy
# Edit profile settings
doc-sanitizer profiles edit high_privacy --set person_name=delete --set company=delete
# Sanitize a document
doc-sanitizer sanitize document.docx --profile high_privacyProfile Management
Profiles define how each PII type is handled:
PII Type | Available Actions |
| delete, invent, keep_part |
| delete, keep_part |
| delete, invent, keep_part |
| keep_part, invent |
| delete, invent |
| delete, invent |
| delete, invent |
| delete, invent |
Profiles persist across container restarts (stored in ~/.doc-sanitizer/).
Documentation
License
MIT License - see LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for detecting and redacting PII (Personally Identifiable Information) in PDF documents.
Scan prompts for injection attacks, redact PII, and audit LLM SDK usage from any MCP client
MCP-Native LLM Orchestration Agent
Authenticated LLM MCP Agent
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables LLMs to detect and anonymize over 25 types of Personally Identifiable Information (PII) using Microsoft Presidio. It supports various redaction strategies and can process both plain text and structured data to help ensure data privacy.10MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for automatic detection and redaction of PII in text, with anonymization and deanonymization capabilities, all local processing.1-
- AlicenseAqualityCmaintenanceAn MCP server that redacts PII/PHI from text before it ever reaches an LLM — self-hosted, fail-closed, and HIPAA-aware.324 PyPIMIT
- AlicenseAqualityDmaintenanceMCP server providing on-prem PII detection and anonymization tools (scan and is_sensitive) for AI agents, ensuring data stays local.4MIT