Skip to content

OPP Engine

OPP Engine is the reference implementation of the Open Privacy Protocol. It connects to an organization's sources, writes a draft privacy model, and serves that model to agents so they can check content before they share it.

 databases, files,       opp-engine generate       acme.opp.yaml       opp-engine serve       agents
 documents, web pages  ───────────────────────►   (review, certify)  ──────────────────────►  (MCP / HTTP)

No data value is ever written into the model, the review report or the logs. Sampled values stay in memory, and the engine needs no network access of its own.

Capabilities

Connectors Any SQLAlchemy database URL (PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake, BigQuery and others with their drivers); CSV, TSV, JSON, JSON Lines and Parquet files; text, Markdown, HTML, PDF and Word documents; folders and web pages
Generator Classifies every column from its name and sampled values, finds topics in text and documents, and infers identifier formats. Each entry carries evidence and starts proposed
Industry presets --industry 622110 or --industry healthcare lists the classes that industry usually holds and were not found
Hygiene Removes cues, terms and patterns that would match ordinary text, and reports them
Review report A Markdown report of what to check; certified entries survive the next run (--merge)
Query engine check, explain and list_classes, served over MCP or a REST API
OPP Model Optional: the open-weight model adds names, addresses and topics in free text and meaning-based concept matching

Install

pip install "open-privacy-protocol-engine[server,mcp,documents] @ git+https://github.com/kannancet/open-privacy-protocol-engine.git"
# add the model detector
pip install "open-privacy-protocol-engine[model] @ git+https://github.com/kannancet/open-privacy-protocol-engine.git"

Generate, review, serve

opp-engine generate postgresql://readonly@db/crm ./exports https://intranet/handbook \
    --name acme --org "Acme" --industry 541511 -o acme.opp.yaml --report review.md
# review review.md, mark entries certified, then
opp-engine check acme.opp.yaml --dest external_ai "Email [email protected] about CU-123456"
opp-engine serve acme.opp.yaml --mcp

Use a read-only database account. Connection strings are never written into the model; only the host and database name are kept.

Docker

docker build -t opp-engine .
docker run --rm -p 8765:8765 -v "$PWD/acme.opp.yaml:/model.opp.yaml" -e OPP_TOKEN=change-me opp-engine

Source and issues: open-privacy-protocol-engine.