Guides: Hub Claude Desktop Cursor VS Code Windsurf Continue Cline Compare
⚡ Cursor — AI-First Code Editor

Cursor
MCP Server Setup Guide

Cursor connects to anonym.legal over HTTP — no installation, no Node.js. Add the endpoint URL and your API key to .cursor/mcp.json and you're done.

HTTP · no install .cursor/mcp.json per-project or global
Transport
HTTP
Config key
mcpServers
Config file
.cursor/mcp.json
Scope
project or global

Prerequisites

  • Cursor — version 0.40+ for MCP support. Download at cursor.sh
  • anonym.legal API key — Pro or Business plan (required for MCP access). Get one at anonym.legal
  • No Node.js, no npm, no local install — anonym.legal's MCP server runs entirely over HTTP. There is nothing to download or run locally.

Installation

1

Create the MCP config file

Create .cursor/mcp.json in your project root (per-project) or ~/.cursor/mcp.json (global, applies to all projects):

.cursor/mcp.json — HTTP methodjson
{
  "mcpServers": {
    "anonym-legal": {
      "url": "https://anonym.legal/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
No installation: There's no local subprocess, no Node.js, no package to keep updated. The connection goes directly to anonym.legal's MCP endpoint with TLS 1.3.
2

Reload Cursor

Press Cmd/Ctrl+Shift+PDeveloper: Reload Window. Or restart Cursor completely.

3

Verify in Cursor Settings

Go to Cursor Settings → Features → MCP (or the MCP panel in the sidebar). You should see anonym-legal listed as an active server with 7 tools.

Using Environment Variables (Recommended)

Keep your API key out of the config file using a .env file or Cursor's env expansion:

.cursor/mcp.json — env referencejson
{
  "mcpServers": {
    "anonym-legal": {
      "url": "https://anonym.legal/mcp",
      "headers": {
        "Authorization": "Bearer ${ANONYM_LEGAL_API_KEY}"
      }
    }
  }
}
.env (gitignored)
ANONYM_LEGAL_API_KEY=your_actual_api_key_here

⚠ Important: Add .cursor/mcp.json to .gitignore if it contains your API key directly. Never commit secrets to version control.

Available Tools (7)

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)

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)

Using with Cursor Agent

In Cursor's Agent mode (Cmd+I or the Agent panel), MCP tools are available automatically. You can use them directly in your conversation:

in Cursor Agent chat
Before sending this to the API, use anonym_legal_anonymize_text to redact
all emails and replace all person names with [USER].

"Send a welcome email to Hans Mueller (hans@example.de) and CC
his manager Lisa Schneider (lisa@company.de)."
automated workflow in Cursor Agent
1. Read the file customer_data.json
2. Use anonym_legal_analyze_text to identify all PII fields
3. Use anonym_legal_anonymize_text with redact for emails, replace for names
4. Write the anonymized version to customer_data_anon.json
5. Show me a summary of what was removed

Project vs Global Scope

Project (.cursor/mcp.json)
  • Only active in this workspace
  • Can use project-specific API key
  • Good for team projects (with .gitignore)
  • Committed to repo (env vars only!)
Global (~/.cursor/mcp.json)
  • Active in all Cursor projects
  • Single config to maintain
  • Good for personal use
  • Stored in home directory

Troubleshooting

MCP server not showing in Cursor settings

Check JSON syntax — Cursor silently ignores invalid JSON. Validate at jsonlint.com. Also ensure the file is at .cursor/mcp.json (not .cursorrules).

Connection failed to https://anonym.legal/mcp

Verify your API key is correct and on Pro/Business plan. Test directly: curl -H "Authorization: Bearer YOUR_KEY" https://anonym.legal/mcp — should return an MCP manifest.

Tools appear but calls fail with 402

You've run out of tokens. Check balance with anonym_legal_get_balance or top up at anonym.legal.

401/403 from the MCP endpoint

Double-check the Authorization header is exactly Bearer YOUR_API_KEY (note the space after "Bearer") and that the key hasn't been revoked or rotated in your anonym.legal account.

Server not found / no tools listed

Confirm your plan includes MCP access — the Free and Basic tiers do not. Check your tier with anonym_legal_get_balance or in your account dashboard.

🇩🇪

Limitations: MCP requires Cursor 0.44+. Agent mode must be active — however, standard chat requests do not trigger MCP tools. Rate limits: 4,000 tokens/month (Pro), 10,000 (Business).