DBShield Database Guardrail & Sandboxing MCP Server
v0.2.1Safety-first Database Guardrail & Sandboxing MCP Server for AI Coding Agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
db_status
Check DBShield security gateway status, active safety tier, and database connection.
db_describe_schema
Safely introspect database tables, column types, nullable flags, primary keys, and foreign key relationships.
| Parameter | Type | Description |
|---|---|---|
tableName | string | Optional specific table name to inspect. If omitted, returns all tables. |
db_query
Safely execute a SQL query through DBShield guardrails. Destructive DDL and unconstrained mutations without WHERE clauses are automatically intercepted and blocked.
| Parameter | Type | Description |
|---|---|---|
sql * | string | The SQL query to execute. |
intent | string | Stated user-facing instruction or business justification for the SQL query. Required in STRICT tier when modifying sensitive fields. |
params | array | Optional parameterized query values. |
db_dry_run
Simulate a database mutation inside an auto-rollback transaction sandbox. Calculates blast radius, affected row count, and returns a short-lived authorization token if safe.
| Parameter | Type | Description |
|---|---|---|
sql * | string | The SQL mutation (UPDATE, INSERT, DELETE) to simulate. |
intent | string | Optional stated prompt intent or business justification for the mutation. |
params | array | Optional parameterized query values. |
db_commit
Permanently execute and commit a mutation previously authorized by 'db_dry_run'. Requires a valid, single-use commitToken.
| Parameter | Type | Description |
|---|---|---|
commitToken * | string | The single-use authorization token obtained from 'db_dry_run'. |
sql * | string | The exact SQL query that was dry-run and authorized. |
params | array | Optional parameterized query values. |
db_explain_query
Analyze query execution plan (EXPLAIN) to detect sequential full-table scans, missing indexes, and performance bottlenecks.
| Parameter | Type | Description |
|---|---|---|
sql * | string | The SQL query to explain. |
params | array | Optional parameterized query values. |
db_audit_log
Retrieve the security and compliance query audit trail, including blocked operations, risk scores, and PII redactions.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of entries to retrieve (default: 20). |
minRiskScore | number | Filter for queries with riskScore >= minRiskScore. |
status | string | Filter by status: SUCCESS, BLOCKED, DRY_RUN_APPROVED, DRY_RUN_REJECTED, COMMITTED, ERROR. |
db_validate_migration
Analyze DDL migrations against zero-downtime safety rules, detect table-level locking risks (e.g. non-concurrent index creation), dangerous NOT NULL columns, and destructive column/table drops.
| Parameter | Type | Description |
|---|---|---|
sql * | string | The DDL SQL statement or multi-statement migration script to validate. |
db_check_schema_drift
Inspect database schema health, identify unindexed foreign keys causing cascade locks, and detect schema drift.
db_check_semantic_intent
Compare stated user prompt intent against SQL AST target columns to detect unauthorized modification of sensitive privilege, financial, or credential columns.
| Parameter | Type | Description |
|---|---|---|
sql * | string | The SQL query to check. |
intent | string | The stated prompt intent or instruction. |
db_distributed_dry_run
Simulate atomic mutations across multi-store environments (e.g. PostgreSQL + Redis + SQLite) and receive a single distributed commit token.
| Parameter | Type | Description |
|---|---|---|
operations * | array |
db_distributed_commit
Execute two-phase distributed commit across multi-store environments using an authorized distributed dry-run token.
| Parameter | Type | Description |
|---|---|---|
operations * | array | |
token * | string |