SDKs & integrations

MCP server

An MCP server that gives any AI agent reversible PII redaction. Your agent redacts personal data before a payload leaves (for another model, a tool or a third-party API), then restores the real values in the reply. It is a thin wrapper over the Obscate API.

Status: built and tested, not yet on PyPI. uvx obscate-mcp and pip install obscate-mcp work once the package is published; this page will drop this note then.

Known limitation: partial values come back wrong. If the agent (or a model downstream) quotes only part of a redacted value (“your card ending in 7588”), restore can’t fix it: it matches whole tokens, and a fragment isn’t one. With fpe this fails silently and plausibly: the fake card looks like a real card, so its last four digits look real, and your user sees a confident, wrong statement about their own data. Assistants do this often.

Measured with real Claude (claude-haiku-5-5, 3 runs each, a small test): plain fpe prompt, 2 of 3 replies stated wrong card digits; fpe plus the instruction below, 0 of 3; tokenize, 0 of 3.

For user-facing output, add to your system prompt: “When you mention a card number, email or phone number, repeat it exactly and in full as given. Never abbreviate, mask or quote part of it.” Or use strategy="tokenize": models don’t split [CREDIT_CARD_1]. This is a boundary of any reversible-redaction approach: a fragment of a stand-in can never map back to a fragment of the original.

ToolWhat it doesAPI units
redactredact a text; default fpe keeps formats and needs no map to restore1 per 100 KB
restoreput the original values backfree
detectclassify what PII a text contains (labels, offsets, counts) without changing it1 per 100 KB
redact_jsonredact values inside a JSON object/array; keys and shape are unchanged1 per 100 KB
restore_jsonrestore any JSON replyfree
list_entitiessupported labels and strategiesfree, no key

Quickstart (about 3 minutes)

  1. Get a free API key (here): 1,000 requests a month at 60 a minute, no card. The key is shown once.
  2. Install with one of these:
    uvx obscate-mcp --version          # no install, runs from PyPI
    pip install obscate-mcp            # or install into an environment
  3. Add it to your MCP client (below), with the key in the env block.
  4. Ask your agent: “Redact this before you send it to the CRM: Ravi Kumar, ravi@example.com, +91 98765 43210”.

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "obscate": {
      "command": "uvx",
      "args": ["obscate-mcp"],
      "env": { "OBSCATE_API_KEY": "ob_..." }
    }
  }
}

Claude Code

claude mcp add obscate --env OBSCATE_API_KEY=ob_... -- uvx obscate-mcp

Cursor

~/.cursor/mcp.json (global) or .cursor/mcp.json (per project). Use the same JSON block as Claude Desktop.

Configuration

Env varDefault
OBSCATE_API_KEYnonerequired for every tool except list_entities
OBSCATE_BASE_URLhttps://api.obscate.compoint at a self-hosted Obscate (the self-hosted edition is in pilot; ask contact@obscate.com)

Do not commit config files that contain the key. obscate-mcp --transport streamable-http serves over HTTP instead of stdio.

Example agent flow

The agent has a customer record and must create a ticket in a third-party helpdesk tool, which should never see the raw PII.

user:   File a ticket: Ravi Kumar (ravi@example.com, +91 98765 43210) was double-charged on card 4242 4242 4242 4242.

agent → redact_json({"json": {"customer": "Ravi Kumar", "email": "ravi@example.com",
                              "phone": "+91 98765 43210", "issue": "double-charged on card 4242 4242 4242 4242"}})
      ← {"redacted": {"customer": "[PERSON:…]", "email": "<email-shaped value>", "phone": "<phone-shaped value>",
                      "issue": "double-charged on card <valid-looking card number>"},
         "type_changes": [], "keys_redacted": false, …}

agent → helpdesk.create_ticket(<the redacted object>)        # the tool only sees redacted values
      ← {"ticket": 812, "summary": "Refund for [PERSON:…], reply to <email-shaped value>"}

agent → restore_json({"json": <the tool's reply>, "type_changes": []})
      ← {"json": {"ticket": 812, "summary": "Refund for Ravi Kumar, reply to ravi@example.com"}}

With strategy: "tokenize" the redacted values look like [EMAIL_1], and you pass the returned token_map to restore / restore_json. With fpe (the default) there is no map. See the fpe caveat about values a model invents.

What to expect

  • Structured IDs (email, phone, cards, Aadhaar, PAN, GSTIN, IBAN, SSN, IPs, AWS keys) are near-perfect; names and places are best-effort (details).
  • The server never logs, prints or stores the text, the detected values or the token map. redact and detect don’t echo the original values back into the model’s context (detect can, with include_values: true).
  • Verified: every tool above runs end to end against the hosted API over a real stdio connection. Not yet tried inside the Claude Desktop or Cursor apps themselves.

Get a free API key

Free plan: 1,000 requests a month, all strategies. Your key is shown once — we store only a hash of it.

Prefer the terminal?
curl -s API/v1/signup \
  -H 'content-type: application/json' \
  -d '{"email":"you@company.com"}'

Contact

Our contact address is being set up.