MCP & AI Integration
MCP Server v2.2.0 enables AI assistants to access anonymization tools directly through the Model Context Protocol. Available on Pro and Business plans for Enterprise tier clients.
Streamable HTTP Transport
The MCP server implements Streamable HTTP transport as defined in the MCP March 2025 specification. Two transport modes are supported for different client environments.
Claude Desktop
Standard input/output transport for direct integration with Claude Desktop. The MCP server runs as a local process and communicates via stdio streams.
- Local process execution
- Claude Desktop native integration
- stdio stream communication
Cursor & VS Code
HTTP transport for IDE-based clients. The MCP server exposes an HTTP endpoint that Cursor IDE and VS Code extensions connect to.
- HTTP endpoint communication
- Cursor IDE integration
- VS Code extension support
- MCP-compatible tool support
7 MCP Tools
Each tool is exposed as an MCP function that AI assistants can invoke directly. Token costs are deducted from the account balance per operation.
Analyze Text for PII
Detect personally identifiable information in text. Returns entity positions, types, and confidence scores without modifying the original text.
2 base + 0.5/KB + 0.2/entity filterAnonymize Text
Replace detected PII with anonymized placeholders. Supports configurable operators (replace, mask, hash) per entity type.
3 base + 0.5/KB + 0.3/unique entityDetokenize Text
Restore original values from anonymized tokens using session-stored or client-provided token mappings.
2 base + 0.3/tokenCheck Token Balance
Query the current token balance for the authenticated account. Returns remaining tokens and usage statistics.
FreeEstimate Cost
Preview the token cost of an operation before executing it. Useful for budget-aware AI workflows.
FreeList Sessions
View active anonymization sessions with their metadata. Sessions store token mappings for detokenization.
FreeDelete Session
Permanently delete an anonymization session and its associated token mappings from server storage.
FreeConfiguration
Add the MCP server to your AI client configuration. The package is distributed via npm and runs with npx.
MCP Client Configuration
{
"mcpServers": {
"anonym-legal": {
"command": "npx",
"args": ["-y", "anonym-legal-mcp"],
"env": {
"ANONYM_API_KEY": "your-api-key-here"
}
}
}
}
Package: npx -y anonym-legal-mcp (npm)
Detection Parameters
Customize PII detection behavior through MCP tool parameters. These parameters apply to the analyze and anonymize tools.
| Parameter | Description |
|---|---|
| language | Language of the input text for language-specific detection models |
| entities | Specific entity types to detect (e.g., PERSON, PHONE_NUMBER, EMAIL_ADDRESS) |
| entity_groups | Predefined groups of entity types for common use cases |
| score_threshold | Minimum confidence score for entity detection (0.0 to 1.0) |
| preset | Predefined detection configuration for common scenarios |
| ad_hoc_recognizers | Custom regex-based recognizers defined inline for domain-specific patterns |
| output | Output format configuration for results |
| response_format | Structure of the API response (detailed or compact) |
Custom Operators via MCP
Define per-entity-type anonymization operators. Each entity type can use a different strategy: replace with a placeholder, mask with characters, or hash the value.
{
"operators": {
"PERSON": {
"type": "replace",
"new_value": "[REDACTED_NAME]"
},
"PHONE_NUMBER": {
"type": "mask",
"masking_char": "*",
"chars_to_mask": "6",
"from_end": "true"
},
"EMAIL_ADDRESS": {
"type": "hash",
"hash_type": "sha256"
}
}
}
E2E Encryption via MCP
End-to-end encryption splits the anonymization process between server and client. The server detects PII positions; the client extracts, encrypts, and stores the original values locally. The server never sees the original PII text.
1. Server Detects Positions
The MCP server analyzes text and returns entity positions and types without storing the original text.
2. Client Extracts & Encrypts
The MCP client extracts PII from the original text using positions and encrypts values locally.
3. Client Stores Locally
Encrypted token mappings are stored on the client side. The server has no access to decryption keys.
Client-Side Utility Functions
buildE2ETokenMappings()
Build encrypted token mappings from server-detected positions and the original text.
detokenizeLocally()
Restore original text using locally stored encrypted token mappings.
serializeMappings()
Serialize token mappings for persistent storage or transfer between sessions.
deserializeMappings()
Deserialize previously stored token mappings back into usable form.
Technical Specifications
Compatible Clients
The MCP server is compatible with any MCP-capable AI client. Tested and supported on the following platforms.
Claude Desktop
stdio transport
Cursor IDE
HTTP transport
VS Code
HTTP transport
MCP-Compatible Tools
Any MCP client
Integrate AI-Powered Anonymization
Request access to the MCP Server for your Enterprise deployment. Available on Pro and Business plans.