
Redacta Mcp
io.github.nickjlamb由 GitHub 帳號 nickjlamb 發布v2.1.1更新於 Oct 24, 2026
Keep patient identifiers out of AI agent context — a local privacy boundary for healthcare agents.
概覽
本機 MCP 伺服器,在臨床文字進入 AI 代理前將病患識別碼偽名化,回傳清洗後文字與去識別化報告。
- 可以做什麼
- 對臨床與醫療文件進行去識別化,把姓名、NHS 號碼、出生日期、郵遞區號、電話與電子郵件等病患識別碼替換為帶標籤的權杖,同時保留臨床意義;可選用更嚴格的 HIPAA Safe Harbor 模式,涵蓋所有日期、具體年齡及其他識別碼,並有最後自檢以找出漏網項目。利用先前去識別化產生的權杖對照表進行反向還原,把原始值恢復回來,讓去識別化、外部處理、再還原的流程都在本機完成。在清洗後文字之外產生去識別化報告供檢視。
- 適用情境
- 適用於醫療或臨床工作流程要把文件交給 AI 助理處理、但可辨識的病患資料不應進入代理情境時,或需要在本機完成去識別化、處理、再還原往返流程時。
- 執行需求
- 透過 npm(npx redacta-mcp)以本機程序在使用者電腦上執行;僅限桌面,沒有網頁可執行版本。未宣告驗證、環境變數或標頭。內建的模式比對只使用 Python 標準函式庫且不連網。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Redacta Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Redacta
[CI] [DOI] [engine] [npm downloads] [redacta-mcp] [PyPI] [App Store] [Anthropic MCP Directory] [Glama MCP server] [Listed on mcpservers.org] [self-hosted]
Pseudonymise medical and clinical documents before they're processed by AI or
shared. Redacta replaces patient identifiers with labelled tokens —
[PATIENT_NAME_1], [NHS_NUMBER_1], [DATE_OF_BIRTH_1], … — while leaving the
clinical meaning intact, and returns a redaction report alongside the cleaned
text.
It started as an Agent Skill and is now one engine shipped across eight surfaces — an iOS app, agent skill, MCP server, a self-hosted HTTP service with a Kubernetes deployment, two libraries, a CLI, and a FigJam whiteboard plugin.
Running this in production? Redacta offers a small number of fixed-price design-partner integrations for teams shipping AI agents on clinical or patient data — deployment in your environment, one real workflow integrated, and a data-flow document written for your DPO. Details →
One engine, many surfaces
The detection logic lives in one place — the TypeScript engine
(@pharmatools/redacta, in npm-package/), which the MCP server and the
FigJam plugin consume, and which the iOS app runs on-device via JavaScriptCore.
The Python package mirrors it for pip users; the agent skill adds LLM reasoning
for free-text names on top of the deterministic patterns.
How it works
[The Redacta privacy boundary: a clinical document is redacted inside your boundary — deterministic patterns plus reasoning plus a self-check — producing tokenised text and a token map. Only the tokenised text crosses to the AI tool; the token map never leaves. The processed output comes back and reinstate restores the original identifiers locally. Raw identifiers never cross the boundary.]Two layers:
- Patterns (deterministic). A bundled script (
scripts/redact_structured.py, Python standard library only, no network) matches fixed-format identifiers: NHS numbers (Modulus-11 validated), UK National Insurance numbers, dates of birth, UK postcodes, phone numbers, emails, and hospital/MRN numbers. US SSN and ZIP codes are also handled. - Reasoning (judgement). The skill then has the agent handle what patterns can't: patient names (told apart from the clinicians treating them), relatives and carers, postal addresses, and identifying ages.
- Self-check. A final pass re-reads the output for any identifier that slipped through before the report is written.
It also works in reverse. Re-identification (scripts/reinstate.py) takes the
token map from an earlier redaction and restores the original values — so you can
redact a document, run it through another AI tool, and put the real details back
locally. Redact → process → re-identify is a complete round trip, and identifiers
only ever exist on your machine.
Safe Harbor mode. Ask for HIPAA Safe Harbor (or "US de-identification") and Redacta applies a stricter pass: all dates (not just the date of birth), all specific ages, and the remaining HIPAA identifiers — fax, certificate/licence, device serial, VIN, and health-plan beneficiary numbers.
Self-hosting on Kubernetes
Organisations that can't let identifiable text leave their environment can
run Redacta inside their own infrastructure: a small HTTP service
(gateway-service/) deployable into an existing
Kubernetes cluster with plain YAML — two stateless replicas behind a
Service for redact/reinstate, an optional single-replica session boundary
for the protect → release loop, health probes, resource limits, restrictive
security defaults, and no-PHI logging. Text is pseudonymised before it
reaches any external AI service, and the processing boundary stays under
your control. Walkthrough (local kind cluster included):
gateway-service/k8s/README.md ·
concepts: docs/KUBERNETES.md.
Deploying somewhere a DPO will ask questions? There's a one-page security &
data-protection summary at
pharmatools.ai/redacta-security.
Install
Claude Code
Then invoke it with /redacta, or let it trigger automatically when you ask to
redact or de-identify clinical text.
Claude apps / API
Zip the repository folder and upload it as a skill.
Contents
Run the tests:
A note on limits
Redacta is a strong first line of defence, not a guarantee. It won't catch every possible identifier and isn't a substitute for formal data-protection processes. Always review the redaction report before sharing text.
License
MIT-0 (MIT No Attribution). Built by PharmaTools.AI.
來源:README.md,提交 895ee84
工具
0版本歷史
2- v2.1.1最新Oct 6, 2026
- v2.1.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分