Guides: Hub Claude Desktop Cursor VS Code Windsurf Continue Cline Compare
🖥️ Claude Desktop — Reference MCP Client

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.

stdio transport claude_desktop_config.json requires Pro or Business
Transport
stdio
Config key
mcpServers
LLM
Claude only
Cost
Pro / Business
npm package
@anthropic-ai/mcp-server-anonym-legal

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

1

Open Claude Desktop Config File

The config file is created automatically on first launch. Open it in your editor:

macOSterminal
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windowsterminal
code %APPDATA%\Claude\claude_desktop_config.json
Linuxterminal
code ~/.config/Claude/claude_desktop_config.json
Tip: If the file doesn't exist yet, create it. If it's empty, start with {}.
2

Add the MCP Server Entry

Add the mcpServers block. Replace YOUR_API_KEY with your actual key:

claude_desktop_config.jsonjson
{
  "mcpServers": {
    "anonym-legal": {
      "command": "npx",
      "args": [
        "-y",
        "@anthropic-ai/mcp-server-anonym-legal"
      ],
      "env": {
        "ANONYM_LEGAL_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
⚠ Important: Never commit your API key to version control. Consider using an environment variable manager or your OS keychain.
3

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.

4

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.

Quick test: Type "Use anonym_legal_get_balance to check my balance" and Claude will call the tool and return your account info.

Multiple MCP Servers

Claude Desktop supports multiple MCP servers simultaneously. Just add more entries to mcpServers:

claude_desktop_config.json — multiple serversjson
{
  "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.

anonym_legal_analyze_text
free
Scan text and return all detected PII entities with type, position, and confidence score — without modifying anything.
anonym_legal_anonymize_text
tokens
Replace PII with reversible tokens using configurable operators per entity type. Returns anonymized text + session token map.
anonym_legal_detokenize_text
free
Restore original PII values from session tokens. Used to de-anonymize AI responses.
anonym_legal_get_balance
free
Returns your current token balance, plan tier, and next reset date.
anonym_legal_estimate_cost
free
Preview token cost for a text before anonymizing it. No tokens consumed.
anonym_legal_list_sessions
free
List all active tokenization sessions with creation time, entity count, and expiry.
anonym_legal_delete_session
free
Delete a session and all stored tokens — for GDPR right-to-erasure compliance.

Operators (6)

Control how each entity type is anonymized. Pass via entity_operators in anonym_legal_anonymize_text:

replace
Substitute with custom text or entity type label.
John Smith → [CLIENT] or [PERSON]
redact
Remove entirely — no trace left in the text.
john@acme.com → (removed)
hash
SHA-256 or SHA-512 — deterministic, one-way. Enables deduplication across documents.
John Smith → a3f9b1...
encrypt
AES-256 with your personal key — reversible only by key holder.
4111-xxxx → enc:U2FsdGVkX1...
mask
Partial replacement — configurable chars from start or end.
john@acme.com → jo**@****.com
keep
Detect but pass through unchanged. Useful to audit without modifying.
John Smith → John Smith (tracked)

Usage Examples

Analyze text for PII

prompt to Claude Desktop
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

prompt to Claude Desktop
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

prompt to Claude Desktop
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:

entity group examples
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

ad-hoc recognizer example in prompt
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.

🇩🇪