3 Lines of Code. 273 Entity Types.
Anonymize PII in your pipeline. MCP Server (9 tools), REST API. Synchronous API. Bearer token auth. Enterprise-grade privacy infrastructure.
The Security Problem
MCP 8000+ Exposed
Claude's Model Context Protocol has 8000+ exposed servers. Agents can enumerate internal APIs without auth. Data exfiltration in seconds.
LangChain CVE-2025-68664
CVSS 9.3. Attacker-controlled LLM can execute arbitrary tool calls. Database queries, file access, network requests. No PII filtering.
Zero Privacy by Default
LLMs don't understand PII. LangChain agents paste customer data. RAG systems upload contracts to Claude context. No redaction layer.
MCP Server (9 Tools)
anonym_legal_analyze_text
Detect PII in text without changing it. Returns entity type, confidence and position.
anonym_legal_anonymize_text
Replace PII in text. Operators per entity: replace, redact, hash, encrypt, mask, keep. Mode "tokenize" returns a session for later detokenizing.
anonym_legal_detokenize_text
Restore the original values in tokenized text, using the session_id from an earlier tokenize call.
anonym_legal_redact_image
Redact or analyze PII in PNG or JPEG images (OCR-based).
anonym_legal_list_presets
List the presets available to your account.
anonym_legal_estimate_cost
Estimate the token cost before processing. Free, no tokens deducted.
anonym_legal_get_balance
Check your token balance, usage and billing cycle.
anonym_legal_list_sessions
List your active tokenization sessions. Free, no tokens deducted.
anonym_legal_delete_session
Delete a tokenization session and its token mappings.
REST API Quick Start
curl -X POST https://anonym.legal/api/presidio/analyze \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "My SSN is 123-45-6789 and email is john@example.com",
"language": "en"
}'
# Response:
# {
# "results": [
# { "entity_type": "US_SSN", "start": 11, "end": 23, "score": 0.99 },
# { "entity_type": "EMAIL_ADDRESS", "start": 38, "end": 56, "score": 0.99 }
# ]
# }
Why Developers Choose This
- β‘ Coverage: 48 languages. 273 entity types.
- π EU Hosting: Document content is not stored after processing, unless you use the optional history.
- π Flexible Auth: Bearer token, API key, OAuth 2.0. Works with LangChain, LlamaIndex, custom agents.
- π° Cost Predictable: Token-based pricing. No surprise bills. Batch calls use the same per-text token rates.
Code Examples
π Python (requests)
import requests
r = requests.post(
'https://anonym.legal/api/presidio/analyze',
headers={'Authorization': 'Bearer YOUR_KEY'},
json={'text': 'SSN: 123-45-6789',
'language': 'en'}
)
results = r.json()['results']
π Node.js (fetch)
const r = await fetch(
'https://anonym.legal/api/presidio/analyze',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'SSN: 123-45-6789',
language: 'en'
})
}
);
const { results } = await r.json();
π cURL
curl -X POST \
https://anonym.legal/api/presidio/analyze \
-H "Authorization: Bearer KEY" \
-H "Content-Type: application/json" \
-d '{"text":"SSN:123","language":"en"}'
Watch the API In Action
See PII detection and anonymization via REST API and MCP Server
Also from anonym.legal