MCP server that rewrites SQL to prevent PII/PHI exposure in AI agent queries
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"sanitized-db-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# Sanitized DB MCP Server [](https://pypi.org/project/sanitized-db-mcp/) [](https://ghcr.io/ruminaider/sanitized-db-mcp) [](https://github.com/ruminaider/sanitized-db-mcp/actions/workflows/test.yml) An MCP server that rewrites SQL queries at the AST level to prevent PII/PHI exposure. ## Why This Exists AI agents write SQL. They also hallucinate column names, ignore access controls, and cheerfully SELECT * from tables full of personal data. This server sits between the agent and your PostgreSQL database, rewriting every query so hidden columns return type-preserving placeholders instead of real values. The agent gets useful results; your users keep their privacy. ## Quick Start ### 1. Create an allowlist Generate a scaffold from your database schema: ```bash # Install the CLI (skip if using uvx or Docker below) pip install sanitized-db-mcp sanitized-db-mcp generate-allowlist --database-url postgresql://user:pass@host:5432/mydb > allowlist.yaml ``` Edit the YAML to expose only the columns agents should see (see [Generating an Allowlist](#generating-an-allowlist) below). ### 2. Run the server Pick one of the four methods below and add the config to your `.mcp.json`. #### Method 1: uvx (recommended — zero install) `uvx` runs the package in an isolated environment with no permanent installation and no dependency conflicts. Unlike pip, there is nothing to install or manage. Unlike Docker, there are no volume mounts or path mappings to configure. ```json { "sanitized-db": { "type": "stdio", "command": "uvx", "args": ["sanitized-db-mcp"], "env": { "ALLOWLIST_PATH": "./allowlist.yaml", "DATABASE_URL": "postgresql://user:pass@host:5432/mydb" } } } ``` No install needed. `uvx` downloads and runs the package in…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.