Deliverd Screen

io.github.deliverd-dev由 GitHub 帳號 deliverd-dev 發布v0.2.0更新於 Oct 26, 2026

Find and redact personal data and secrets in text before it reaches a model. Local, no account.

已驗證STDIO僅桌面安全與監控AI 與機器學習

概覽

AI 產生的概覽

本機 MCP 伺服器,在文字送給模型前檢查其中的個人資料、密鑰與機密詞彙,回傳判定結果與去識別化後的文字。

可以做什麼
  • 檢查文字中的個人資料、密鑰與機密詞彙,回傳判定結果(allow、redact、ask 或 deny)以及可以送出的文字。
  • 取得以佔位符取代敏感值的去識別化文字,而非被取代的原始值。
  • 預設完全在本機執行,不需要帳號、金鑰或網路呼叫。
適用情境
當助理處理的提示、筆記或文件可能含有電子郵件、電話、IBAN、卡號、API 金鑰或私鑰,而你想在文字進入模型或其他工具前先做檢查時適用。它是送出前的過濾器,不是合規證明。
執行需求
透過 npx 從 npm 套件 @deliverd/screen 以本機程序執行,需要 Node.js。預設不需要帳號、API 金鑰或網路存取。選用的 Microsoft Purview 檢查需要 DELIVERD_PURVIEW_TENANT_ID、DELIVERD_PURVIEW_CLIENT_ID、DELIVERD_PURVIEW_CLIENT_SECRET 與 DELIVERD_PURVIEW_USER_ID 變數。
安裝前請注意
它是一層網,而非保證:結構化識別碼找得不錯,但姓名只能靠你自行接上的模型辨識,且關於某人的去識別化文字仍可能屬於個人資料。啟用選用的 Purview 檢查會把文字送到你自己 Microsoft 租用戶中的 Microsoft Graph,並需要具備 Content.Process.All 權限的 Entra 應用程式。呼叫託管服務的偵測器等於已經把文字送出去。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Deliverd Screen,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Deliverd Screen

A pre-send check for every prompt. Find and redact personal data, secrets and your own confidential terms before text goes to an AI model.

  • Local. No account, no key, no network call. The text never leaves your process, unless you turn on the optional Microsoft Purview check, which sends it to your own Microsoft tenant and nowhere else.
  • Reversible. Values become placeholders such as [EMAIL_1] (the same value gets the same placeholder throughout), and restore() puts them back in the model's answer.
  • Bring your own model for names. Patterns can't find people's names, but a model can. Plug in a Hugging Face token classifier, Presidio, or any model with the same output.
  • No dependencies. MIT.
bash
npm install @deliverd/screen
ts
import { screen } from "@deliverd/screen";
const checked = await screen("Reply to [email protected] about IBAN IE29AIBK93115212345678");checked.verdict; // "redact"checked.text;    // "Reply to [EMAIL_1] about IBAN [IBAN_1]"
const answer = await model.generate(checked.text);checked.restore(answer); // the real values, back in the answer

What it finds

Email addresses, phone numbers, IBANs, payment card numbers (Luhn-checked), UK National Insurance numbers, Irish PPS numbers (check character), US Social Security numbers, IP addresses (v4 and v6), dates of birth, API keys and tokens (AWS, GitHub, Slack, Stripe, Anthropic, OpenAI, Google, JWTs and more), private keys, passwords in connection strings and .env files, words that mark special-category data such as health or religion, and your own terms.

The four answers

By default the model may receive internal data and no personal data. Pass allow: { personalData: true, classification: "confidential" } for a model you have approved for more.

VerdictWhat to do
allowSend text, which is the original.
redactSend text, which has placeholders in place of what the model may not receive.
askA person has to decide (special-category data, by default). allowed is false.
denySend nothing. Secrets are refused by default.

Names: plug in a model

ts
import { pipeline } from "@huggingface/transformers";import { tokenClassifier, presidio } from "@deliverd/screen/adapters";
const ner = await pipeline("token-classification", "Xenova/bert-base-NER");const checked = await screen(prompt, { detectors: [tokenClassifier((t) => ner(t))] });
// or a Presidio analyzer you run yourself:// docker run -p 5002:3000 mcr.microsoft.com/presidio-analyzerawait screen(prompt, { detectors: [presidio({ url: "http://localhost:5002" })] });

