Obsify

by formative-sum41

Not rated
GitHub

Description

Local, privacy-preserving PII detection & redaction over MCP: the model works on shape (schemas, synthetic twins, masked output) while local code touches the real values and returns only masked, aggregated results. Deterministic (Presidio + checksums, AU ABN/ACN/TFN), no LLM…

About

Local, privacy-preserving PII detection & redaction over MCP: the model works on shape (schemas, synthetic twins, masked output) while local code touches the real values and returns only masked, aggregated results. Deterministic (Presidio + checksums, AU ABN/ACN/TFN), no LLM calls, no runtime network.

Details

Author
formative-sum41
Categories
Developer Tools, Other, Security

Setup

Install Obsify in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/formative-sum41/obsify

Follow the installation instructions in the repository README, then restart your MCP client.

Let an AI assistant work on sensitive files without their raw values ever entering the model's context.

obsify is a local, deterministicMCPserver. The frontier model reasons overshape— schemas, synthetic twins, masked feedback — while deterministic local code touches thesubstanceand returns only masked, aggregated results. No LLM calls, no network at runtime: detection is regex + checksums + dictionaries +Presidio's local NER.

It ships with Australian entity support (ABN / ACN / TFN, checksum-validated),credential/secret detection(cloud keys, API tokens, private keys, DB connection strings), and a label-drivenrouting layerthat makes "when should the assistant avoid raw data" a deterministic, enforced decision rather than a judgement call.

Honest scope:run_on_realexecutes model-written code in abest-effortlocal sandbox and masks its outputbest-effort. It is not a jail. ReadSECURITY.mdbefore pointing it at anything you cannot afford to leak. Return aggregates.

Feeding confidential documents to a hosted LLM means the substance leaves your perimeter. The usual answers are "don't use the LLM" or "trust the provider." obsify takes a third path —compute-to-data: bring the code to the data, not the data to the model.

- The model sees theschemaof a spreadsheet, not its rows.
- The model develops against asynthetic twin(faked values, real structure).
- The model's analysis code runslocally; only masked, aggregated output returns.

The frontier model's reasoning is preserved. Only itseyes on raw valuesare removed.

Supported documents:PDF (text + tables; complex-table fallback viaobsify[tables]), Excel.xlsx/.xlsm, and Word.docx(paragraphs + tables). Unreadable or unsupported files are surfaced as explicit notes/blind spots, never silently dropped. (No OCR yet — scanned/image pages are flagged as low-coverage, not transcribed.)

Known-entity masking (optional).Supply a local.obsify.entitieslist of names to hide;scan_pii/redact_textdeterministically catch them — and the suffix/abbreviation variants NER misses (BRIGHTWATER HLDGS P/LforBrightwater Holdings Pty Ltd) — asKNOWN_ENTITY. The list stays local and never enters the model's context. Seedocs/known_entities.md.

Poke at all five tools live against synthetic data with the officialMCP Inspector:

python -m obsify.make_corpus --out ./corpus_demo npx @modelcontextprotocol/inspector obsify-mcp

Callscan_piion./corpus_demo/ledger.xlsxand confirm it returns types / counts / locations only — never values. Seedocs/verifying.md.

Generate a fake-but-realistic corpus (all synthetic; ABN/ACN/TFN are checksum-valid) spanning all three formats, then point a tool at it:

pip install "obsify[demo]" # reportlab, for the sample PDFs python -m obsify.make_corpus --out ./corpus_demo

It writes a multi-sheet Excel ledger (a numeric false-positive minefield), a PDF engagement letter (prose + trial-balance table), and a DOCX audit memo (paragraphs + vendor table). Great for kicking the tyres onscan_pii/make_synthetic_twinwithout touching real data.

Requires Python 3.11+. obsify speaks MCP overstdio— the client launches it as a local subprocess; nothing is hosted remotely. Register it with any MCP-capable client (Claude Desktop, Claude Code, Cursor, VS Code, …) by adding one block to that client's config.

{ "mcpServers": { "obsify": { "command": "uvx", "args": ["--from", "obsify", "obsify-mcp"] } } }

