Phi Guard MCP server
{
"mcpServers": {
"abidit-phi-guard": {
"command": "npx",
"args": [
"-y",
"phi-guard-mcp@latest"
]
}
}
}{
"mcpServers": {
"abidit-phi-guard": {
"command": "npx",
"args": [
"-y",
"phi-guard-mcp@latest"
]
}
}
}{
"mcpServers": {
"abidit-phi-guard": {
"command": "npx",
"args": [
"-y",
"phi-guard-mcp@latest"
]
}
}
}{
"servers": {
"abidit-phi-guard": {
"command": "npx",
"args": [
"-y",
"phi-guard-mcp@latest"
]
}
}
}{
"mcpServers": {
"abidit-phi-guard": {
"command": "npx",
"args": [
"-y",
"phi-guard-mcp@latest"
]
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsoninstall npx -y phi-guard-mcpversion 0.1.4
What it does
Phi Guard is a local-first MCP server that detects protected health information (PHI) in source code, LLM prompts, logs, and analytics calls before deployment. It runs entirely on your machine and never sends code or detected values outside your system. It is for developers working on healthcare codebases who need to prevent accidental PHI leakage into LLM calls, logging statements, and analytics events.
- Scan a codebase directory to flag lines where sensitive identifiers like patient, diagnosis, or MRN appear alongside risky sinks like LLM API calls, console.log, or analytics trackers.
- Redact PHI from text snippets (log lines, prompts, error messages) by detecting patterns like SSN, MRN, date of birth, name, phone, and email, and return the redacted version with confidence scores.
- Review individual strings or code snippets during development to check for and remove PHI before it reaches logging, analytics, or LLM integrations.
Tools this server exposes
| Tool | Does |
|---|---|
| redact_suggest | Detects PHI patterns (SSN, MRN, DOB, name, phone, email) in a text snippet and returns a redacted version with confidence scores and match locations. |
| scan_code | Walks a directory tree and flags lines where sensitive identifiers appear alongside risky sinks like LLM calls, console.log, loggers, or analytics capture funct |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.