A detector is a function from the text to { kind, start, end } spans, so any model works, including Perplexity's PII-Tracer and GLiNER. Check a model's licence before you ship it. Run it where the text already is: a detector that sends the text to a hosted service has already sent it.

Vercel AI SDK

ts
import { generateText, wrapLanguageModel } from "ai";import { screenMiddleware } from "@deliverd/screen/ai-sdk";
const model = wrapLanguageModel({ model: openai("gpt-5"), middleware: screenMiddleware() });const { text } = await generateText({ model, prompt });

The middleware screens the whole conversation at once, so one value keeps one placeholder across messages. It restores the answer, including a streamed one where a placeholder arrives split across chunks. On a deny or an ask it throws ScreenBlockedError and the model is never called. It works with AI SDK 7 by default; pass specificationVersion: "v3" for AI SDK 6.

CLI, pre-commit and CI

bash
cat prompt.txt | npx @deliverd/screen --redact   # the redacted textnpx @deliverd/screen --json notes.txt            # kinds and offsets, never valuesnpx @deliverd/screen --fail evals/*.jsonl        # exit 1 if anything is foundnpx @deliverd/screen --terms clients.txt doc.md  # your own words, one per line

In GitHub Actions, uses: deliverd-dev/deliverd-screen@v0 with paths: runs the same check; for pre-commit, the hook id is deliverd-screen. Both are in deliverd-dev/deliverd-screen.

MCP

bash
claude mcp add deliverd-screen -- npx -y @deliverd/screen mcp

This gives an agent in Claude Code, Cursor or Codex one tool, screen_text. It returns the verdict and the redacted text, and never the values it replaced, so they don't enter the agent's context through the tool.

Microsoft Purview

If your organisation writes its data loss prevention rules in Microsoft Purview, the same rules can apply here, for any model and any tool. Pass a Purview check and the stricter answer wins: a Purview block denies, and a warn is an ask.

ts
import { entraAppToken, purviewCheck, screen } from "@deliverd/screen";
const purview = purviewCheck({  token: entraAppToken({ tenantId, clientId, clientSecret }),  userId: entraObjectIdOfThePerson,  app: { name: "Claims assistant", entraAppId: clientId },});const checked = await screen(prompt, { purview });

This is the one thing in the package that uses the network, and only when you pass it: the text goes to Microsoft Graph (processContent), in your own tenant, and nowhere else. The Entra app needs Content.Process.All, and the DLP rule must be created with New-DlpComplianceRule (Purview does not apply a portal-only rule to an Entra-registered app).

For the MCP server, set DELIVERD_PURVIEW_TENANT_ID, DELIVERD_PURVIEW_CLIENT_ID, DELIVERD_PURVIEW_CLIENT_SECRET and DELIVERD_PURVIEW_USER_ID (and optionally DELIVERD_PURVIEW_ON_UNAVAILABLE: allow, ask or deny).

A net, not a certificate

Structured identifiers are found well. Names are found only as well as the model you plug in. Redacted text about a person is still personal data under GDPR. Use this to send fewer identifiers, never as proof that a prompt was clean.

When a person has to decide

A library can only tell you to stop. Deliverd's Data Gate makes the call. deliverd.screen() in @deliverd/sdk runs these same detectors on your machine and sends Deliverd only the counts ("two email addresses, one IBAN"). The verdict comes back from your organisation's policy and from what its AI register approves each model to receive. On an ask it puts the question to the right person in Slack, Teams or on their phone, and every check is recorded. It takes the same detectors.

Licence

MIT. The detectors are shared with Deliverd's SDKs and held to one set of test vectors, packages/conformance/screening.json.

來源:packages/screen/README.md,提交 e017aaf

工具

1

screen_text

Check text for personal data, secrets and confidential terms before sending it to a model, a tool or anyone else, and get back what may be sent. Runs locally; nothing leaves this machine. Use the returned text in place of the original. A net, not a guarantee: names are not reliably found.

輸入參數text必填termspersonalDataclassification

版本歷史

1
  1. v0.2.0最新Oct 26, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分