uvxfetches obsify from PyPI and runs it on demand — no permanent install. Onfirst run, obsify downloads the spaCy NER model (en_core_web_lg, ~560 MB) once and caches it; this fetches a public model and sends no user data (setOBSIFY_AUTO_DOWNLOAD=0to forbid it and install the model yourself). Later runs are instant and fully offline.

pipx install obsify # isolated, on PATH (or: pip install obsify)

Then point the client at the installed command:

{ "mcpServers": { "obsify": { "command": "obsify-mcp" } } }

Restart the client and the tools appear. Optional extras:obsify[tables](complex-table PDF fallback via camelot + Ghostscript),obsify[compute](pandas, handy insiderun_on_realcode).

PATH gotcha (the #1 cause of "server won't connect"):thecommandmust resolve on the PATH theclientsees. A GUI client may not share your venv's PATH. Fixes: useuvx/pipx(globally resolvable), or give an absolute path —"/path/to/.venv/bin/obsify-mcp"(macOS/Linux) or"C:\\path\\to\\.venv\\Scripts\\obsify-mcp.exe"(Windows).

From this repo (before it's on PyPI):

pip install "git+https://github.com/Formative-Sum41/obsify.git" # gets obsify-mcp + obsify`

The routing layer — deterministic, not a judgement call

The hard part of "help me, but don't read the confidential file" isdeciding when to protect. obsify moves that decision out of the model and into the environment:
-
.obsify.json— a label manifest classifying paths (public/confidential/restricted).
-
obsify.guard(run aspython -m obsify.guard) — a PreToolUse guard that blocks a direct read of a labelled file (exit 2) and redirects the assistant toscan_pii/make_synthetic_twin/run_on_real.
- A convention(in
CLAUDE.md) so the assistantprefersobsify before it even hits the guard.

obsify init [--dir PATH] [--with-claude-md]

obsify initisnon-destructive by design— it owns exactly one file and hands you snippets for the rest:

- .obsify.json— obsify owns this; init writes it (never overwritten without--force).
-
.claude/settings.jsonyourfile: initprintsthe PreToolUse hook block to paste, never edits it (it runs code, so registering it is your call).
-
CLAUDE.mdyourfile: the convention isopt-in. Default prints it;--with-claude-mdappends a marker-wrapped, idempotent block that never clobbers your content.

Full convention:docs/obsify_routing.md.

- Checksum-validated identifiers.ABN/ACN/TFN candidates are proposed by regex and confirmed by their official checksums, so a random number is never reported as an identifier.
- Context-required IDs.A bare number is only accepted as an ABN/ACN/TFN when a label word ("TFN", "ABN", "BSB", …) is nearby — this kills the sequential-journal-ID false-positive flood on numeric ledgers.
- Letterless / NER-with-digit suppression.Pure numbers, amounts, dates and alnum codes are not flagged as names/orgs; real names, emails and addresses (which carry letters) are unaffected. Validated letterless PII stays exempt: checksum IDs (ABN/ACN/TFN/Medicare), Luhn cards, valid IPs, BSB-adjacent accounts, and phones (via context or phone shape) — while a decimal point still marks an amount, not a phone.
- Credentials, not just PII.Cloud keys (AWS/GitHub/Google/Slack/Stripe), JWTs, private-key blocks and DB connection strings are flagged as
CREDENTIALbyanchoredpatterns — vendor prefixes (AKIA…,ghp_…) or a keyword-gatedsecret = <value>, never entropy heuristics (which would flood on hex/base64 ledger columns). The wholeBEGIN…ENDprivate-key block is masked, not just its header, so no key body is left behind.

obsify ships a scored evaluation harness (eval/— labelled synthetic corpus + answer key + scorer against theshippingdetector, plus an independent third-party cross-check). Headline on the synthetic corpus:100% recallon expected-detect items,0 false positiveson a numeric FP-torture sheet (with a grouped-number guard), bare context-gated IDs correctly suppressed. Independent cross-check vs Microsoftpresidio-research: EMAIL/IBAN 100%, PERSON 94%.

The harness earned its keep — it found real defects, which were then fixed:credit cards and phone numbers were being silently suppressed by the numeric-noise filter (now exempt via checksum validation / phone shape), and Medicare, IP, date-of-birth, AU passport and driver-licence had no recognizer (now added, checksum- or context-gated). Full method, numbers, and remaining documented gaps (SWIFT/BIC, non-DOB dates):eval/README.md.

pip install -e ".[dev]" pytest tests/ # or run any file directly: python tests/test_obsify.py

Thirteen suites (88 tests), run in CI on Linux + Windows / Python 3.11 + 3.12:

- mcp-protocol— launches the real server over stdio and speaks MCP to it (the same path a client like Claude uses): confirms all five tools register with valid schemas and that calls round-trip through JSON-RPC — includingscan_piireturningshape only, end to end.
- checksums— anchored to externally-published ABN/ACN/TFN worked examples (valid and corrupted), which breaks the generator↔validator circularity.
- obsify / twin / redaction— the privacy invariants: shape-only output, leak-free twins, and a fail-closed self-check.
- precision— the false-positive suppressors kill numeric-ledger noise while keeping real names.
- credentials— the anchored secret patterns catch cloud keys / tokens / JWTs / private-key blocks / connection strings, while keyword-anchored generics stay precise on prose (no entropy).
- routing— the guard's block/allow classification and
obsify init's non-destructive contract.
- corpus— the synthetic PDF+Excel+DOCX corpus end to end: per-format detection, DOCX paragraph+table extraction, and shape-only output across every format.
- evaluation— the scored harness as a regression gate (recall, suppression, FP-torture, gaps).
- robustness— graceful degradation: corrupt/oversized/empty/nested/unsupported inputs never crash and are always surfaced as notes.
- model / variants— first-run model auto-download logic; variant normalization behind
verify_value_free.

For interactive verification (MCP Inspector) and the live-client last-mile check, seedocs/verifying.md.

obsify is one of several MCP servers tackling "let an AI touch sensitive data safely" — they're mostlycomplementary, solving the same problem from different ends. Worth knowing where each fits:

Where obsify is distinct:it's the only one of these where the model getsneitherraw valuesnora full mirror to operate on — justshape + masked aggregates— combined with checksum-validated identifiers, credential detection, a deterministicrouting guard, and a hard no-network / no-LLM guarantee. That's the strictest-isolation end of the spectrum, tuned for confidential financial documents.

Honest trade:obsify optimizesisolation of the valuesoverutility on the data. If you need referentially-intact analytics on a clean copy (cloakbox), reversible round-tripping (redact-mcp), or a multi-language hosted service (cms-ai), those are the better fit — and pair well with obsify rather than competing with it.

PRs welcome — seeCONTRIBUTING.mdfor setup, the merge bar, and the non-negotiable invariants (no LLM calls in the library, no runtime network, no real data, shape-not-substance). Security issues:SECURITY.md`(report privately).

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Zero-Trust Data Sanitization (ZTDS) local PII and secrets scrubber for secure LLM pipelines.

Paid remote MCP for agent data-access boundary reviews, permission scope evidence, sensitive data notes, and governance receipts.

EXIF for AI. AKF embeds trust scores, source provenance, and compliance metadata into every file your AI touches — DOCX, PDF, images, code, and 20+ formats. 9 MCP tools: stamp, inspect, trust, audit, scan, embed, extract, detect. Audit against EU AI Act, SOX, HIPAA, NIST in one command.

Paid remote MCP for LLM trace PII scanning, payload redaction, sensitive field classification, privacy receipts, and trace audit exports.

Security and compliance layer for MCP agents. The analyze_prompt tool checks any input — user messages, RAG retrievals, tool outputs — for prompt injection (22 deterministic signatures, 7 languages) and PII before your model sees it. Every verdict returns a signed audit record (SHA-256 + UUID + UTC) you can retain as GDPR Art. 30 evidence. Free tier: 10,000 requests/month.

Allows access to DFIR / forensics data that was analyzed by the open source Autopsy platform

Connect to your CISO Adapt workspace to search, analyse, export, and manage risks and policies with natural language

CVE/SBOM security audits, licence compliance, frontend security scanning, domain intelligence, and public records — 55 tools, no API key required Category: Security (also fits: Compliance, Data)

MCP server that pseudonymizes PII before your LLM sees it and returns a cryptographically signed receipt for every response.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.