Skip to main content
Glama
pii-safe-db-mcp

pii-safe-db-mcp

by aqibsidd

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_SSLNoEnables TLS with certificate verification. Default: false
DB_HOSTNoDatabase host, used as an alternative to DATABASE_URL
DB_NAMENoDatabase name, used as an alternative to DATABASE_URL
DB_PORTNoDatabase port, used as an alternative to DATABASE_URL
DB_TYPENoDatabase type: mysql or postgres. Needed only if DATABASE_URL is not set.
DB_USERNoDatabase user, used as an alternative to DATABASE_URL
MAX_ROWSNoMaximum number of rows returned per query. Default: 200
DB_PASSWORDNoDatabase password, used as an alternative to DATABASE_URL
DATABASE_URLNoDatabase connection URL, e.g. mysql://user:pass@host:3306/db or postgres://user:pass@host:5432/db
PII_MASK_MODENoMasking mode: token, partial, or redact. Default: token
PII_SCAN_VALUESNoScans text values for embedded PII. Default: true
PII_TOKEN_SECRETNoHMAC secret for tokens. Set it to keep tokens stable across restarts. Default: random per run
QUERY_TIMEOUT_MSNoPer-query timeout in milliseconds. Default: 15000
PII_ALLOW_COLUMNSNoComma-separated columns never masked, for false positives, e.g. name or products.name
PII_EXTRA_COLUMNSNoComma-separated columns that are always fully masked, e.g. notes or table.column
PII_BLOCKED_COLUMNSNoComma-separated list of columns that can never be queried, e.g. password_hash,otp

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_tablesA

List tables and views in the connected postgres database.

describe_tableA

Show the columns of a table, their types, and whether each column is classified as PII (and will be masked) or blocked.

queryA

Run a single read-only SQL statement (SELECT / WITH / SHOW / DESCRIBE / EXPLAIN) against postgres. Results are capped at 200 rows. PII is masked before results are returned: columns recognised as PII (email, phone, name, address, Aadhaar, PAN, card numbers, passwords...) are replaced with stable tokens like <EMAIL_3f9a1c2b7d> (same input → same token, so you can still GROUP BY / COUNT DISTINCT / compare), and PII patterns found inside other text columns are masked too. Prefer aggregates (COUNT, GROUP BY) over pulling raw rows. Use ? (MySQL) or $1 (Postgres) placeholders with params.

pii_scanA

Sample rows from a table and report which columns contain PII (by column name and by detected values). Returns counts only, never values. Use it to discover PII hiding in free-text columns.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation4/5

Each tool has a fairly clear role: schema listing, schema inspection, ad-hoc SQL execution, and PII value sampling. The main soft overlap is between describe_table (declared/classified PII) and pii_scan (PII detected in sampled values), which could confuse an agent deciding how to audit a column, but the descriptions do distinguish name-based vs value-based detection.

Naming Consistency3/5

list_tables and describe_table follow a clean verb_noun snake_case pattern, but 'query' is a bare verb with no object and 'pii_scan' reverses the order into noun_verb. Readable overall, but the convention is not uniform across the set.

Tool Count4/5

Four tools is lean but defensible for a deliberately read-only, PII-safe database interface where each tool maps to a distinct stage (discover tables, inspect columns, execute, audit PII). It sits just below the ideal range, and a schema-search or relationship tool could plausibly earn a place.

Completeness4/5

The read-only domain is well covered: discovery, column classification, masked querying with parameters, and PII detection in free text. Gaps are minor and mostly by design (no foreign-key/relationship introspection, hard 200-row cap with no pagination), and agents can work around them via query.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues