universal-db-mcp

v1.1.2
io.github.Fashad-Ahmed/universal-db-mcp Checked 20 hours ago Published 5 months ago

Security-first MCP server for PostgreSQL, SQLite, MySQL, DuckDB with SQL injection prevention.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

query Query

Execute a SQL query against the database. Supports parameterized queries for injection safety. In read-only mode, destructive operations (INSERT, UPDATE, DELETE, DROP, etc.) are blocked.

ParameterTypeDescription
sql *stringSQL query to execute
databaseDatabase key (format: "type:name"). Required when multiple databases are configured.
paramsOptional list of parameters for parameterized queries (use instead of string formatting)

schema Schema

Get database schema information: tables, columns, types, and constraints.

ParameterTypeDescription
databaseDatabase key (format: "type:name")
tablesOptional list of specific table names to inspect

explain Explain

Get query execution plan without running the query.

ParameterTypeDescription
sql *stringSQL query to analyze
databaseDatabase key (format: "type:name")
paramsOptional parameters for the query

health Health

Check database connection health and get server version info.

ParameterTypeDescription
databaseDatabase key (format: "type:name")

query_history Query History

Get recent query execution history (most recent first).

ParameterTypeDescription
limitintegerMaximum number of history entries to return (default 10)

snapshot_schema Snapshot Schema

Take a snapshot of the current database schema for later drift detection.

ParameterTypeDescription
databaseDatabase key (format: "type:name")

schema_diff Schema Diff

Compare the current schema against the last snapshot taken with snapshot_schema.

ParameterTypeDescription
databaseDatabase key (format: "type:name")

list_databases List Databases

List all configured databases and their connection status.