The Developer's Dilemma

You're debugging a production issue. The stack trace includes customer email addresses. The fastest solution? Paste it into Claude and ask for help.

But that customer data is now:

  • Stored in Anthropic's systems
  • Potentially used for training (depending on your plan)
  • Visible to anyone with access to your chat history

77% of developers paste sensitive data into AI tools. Most don't realize the implications until it's too late.

The MCP Server Solution

The Model Context Protocol (MCP) Server acts as a transparent proxy between you and AI assistants. It:

  1. Intercepts your prompts before they reach the AI
  2. Detects and anonymizes PII automatically
  3. Sends only anonymized data to the AI
  4. De-anonymizes responses so you see original context

You interact with AI normally — the protection is invisible.

Setting Up MCP Server

Prerequisites

Step 1: Get Your API Key

  1. Sign up at anonym.legal/auth/signup
  2. Navigate to Settings → API Tokens
  3. Generate a new token
  4. Copy the token (you'll only see it once)

Step 2: Configure Claude Desktop

Edit your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Linux: ~/.config/Claude/claude_desktop_config.json

JSON — claude_desktop_config.json
{
  "mcpServers": {
    "anonym-legal": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-server-anonym-legal"],
      "env": {
        "ANONYM_API_KEY": "your-api-key-here"
      }
    }
  }
}

Step 3: Restart Claude Desktop

Close and reopen Claude Desktop. You should see "anonym-legal" in the MCP servers list.

Configuration for Cursor IDE

Cursor uses the same MCP protocol. Add to your Cursor settings:

JSON — Cursor MCP Settings
{
  "mcp": {
    "servers": {
      "anonym-legal": {
        "command": "npx",
        "args": ["-y", "@anthropic-ai/mcp-server-anonym-legal"],
        "env": {
          "ANONYM_API_KEY": "your-api-key-here"
        }
      }
    }
  }
}

What Gets Anonymized

The MCP Server detects and anonymizes 285+ entity types:

Category Examples
Personal Names, emails, phone numbers, DOB
Financial Credit cards, bank accounts, IBANs
Government SSNs, passport numbers, driver's licenses
Technical IP addresses, API keys, tokens
Healthcare MRNs, patient IDs, insurance numbers
Corporate Employee IDs, account numbers

Example Transformation

Your prompt:

Debug this error from user john.smith@acme.com:
Error: Payment failed for card 4532-1234-5678-9012
Customer ID: CUST-12345
IP: 192.168.1.100

What Claude sees:

Debug this error from user [EMAIL_1]:
Error: Payment failed for card [CREDIT_CARD_1]
Customer ID: [CUSTOMER_ID_1]
IP: [IP_ADDRESS_1]

Claude's response (to you):

The error for john.smith@acme.com suggests the card
4532-1234-5678-9012 may have insufficient funds...

You see the original data; Claude only ever saw tokens.

Advanced Configuration

Custom Entity Types

Define additional patterns to detect:

JSON
{
  "env": {
    "ANONYM_API_KEY": "your-api-key",
    "CUSTOM_PATTERNS": "JIRA-[0-9]+,TICKET-[A-Z0-9]+"
  }
}

Allowlist Specific Data

Some data shouldn't be anonymized (public company names, product names):

{
  "env": {
    "ANONYM_API_KEY": "your-api-key",
    "ALLOWLIST": "Anthropic,Claude,anonym.legal"
  }
}

Security Considerations

Component Location
MCP Server Your machine (local)
PII Detection API anonym.legal / cloak.business servers (Germany, Hetzner)
AI Model Anthropic/OpenAI servers

anonym.legal does not store your prompts or responses. The API receives text for analysis, returns entity positions, and immediately discards the input. See the privacy policy for details.

Pricing

anonym.legal plans — MCP Server requires Pro or Business:

Plan Tokens/month Price
Free 200 €0
Basic 1,000 €3/month
Pro 4,000 €15/month
Business 10,000 €29/month

The MCP Server is available on Pro (€15/month) and Business (€29/month) plans.

Conclusion

AI assistants are essential for modern development, but they don't need to see your customers' data.

The MCP Server integration requires no workflow changes, protects PII automatically, and works with Claude Desktop, Cursor, and VS Code. Set it up once — your data is protected by default.

Sources