Skip to content
Back to search

obscate-integrations

MIT clients for Obscate: MCP server, LangChain and LlamaIndex integrations for reversible PII redaction

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/astracoreai--obscate-integrations/badge.svg)](/listings/astracoreai--obscate-integrations)

HTML

<a href="/listings/astracoreai--obscate-integrations"><img src="/api/listings/astracoreai--obscate-integrations/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 82 lines
  1. # Obscate integrations
  2. These packages add reversible PII redaction to an agent or LLM app in one
  3. step. Each one is a thin wrapper over the [Obscate](https://obscate.com) HTTP
  4. API. Detection runs in the API (hosted, or self-hosted, which is in pilot),
  5. never in these packages. Docs: [obscate.com/docs](https://obscate.com/docs/).
  6. | package | one step | README |
  7. |---|---|---|
  8. | `obscate-mcp` | `uvx obscate-mcp` in any MCP client (Claude Desktop, Claude Code, Cursor) | [obscate-mcp/](obscate-mcp/README.md) |
  9. | `langchain-obscate` | `with_obscate(llm_or_chain)` · `create_agent(..., middleware=[ObscateMiddleware()])` | [langchain-obscate/](langchain-obscate/README.md) |
  10. | `llama-index-postprocessor-obscate` | `ObscateQueryEngine.wrap(index.as_query_engine())` · `ObscatePostprocessor()` | [llama-index-postprocessor-obscate/](llama-index-postprocessor-obscate/README.md) |
  11. All three need an `OBSCATE_API_KEY`. The free tier (1,000 requests a month,
  12. 60 a minute, no card) is enough to try them. Default strategy is `fpe`:
  13. formats are preserved (valid-looking card numbers, email-shaped addresses),
  14. values that can't keep their format fall back to bracketed `[LABEL:…]`
  15. tokens, and restoring needs no token map.
  16. **Honest expectations.** Structured IDs (email, phone, cards, Aadhaar, PAN,
  17. GSTIN, IBAN, SSN, IP, AWS keys) are near-perfect because they use patterns
  18. and checksums. Names and places use NER and are best-effort; the LlamaIndex
  19. example shows a name being missed.
  20. **Text a person will read: use `tokenize`.** If a model quotes only part of
  21. an `fpe` stand-in ("card ending in 7588"), that fragment can't be restored and
  22. the customer sees wrong, real-looking digits. In 1,800 Claude replies, 68% of
  23. plain-prompt `fpe` replies did this, 58% for `synthetic` and 0% for
  24. `tokenize`. A "repeat values in full" prompt line removes the wrong digits but
  25. prints the full card number in about two-thirds of replies. `fpe` stays the
  26. default because it shines on data machines read (payloads, logs, validators).
  27. Details in each package README and in
  28. [the research write-up](https://obscate.com/blog/partial-values-research).
  29. **Privacy.** No package logs, prints or stores raw text, detected values or
  30. restore maps. Each package has a test that captures every logger at DEBUG,
  31. plus stdout, stderr and the working directory, on success and failure paths.
  32. ## Layout
  33. ```
  34. shared/_client.py HTTP client, vendored into each package (scripts/sync_client.py)
  35. shared/fake_api.py in-process fake API for unit tests (toy detection, not the real engine)
  36. scripts/live_e2e.py real end-to-end against a running Obscate API (live or local)
  37. obscate-mcp/ MCP server + server.json for the official MCP registry
  38. langchain-obscate/ Runnable wrapper, agent middleware, tools, examples/quickstart.py
  39. llama-index-postprocessor-obscate/ query engine wrapper, node postprocessor, examples/quickstart.py
  40. LISTINGS.md PyPI / MCP registry / awesome-list steps, prepared but NOT submitted
  41. ```
  42. ## Develop
  43. ```bash
  44. uv venv --python 3.12 .venv
  45. uv pip install -e ./obscate-mcp -e "./langchain-obscate[test]" -e ./llama-index-postprocessor-obscate pytest anyio
  46. .venv/bin/python -m pytest -q tests && for d in obscate-mcp langchain-obscate llama-index-postprocessor-obscate; do (cd $d && ../.venv/bin/python -m pytest -q); done
  47. cp .env.example .env # add OBSCATE_API_KEY, then:
  48. .venv/bin/python scripts/live_e2e.py
  49. ```
  50. **Key versions.** The API returns `key_version` with every redaction (the
  51. version of your account's key that made the tokens). `RestoreContext` carries
  52. it, and every restore sends it back, so in-flight round trips survive a
  53. server-side key rotation with no code from you. The MCP tools return it and
  54. accept it, because the model carries state between tool calls. Only text you
  55. *store* to restore later needs `key_version` stored next to it.
  56. ## Verification status (2026-11-19, updated after the live runs)
  57. | check | status |
  58. |---|---|
  59. | Unit tests (fake API, no network): mcp 15, langchain 17, llamaindex 13, repo 2 | passing |
  60. | `scripts/live_e2e.py` against the **real Obscate engine running locally** (obscate-api working tree, port 8765, throwaway local key): 23 checks covering MCP over a real stdio subprocess, LangChain Runnable and agent middleware, LlamaIndex query engine and postprocessor | 23/23 passing |
  61. | Both `examples/quickstart.py` against the local engine with the stand-in LLM | run, output as shown in the READMEs |
  62. | Wheels and sdists build; `twine check` passes; `uvx --from <wheel> obscate-mcp` runs in a clean environment | done |
  63. | `server.json` validated against the MCP registry 2025-12-11 schema | done |
  64. | `scripts/live_e2e.py` against the obscate-api `per-account-keys` branch (per-account keys, `key_version`) running locally on port 8766 | 23/23 passing |
  65. | Same checks against the **live** https://api.obscate.com | 23/23 passing |
  66. | `scripts/prod_roundtrip.py` on the live API: fpe (with `key_version`), tokenize and JSON round trips, plus tenant isolation with two accounts (account 2 cannot restore account 1's tokens; hashes differ) | 8/8 passing |
  67. | Published to PyPI (0.1.0); clean install (`uvx obscate-mcp`, fresh `pip install` of all three, no local source) then `scripts/live_e2e.py` against the live API | 23/23 passing |
  68. | A **real LLM** (Claude, `claude-haiku-5-5`) in the loop, live API: LangChain wrapper + middleware, LlamaIndex query engine, both example scripts | passing. LlamaIndex needs `anthropic<2` (upstream `llama-index-llms-anthropic` 0.13.0 breaks on anthropic 2.x; pinned in the `examples` extra) |
  69. | Inside Claude Desktop / Cursor UI | not tested (the stdio protocol path is tested via the MCP SDK client) |

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.