Uses Ollama's LLM capabilities for PII detection in text, supporting models like llama3.2:3b for identifying sensitive information
MCP Conceal
An MCP proxy that pseudo-anonymizes PII before data reaches external AI providers like Claude, ChatGPT, or Gemini.
MCP Conceal performs pseudo-anonymization rather than redaction to preserve semantic meaning and data relationships required for AI analysis. Example: john.smith@acme.com
becomes mike.wilson@techcorp.com
, maintaining structure while protecting sensitive information.
Installation
Download Pre-built Binary
- Visit the Releases page
- Download the binary for your platform:
Platform | Binary |
---|---|
Linux x64 | mcp-server-conceal-linux-amd64 |
macOS Intel | mcp-server-conceal-macos-amd64 |
macOS Apple Silicon | mcp-server-conceal-macos-aarch64 |
Windows x64 | mcp-server-conceal-windows-amd64.exe |
- Make executable:
chmod +x mcp-server-conceal-*
(Linux/macOS) - Add to PATH:
- Linux/macOS:
mv mcp-server-conceal-* /usr/local/bin/mcp-server-conceal
- Windows: Move to a directory in your PATH or add current directory to PATH
- Linux/macOS:
Building from Source
Binary location: target/release/mcp-server-conceal
Quick Start
Prerequisites
Install Ollama for LLM-based PII detection:
- Install Ollama: ollama.ai
- Pull model:
ollama pull llama3.2:3b
- Verify:
curl http://localhost:11434/api/version
Basic Usage
Create a minimal mcp-server-conceal.toml
:
See the Configuration section for all available options.
Run as proxy:
Configuration
Complete configuration reference:
Configuration Guidance
Detection Settings:
confidence_threshold
: Lower values (0.6) catch more PII but increase false positives. Higher values (0.9) are more precise but may miss some PII.mode
: Choose based on your latency vs accuracy requirements (see Detection Modes below)
Faker Settings:
locale
: Use "en_US" for American names/addresses, "en_GB" for British, etc. Affects realism of generated fake dataseed
: Keep consistent across deployments to ensure same real data maps to same fake dataconsistency
: Always leavetrue
to maintain data relationships
Mapping Settings:
retention_days
: Balance between data consistency and storage. Shorter periods (30 days) reduce storage but may cause inconsistent anonymization for recurring datadatabase_path
: Use absolute paths in production to avoid database location issues
Detection Modes
Choose the detection strategy based on your performance requirements and data complexity:
RegexLlm (Default)
Best for production environments - Combines speed and accuracy:
- Phase 1: Fast regex catches common patterns (emails, phones, SSNs)
- Phase 2: LLM analyzes remaining text for complex PII
- Use when: You need comprehensive detection with reasonable performance
- Performance: ~100-500ms per request depending on text size
- Configure:
mode = "regex_llm"
Regex Only
Best for high-volume, latency-sensitive applications:
- Uses only pattern matching - no AI analysis
- Use when: You have well-defined PII patterns and need <10ms response
- Trade-off: May miss contextual PII like "my account number is ABC123"
- Configure:
mode = "regex"
LLM Only
Best for complex, unstructured data:
- AI-powered detection catches nuanced PII patterns
- Use when: Accuracy is more important than speed
- Performance: ~200-1000ms per request
- Configure:
mode = "llm"
Advanced Usage
Claude Desktop Integration
Configure Claude Desktop to proxy MCP servers:
Custom LLM Prompts
Customize detection prompts for specific domains:
Template locations:
- Linux:
~/.local/share/mcp-server-conceal/prompts/
- macOS:
~/Library/Application Support/com.mcp-server-conceal.mcp-server-conceal/prompts/
- Windows:
%LOCALAPPDATA%\\com\\mcp-server-conceal\\mcp-server-conceal\\data\\prompts\\
Usage:
- Run MCP Conceal once to auto-generate
default.md
in the prompts directory: - Copy:
cp default.md healthcare.md
- Edit template for domain-specific PII patterns
- Configure:
prompt_template = "healthcare"
Environment Variables
Pass environment variables to target process:
Troubleshooting
Enable debug logging:
Common Issues:
- Invalid regex patterns in configuration
- Ollama connectivity problems
- Database file permissions
- Missing prompt templates
Security
Mapping Database: Contains sensitive real-to-fake mappings. Secure with appropriate file permissions.
LLM Integration: Run Ollama on trusted infrastructure when using LLM-based detection modes.
Contributing
Contributions are welcome! Follow these steps to get started:
Development Setup
Prerequisites:
- Install Rust: https://rustup.rs/
- Minimum supported Rust version: 1.70+
- Clone and setup:
- Build in development mode:
- Install development tools:
- Run with debug logging:
Testing
- Unit tests:
cargo test
- Integration tests:
cargo test --test integration_test
- Linting:
cargo clippy
- Formatting:
cargo fmt
Submitting Changes
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes and add tests
- Ensure all tests pass:
cargo test
- Format code:
cargo fmt
- Submit a pull request with a clear description
License
MIT License - see LICENSE file for details.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
An MCP proxy that pseudo-anonymizes PII before data reaches external AI providers like Claude, ChatGPT, or Gemini.
Related MCP Servers
- -securityAlicense-qualityModel Context Protocol (MCP) server implementation that enables Claude Desktop to interact with Google's Gemini AI models.Last updated -191JavaScriptMIT License
- -securityAlicense-qualityAn MCP server that enables Claude to interact with Port.io's AI agent, allowing users to trigger the agent with prompts and receive structured responses including status, output, and action items.Last updated -12PythonMIT License
- -securityAlicense-qualityA proxy server that bridges AI agents and external APIs by dynamically translating OpenAPI specifications into standardized MCP tools, enabling seamless interaction without custom integration code.Last updated -53PythonMIT License
- -security-license-qualityAn MCP server implementation that allows using Google's Gemini AI models (specifically Gemini 1.5 Pro) through Claude or other MCP clients via the Model Context Protocol.Last updated -1JavaScript