MCP Integration
Last Updated: 2026-02-11 MCP Server Version: 2.3.1
Table of Contents#
- Overview
- What is MCP?
- Setup
- Available Tools
- Image Anonymization via MCP
- Entity Groups
- Custom Recognizers
- Troubleshooting
Overview#
cloak.business provides an MCP (Model Context Protocol) server that lets AI tools like Claude Desktop, Cursor, and other MCP-compatible clients anonymize text and images directly within your AI workflow.
Key capabilities:
- Analyze text for PII entities
- Anonymize text with replacements, hashing, masking, or encryption
- Reversible tokenization with session-based deanonymization
- Image PII detection and redaction via OCR
- 48 languages, 390+ entity types across 75+ countries, 317 pattern recognizers
- Custom ad-hoc recognizers for domain-specific entities
What is MCP?#
The Model Context Protocol (MCP) is an open standard that allows AI assistants to interact with external tools and data sources. When you connect cloak.business via MCP, your AI assistant gains the ability to detect and remove personally identifiable information from text and images without leaving your editor or chat interface.
Setup#
Option 1: Streamable HTTP (Cursor, Web Clients)#
No installation required — just add the server URL to your client configuration.
Cursor:
Open Cursor Settings > MCP, then add:
{
"mcpServers": {
"cloak-business": {
"url": "https://cloak.business/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Option 2: stdio Transport (Claude Desktop)#
Claude Desktop uses the stdio transport, running a local process that communicates with the cloak.business API.
Configuration file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add to your configuration:
{
"mcpServers": {
"cloak-business": {
"command": "npx",
"args": ["-y", "cloak-business-mcp-server"],
"env": {
"cloak_business_API_KEY": "your-api-key-here"
}
}
}
}
After saving, restart Claude Desktop. The cloak.business tools will appear in the tools menu.
Getting Your API Key#
- Sign in at cloak.business
- Go to Dashboard > API Keys
- Create a new API key
- Copy and paste into your MCP configuration
Available Tools#
All tool names are prefixed with cloak_business_ for namespace clarity. The MCP server exposes 9 tools:
Text Tools#
| Tool | Description | Cost |
|---|---|---|
cloak_business_analyze_text | Detect PII entities in text | Tokens |
cloak_business_anonymize_text | Replace, hash, mask, or encrypt PII | Tokens |
cloak_business_detokenize_text | Restore original values from tokenized text | Tokens |
Image Tools#
| Tool | Description | Cost |
|---|---|---|
cloak_business_analyze_image | Detect PII in images via OCR (bounding boxes) | Tokens |
cloak_business_redact_image | Redact PII from images and return redacted image | Tokens |
Account Tools#
| Tool | Description | Cost |
|---|---|---|
cloak_business_get_balance | Check token balance | Free |
cloak_business_list_sessions | List active tokenization sessions | Free |
cloak_business_delete_session | Delete a tokenization session | Free |
Analyze Text#
Detect PII without modifying the text.
{
"text": "Contact John Doe at john@example.com, SSN 123-45-6789",
"language": "en",
"entity_groups": ["UNIVERSAL", "NORTH_AMERICA"],
"output": "summary"
}
Anonymize Text#
Replace PII with placeholders or reversible tokens.
{
"text": "John Doe, email: john@example.com",
"mode": "redact",
"operators": {
"PERSON": { "type": "replace", "new_value": "[REDACTED]" },
"EMAIL_ADDRESS": { "type": "hash", "hash_type": "SHA256" }
}
}
Detokenize Text#
Restore original values from a previous tokenization session.
{
"text": "<<PERSON_abc123>> sent an email from <<EMAIL_ADDRESS_def456>>",
"sessionId": "session-id-from-anonymize-response"
}
Image Anonymization via MCP#
The MCP server provides two image tools for OCR-based PII detection and redaction.
Analyze Image#
Detect PII entities and return their bounding box positions.
{
"image": "<base64-encoded-image>",
"image_format": "png",
"language": "en"
}
Response:
{
"entities": [
{ "entity_type": "PERSON", "score": 0.85, "left": 24, "top": 31, "width": 159, "height": 35 },
{ "entity_type": "EMAIL_ADDRESS", "score": 1.0, "left": 25, "top": 81, "width": 284, "height": 35 }
],
"entities_found": 2,
"tokens_charged": 3
}
Redact Image#
Detect and redact PII, returning a base64-encoded redacted image.
{
"image": "<base64-encoded-image>",
"image_format": "png",
"language": "en",
"fill_color": "black"
}
Response:
{
"redacted_image": "<base64-encoded-png>",
"redacted_image_format": "png",
"tokens_charged": 3
}
Supported Formats#
PNG, JPEG, BMP, and TIFF. Maximum file size: 10 MB.
OCR Languages#
37 languages are supported for OCR text extraction. Set the language parameter to an ISO 639-1 code (e.g., "de" for German, "ja" for Japanese). See the Image Anonymization guide for the full list.
Entity Groups#
Use entity_groups to detect regional entity sets without listing individual types:
| Group | Covers |
|---|---|
UNIVERSAL | PERSON, EMAIL, PHONE, LOCATION, URL, IP, DATE_TIME |
FINANCIAL | CREDIT_CARD, IBAN, SWIFT, CRYPTO |
DACH | Germany, Austria, Switzerland IDs and tax numbers |
FRANCE | French NIR, CNI, Belgian and Luxembourg IDs |
SPAIN_LATAM | Spain, Mexico, Argentina, Chile, Colombia IDs |
ITALY | Italian fiscal code, VAT, driver license, health card |
PORTUGAL_BRAZIL | Portuguese and Brazilian IDs |
NORDIC | Denmark, Finland, Sweden, Norway, Iceland IDs |
POLAND | PESEL, NIP, REGON, passport |
UK_IRELAND | NHS, NINO, PPS, UK passport |
NORTH_AMERICA | US SSN, US passport, Canadian SIN |
ASIA_PACIFIC | Japan, China, Singapore, Australia, India IDs |
MIDDLE_EAST | UAE, Saudi, Israel IDs |
HEALTHCARE | Medical license, NRP, health insurance ID |
Custom Recognizers#
Define ad-hoc pattern recognizers for domain-specific entities:
{
"text": "Employee ID: EMP-12345, Badge: B-9876",
"ad_hoc_recognizers": [
{
"entity_type": "EMPLOYEE_ID",
"patterns": [{ "regex": "EMP-\\d{5}", "score": 0.9 }],
"context": ["employee", "staff"]
},
{
"entity_type": "BADGE_NUMBER",
"patterns": [{ "regex": "B-\\d{4}", "score": 0.85 }]
}
]
}
Custom recognizers are processed alongside the built-in 317 pattern recognizers. The backend enforces per-request limits: max 50 ad-hoc recognizers, 10 patterns per recognizer, and 200 total ad-hoc patterns. Use the GET /limits endpoint to discover current limits programmatically.
Troubleshooting#
Common Issues#
| Problem | Solution |
|---|---|
| "Unauthorized" error | Check your API key is valid and correctly set in the configuration |
| Tools not appearing in Claude Desktop | Restart Claude Desktop after saving config. Check config file path. |
| "Feature not available" error | Image redaction requires a Basic plan or above |
| Slow image processing | Large images take longer. Keep images under 5 MB for faster results. |
| "Invalid base64" error | Ensure the image is base64-encoded without the data:image/...;base64, prefix |
Verifying Your Setup#
Ask your AI assistant to run cloak_business_get_balance — if it returns your token balance, the connection is working.
Support#
- Website: cloak.business
- Documentation: cloak.business/docs
- npm package: cloak-business-mcp-server
- Contact: support@cloak.business
Document maintained by cloak.business