Phi Guard MCP server
io.github.Abidit/phi-guard-mcp·v0.2.0Local-first PHI detection for source code, LLM prompts, logs, and analytics
0 stars55 downloads/wk
Reviews
Write oneNobody has reviewed Phi Guard yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Phi Guard tools (2)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
redact_suggestGiven a raw text snippet (a log line, a prompt, an error message), detect PHI-shaped values and return a redacted version.
scan_codeScan a local directory of source files for sensitive identifiers (patient, diagnosis, dob, ssn, mrn, birthdate, medicalrecord) flowing into risky sinks (LLM calls, logging, analytics) before they ship.
Public scan report
scanner v0.1.10 · 2026-10-02 · same rubric, same numbers if you re-run it
- Code scan5 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 15 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Phi Guard compares
Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 92/100
- higher than 90% of 4,460 AI and agents servers
- Tools
- 2
- the typical AI and agents server has 6
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 55
- more than 46% of 1,538 AI and agents servers with a package
What its tools let an agent do: 2 read
Release history: 2 versions in the registry since 2026-09-01, latest 2026-09-17, typically one every 16 days.
Install Phi Guard in Claude Code, Cursor or VS Code
Runs npx -y phi-guard-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add phi-guard-mcp -- npx -y phi-guard-mcp
What the publisher says
From the Phi Guard repository's README, as published. We do not edit it. Read it on GitHub
phi-guard-mcp
A local-first MCP server that catches PHI (protected health information) flowing into LLM prompts, log statements, and analytics calls — in your source code, before it ships.
The server itself makes no network calls: it runs as a local stdio process and never uploads your code. What it returns is a different matter. Findings go back to whatever MCP client launched it, so if that client is a hosted assistant, the findings enter that model's context. Matched PHI values are masked out of results by default for exactly this reason — see Security boundary.
Why
The risky moment in a healthcare codebase is rarely the database. It's the line where a patient record gets interpolated into a prompt, a console.log, or an analytics event. Those lines look harmless in review and never show up in infrastructure scanning, because nothing is misconfigured — the code is just doing what it says.
Demo
Eleven seconds of the walkthrough: scancode flags line 15 — a patient name and diagnosis interpolated into an openai.responses.create call — and redactsuggest masks the same values out of a raw prompt. Every value shown is synthetic.
A linter for one class of mistake. Not a HIPAA certification, not a compliance
attestation, and not a dataflow analyzer — see
What this is NOT.
Install
Requires Node.js 22 or newer. The entrypoint uses JSON import attributes (with { type: "json" }), so older runtimes will not start it. Verified on Node 22.18.0, 24.2.0, and 26.8.2; Node 20 and below are unsupported and untested.
From npm (recommended)
Nothing to clone or build. Your MCP client runs it on demand:
npx -y phi-guard-mcp --versionFrom source
git clone https://github.com/Abidit/phi-guard-mcp.git
cd phi-guard-mcp
npm cinpm ci runs the prepare script, which builds dist/. There is no separate build step to forget. npm install works too; npm ci is the reproducible one because it installs exactly what package-lock.json pins.
MCP configuration
Copy-paste one of the following. The npm form needs no paths and is the one to hand to someone else.
Claude Code
One command, project scope:
claude mcp add phi-guard -- npx -y phi-guard-mcpOr commit a .mcp.json at your project root:
{
"mcpServers": {
"phi-guard": {
"command": "npx",
"args": ["-y", "phi-guard-mcp"]
}
}
}Claude Desktop
~/Library/Application Support/Claude/claudedesktopconfig.json on macOS, %APPDATA%\Claude\claudedesktopconfig.json on Windows:
{
"mcpServers": {
"phi-guard": {
"command": "npx",
"args": ["-y", "phi-guard-mcp"]
}
}
}Cursor
.cursor/mcp.json in the project, or ~/.cursor/mcp.json globally:
{
"mcpServers": {
"phi-guard": {
"command": "npx",
"args": ["-y", "phi-guard-mcp"]
}
}
}Running a local clone instead of the npm release
Point the client at the build output. Use an absolute path unless you are certain your client launches the server with the project root as its working directory:
{
"mcpServers": {
"phi-guard": {
"command": "node",
"args": ["/absolute/path/to/phi-guard-mcp/dist/index.js"]
}
}
}The .mcp.json committed in this repo uses the relative form (dist/index.js) so the repo can dogfood its own server after npm ci.
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Phi Guard: common questions
- Is Phi Guard MCP server safe?
- Yes, by our scan: it is graded A (92/100). Read the Phi Guard safety report
- How do I install Phi Guard?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Phi Guard need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Phi Guard maintained?
- The last commit was 47 days ago (2026-09-18). The latest release is v0.2.0.
- What can I use instead of Phi Guard?
- Servers from other publishers that do the same job: HOL Guard MCP server, Agent-Native Analytics MCP server and Basic Memory MCP server.
- How does Phi Guard compare with other AI and agents MCP servers?
- safety score 92/100 (higher than 90% of 4,460 AI and agents servers); tools 2 (the typical AI and agents server has 6); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Phi Guard
Same job from other publishers: the closest match first, then the best rated.
- HOL GuardLocal-first AI agent security evidence and approval workflows through HOL Guard's stdio MCP server.not reviewedEstablishedA
- Agent-Native AnalyticsAgent-Native Amplitude/Mixpanel - connect data sources, prompt for chartsnot reviewedEstablishedA
- Basic MemoryLocal-first knowledge management with bi-directional LLM sync via Markdown files.not reviewedWidely usedB
- ImageAI image generation and editing with prompt optimization and quality presetsnot reviewedEstablishedB
- OpenWorkProofVerifiable agent evidence; opt-in Codex guard and reference SOC alert review.not reviewedEstablishedA