Claude Desktop
MCP Server Setup Guide
Claude Desktop is Anthropic's official MCP reference client. It uses stdio transport — the MCP server runs as a subprocess launched directly by Claude Desktop. Setup takes under 2 minutes.
Prerequisites
- Node.js 18+ — required to run
npx - Claude Desktop — download at claude.ai/download
- anonym.legal API key — Pro or Business plan required. Get one at anonym.legal
Installation
Open Claude Desktop Config File
The config file is created automatically on first launch. Open it in your editor:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
code %APPDATA%\Claude\claude_desktop_config.json
code ~/.config/Claude/claude_desktop_config.json
{}.Add the MCP Server Entry
Add the mcpServers block. Replace YOUR_API_KEY with your actual key:
{
"mcpServers": {
"anonym-legal": {
"command": "npx",
"args": [
"-y",
"@anthropic-ai/mcp-server-anonym-legal"
],
"env": {
"ANONYM_LEGAL_API_KEY": "YOUR_API_KEY"
}
}
}
}
Restart Claude Desktop
Fully quit Claude Desktop (not just close the window) and reopen it. On macOS: Cmd+Q. The MCP server starts automatically when Claude Desktop launches.
Verify the Connection
Look for the MCP icon (hammer 🔨) in the Claude Desktop interface. Click it to see available tools. You should see 7 tools with the anonym_legal_ prefix.
Multiple MCP Servers
Claude Desktop supports multiple MCP servers simultaneously. Just add more entries to mcpServers:
{
"mcpServers": {
"anonym-legal": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-anonym-legal"],
"env": {"ANONYM_LEGAL_API_KEY": "YOUR_API_KEY"}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/files"]
}
}
}
Available Tools (7)
All tools are invokable by Claude automatically or on request. Tool names use the anonym_legal_ prefix.
free
tokens
free
free
free
free
free
Operators (6)
Control how each entity type is anonymized. Pass via entity_operators in anonym_legal_anonymize_text:
John Smith → [CLIENT] or [PERSON]
john@acme.com → (removed)
John Smith → a3f9b1...
4111-xxxx → enc:U2FsdGVkX1...
john@acme.com → jo**@****.com
John Smith → John Smith (tracked)
Usage Examples
Analyze text for PII
Use anonym_legal_analyze_text to scan the following and tell me what PII it contains: "Please review the contract for John Smith (john@acme.com, +1-555-0123) regarding project Alpha at 123 Main St, New York."
Anonymize before sending to Claude
1. Use anonym_legal_anonymize_text to anonymize this text with replace operator for all entities. 2. Then summarize the anonymized contract. 3. Finally use anonym_legal_detokenize_text to restore the original names in your summary. Text: "Contract between Sarah Miller (sarah@corp.eu) and TechCorp GmbH..."
Advanced: operator per entity type
Use anonym_legal_anonymize_text with these operators:
- PERSON: replace (with [CLIENT])
- EMAIL: redact
- CREDIT_CARD: hash
- PHONE: mask
Text: "Call Maria Garcia at +49-30-1234567, email: maria@example.de.
Card ending 4111-1111-1111-1111 on file."
Advanced Configuration
Entity Groups
Use entity_groups to process specific regions instead of all 285+ types:
UNIVERSAL — Names, emails, phones, addresses, IPs (all regions) FINANCIAL — IBAN, SWIFT, credit cards, account numbers DACH — German/Austrian/Swiss-specific IDs, tax numbers HEALTHCARE — Medical record numbers, insurance IDs, diagnoses NORTH_AMERICA— SSN, SIN, driver's licenses (US/CA) EU_GENERAL — EU-wide VAT, passport formats
Custom Regex Recognizers
Use anonym_legal_anonymize_text with ad_hoc_recognizers to also detect
project codes matching pattern "PROJ-[0-9]{4}" as entity type PROJECT_ID.
Text: "Assigned to PROJ-4821, contact: alice@example.com"
Troubleshooting
Tools not appearing in Claude Desktop
Ensure Node.js is installed and npx works in your terminal. Try running npx -y @anthropic-ai/mcp-server-anonym-legal manually first. Check the Claude Desktop logs: ~/Library/Logs/Claude/ (macOS) or %APPDATA%\Claude\logs\ (Windows).
JSON parse error on startup
Validate your claude_desktop_config.json with a JSON linter. Common mistake: trailing commas (JSON doesn't allow them). Use jsonlint.com to check.
Authentication failed / 401 error
Your API key is incorrect or has insufficient plan. Verify at anonym.legal — MCP requires Pro or Business plan.
npx takes a long time on first run
This is normal — npx downloads the package on first use. Subsequent starts are instant from npm cache. If you're offline, install globally: npm install -g @anthropic-ai/mcp-server-anonym-legal and use "command": "mcp-server-anonym-legal" instead.
Claude says "I don't have access to that tool"
Claude Desktop must be fully restarted (Cmd+Q / Alt+F4), not just the window closed. Also confirm the MCP hammer icon is visible — if it shows 0 tools, the server failed to start.