Documentatie
MCP Server-, REST API- en SDK-integratiegidsen voor anonym.legal en cloak.business
MCP Server-installatie
HTTP-transport: https://anonym.legal/mcp · 7 tools · geen installatie vereist
Claude Desktop
Toevoegen aan claude_desktop_config.json:
{
"mcpServers": {
"anonym-legal": {
"type": "http",
"url": "https://anonym.legal/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}
macOS: ~/Library/Application Support/Claude/claude_desktop_config.jsonWindows: %APPDATA%\Claude\claude_desktop_config.json
Cursor IDE
Toevoegen aan Cursor MCP-instellingen (Settings › Features › MCP):
{
"mcpServers": {
"anonym-legal": {
"type": "http",
"url": "https://anonym.legal/mcp",
"headers": { "Authorization": "Bearer YOUR_API_KEY" }
}
}
}
7 MCP-tools
| Tool | Beschrijving |
|---|---|
anonymize_text | Tekst anonimiseren — replace, redact, hash, encrypt, mask of keep per entiteit |
analyze_text | PII-entiteiten detecteren — retourneert posities, typen en betrouwbaarheidsscores |
detokenize_text | Oorspronkelijke waarden herstellen op basis van sessietokens |
get_balance | Resterend tokensaldo controleren |
estimate_cost | Tokenkosten schatten voordat anonymize_text wordt aangeroepen |
list_sessions | Actieve anonimiseringssessies weergeven |
delete_session | Een sessie verwijderen — GDPR art. 17 wissing |
Vereisten
| Vereiste | Verplicht | Beschrijving |
|---|---|---|
anonym.legal account | Ja | Pro- of Business-abonnement (MCP Server is niet beschikbaar bij Free/Basic) |
API key | Ja | Verzonden als Authorization: Bearer YOUR_API_KEY header — geen Node.js of npm-installatie nodig |
MCP client | Ja | Elke client die HTTP-transport ondersteunt (Claude Desktop, Cursor, VS Code, Windsurf, Continue, Cline) |
REST API
anonym.legal REST API — geen SDK vereist, directe HTTP-integratie
Basis-URL
https://api.anonym.legal/v1
Authenticatie
Voeg uw API-sleutel toe aan de Authorization-header:
Authorization: Bearer your-api-key
POST/anonymize
Anonimiseer tekst en detecteer PII-entiteiten.
Aanvraagbody
{
"text": "John Smith's email is john@example.com",
"method": "replace",
"language": "en",
"entities": ["PERSON", "EMAIL_ADDRESS"]
}
Antwoord
{
"anonymized": "Max Mueller's email is max.mueller@example.de",
"entities": [{ "type": "PERSON", "original": "John Smith", "start": 0, "end": 10 }],
"tokens_used": 2
}
POST/detokenize
Herstel oorspronkelijke waarden op basis van sessietokens.
{ "text": "enc_xK9mP2... email is enc_jL7nQ4...", "session_id": "abc123" }
Codevoorbeelden
anonym.legal REST API — Python, JavaScript, cURL
Python (requests)
import requests
API_KEY = "your-api-key"
BASE_URL = "https://api.anonym.legal/v1"
def anonymize(text, method="replace"):
response = requests.post(
f"{BASE_URL}/anonymize",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"text": text, "method": method}
)
return response.json()
result = anonymize("Contact John at john@example.com")
print(result["anonymized"])
# → "Contact Max Mueller at max.mueller@example.de"
JavaScript / Node.js
const BASE_URL = 'https://api.anonym.legal/v1';
const API_KEY = 'your-api-key';
const result = await fetch(`${BASE_URL}/anonymize`, {
method: 'POST',
headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ text: 'Contact John at john@example.com', method: 'replace' })
}).then(r => r.json());
console.log(result.anonymized);
// → "Contact Max Mueller at max.mueller@example.de"
cURL
curl -X POST https://api.anonym.legal/v1/anonymize \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"text":"Contact John at john@example.com","method":"replace"}'
Anonimiseringsmethoden
Kies de juiste methode voor uw use case
replace
Standaard
Vervangt PII door realistische nepgegevens. Behoudt de leesbaarheid van het document.
"John Smith" → "Max Mueller"
redact
Verwijdert PII volledig. Onomkeerbaar, maar maximale privacy.
"john@example.com" → "[REDACTED]"
hash
SHA-256
Eenrichtings-cryptografische hash. Consistente pseudonimisering.
"555-0123" → "a7f3c9d2..."
encrypt
AES-256-GCM
Versleuteling van militair niveau. Volledig omkeerbaar met de juiste sleutel.
"DE89370400..." → "enc_xK9mP2..."
mask
Gedeeltelijke zichtbaarheid met gemaskeerde tekens. Toont structuur.
"4532-1234-5678-9012" → "4532-****-****-9012"
Hulp nodig?
Ons team staat klaar om u te helpen Anonymize.dev in uw workflow te integreren.