MaskFlow PII proxy

io.github.maskflow由 GitHub 帳號 maskflow 發布v0.1.2更新於 Oct 24, 2026

Mask PII in outbound MCP tool-call arguments, unmask the results. Indian identifiers included.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機代理,會在助理送出的 MCP 工具呼叫參數中遮蔽個人身分資訊,並在回傳結果中還原原始值。

可以做什麼
MaskFlow PII 代理位於代理程式與任意 MCP 伺服器之間,在送往後端工具的 tools/call 參數值中遮蔽個人身分資訊,並在回傳結果中還原佔位符。佔位符在整段代理程式執行期間保持一致,權杖與原始值的對應按連線保存在記憶體中。偵測涵蓋一般 PII 以及 Aadhaar、PAN、GSTIN、UPI、IFSC、ABHA 等印度識別碼。它可包裝 stdio 後端指令或 HTTP 後端網址,tools/list、prompts 與 resources 會原樣通過。
適用情境
當助理會把姓名、電子郵件、電話號碼或政府證件號等使用者資料送往第三方 MCP 伺服器,而你希望在邊界攔下真實值時使用。它是可直接替換的中介層,適合已透過 stdio 或 HTTP 連接 MCP 後端的代理程式。
執行需求
需要本機 Python 執行環境;從 PyPI 安裝 maskflow-mcp 套件,或以 uvx 執行。必須提供後端 MCP 伺服器,可為指令列或網址,也可從 Claude Desktop 風格的設定檔讀取。首次偵測會下載小型 spaCy 模型,除非使用 --patterns-only。後端憑證需以 --pass-env 明確轉送。
安裝前請注意
它是處理敏感資料的代理,依賴前請確認遮蔽範圍涵蓋你在意的欄位。預設情況下,工具自行加入結果的原始 PII 會原樣通過;啟用 --mask-tool-results 可一併遮蔽。資源內容遮蔽預設關閉。使用 --pass-env 轉送後端憑證會讓該變數暴露給被包裝的行程。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

maskflow-mcp

A Model Context Protocol proxy that wraps any MCP server and keeps PII out of your agent's tool traffic. It masks PII in outbound tools/call arguments before they reach the backend tool, and restores the originals in the results, with placeholders that stay consistent for the whole agent run.

Agents routinely pass user PII (names, emails, PAN, Aadhaar, phone numbers) straight into third-party MCP servers as tool arguments. This proxy is a drop-in shim that stops the real values at the boundary. It runs MaskFlow's detection engine, so the Indian identifiers (Aadhaar, PAN, GSTIN, UPI, IFSC, ABHA, Indian names / addresses) are covered alongside the generic PII.

MIT, no gates, no telemetry.

Install

bash
pip install maskflow-mcp# or, no install:uvx maskflow-mcp stdio --backend "npx -y @modelcontextprotocol/server-github"

Pulls fastmcp (the 2.x line, which does not bundle LLM vendor SDKs). The first detection run downloads a small spaCy model; pass --patterns-only to skip it.

Use it

stdio (Claude Desktop, most agents)

Point the agent at maskflow-mcp and give it the real server as --backend:

jsonc
// claude_desktop_config.json{  "mcpServers": {    "github": {      "command": "maskflow-mcp",      "args": ["stdio", "--backend", "npx -y @modelcontextprotocol/server-github",               "--pass-env", "GITHUB_TOKEN"]    }  }}

Or wrap a server already defined in a config file:

bash
maskflow-mcp stdio --config ./claude_desktop_config.json --backend-name github

HTTP

bash
maskflow-mcp http --backend https://example.com/mcp --host 127.0.0.1 --port 9000

Options

FlagDefaultMeaning
--backend–Backend command line, or a URL
--config / --backend-name–Read the backend from a Claude-Desktop-style JSON file
--pass-env VAR–Forward an env var to a stdio backend (repeatable)
--min-confidence0.5Detection threshold
--patterns-onlyoffSkip the spaCy NER pass (faster; drops bare-name / address detection)
--mask-tool-resultsoffAlso mask PII the tool introduced in its result, not just unmask placeholders it echoed
--session-ttl3600Lifetime of a per-connection session

What is masked

tools/call arguments are walked (string and numeric values only, keys never) and masked through the connection's session. The result's text and structured content is unmasked, restoring placeholders the tool echoed. By default raw PII that the tool adds to a result passes through untouched; --mask-tool-results masks that too, so the agent never sees it.

tools/list, prompts/*, and resources/* pass through unchanged (resource content masking is not on by default).

PII safety

The token-to-value map lives in memory per connection and is never logged. Only masked values cross the wire to the backend. See docs/mcp.md in the MaskFlow repo for the design.

來源:packages/maskflow-mcp/README.md,提交 dc6297e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分