Execute SQL queries across multiple database types through a secure MCP server interface.
Connect to multiple database types: PostgreSQL, MySQL, and SQLite using connection strings with unique connection IDs
Manage database connections: Create, list, disconnect individual connections, or disconnect all connections with built-in connection pooling
Execute read-only queries: Run
SELECT,SHOW,DESCRIBE, andEXPLAINSQL queries with validation to prevent destructive operationsExecute data-modifying queries: Perform
INSERT,UPDATE,DELETE,CREATE,ALTER,DROP,TRUNCATE,REPLACE, andMERGEoperationsSecure operations: Designed to work within the Model Context Protocol framework for controlled database access
Enables connection to and querying of MySQL databases through SQL execution, with support for connection management and pooling.
Provides tools for connecting to and executing SQL queries on PostgreSQL databases, including connection pooling and concurrent connection management.
Allows interaction with SQLite databases through SQL query execution and connection management capabilities.
MCP Universal DB Client
🚀 Execute SQL queries on any database through MCP
Model Context Protocol (MCP) server for connecting to and querying multiple databases (PostgreSQL, MySQL, SQLite).
Features
🔌 Support for multiple database types (PostgreSQL, MySQL, SQLite)
🔄 Manage multiple concurrent database connections
🔒 Separate read and write operations for better security
🛡️ SQL query validation to prevent unintended destructive operations
💾 Connection pooling and managementsal DB Client
Supported Databases
PostgreSQL (
psql)MySQL (
mysql)SQLite (
sqlite)
Configuration
Add the server to your MCP settings configuration file:
Available Tools
Database Connection Management
connect_database
Connect to a database using a connection string.
Parameters:
name: Unique name for this connection (used as connection ID)dialect: Database type (psql,mysql, orsqlite)connectionString: Connection string for the database
Example:
list_connections
List all active database connections.
Returns: Array of active connections with their IDs, dialects, and connection times
disconnect_database
Disconnect a specific database connection.
Parameters:
connectionID: The connection ID to disconnect
disconnect_all
Disconnect all active database connections.
Query Execution
query_read - Read-Only Queries
Run SELECT and other read-only SQL queries safely.
Supported Operations:
SELECT- Query dataSHOW- Show database informationDESCRIBE/DESC- Describe table structureEXPLAIN- Explain query execution plan
Parameters:
connectionID: The connection ID (connection name)query: Array of SQL query strings (read-only operations only)
Example:
Security: This tool validates queries and rejects destructive operations, making it safe for read-only access. If a destructive query is detected, it returns an error message suggesting to use query_write instead.
query_write - Destructive Queries ⚠️
Run INSERT, UPDATE, DELETE and other data-modifying queries.
Supported Operations:
INSERT- Insert new dataUPDATE- Update existing dataDELETE- Delete dataCREATE/ALTER/DROP- DDL operationsTRUNCATE- Truncate tableREPLACE/MERGE- Replace/merge data
Parameters:
connectionID: The connection ID (connection name)query: Array of SQL query strings (any operation)
Example:
Security: Use with caution as this tool can modify data. Should be restricted to authorized users only.
License
MIT
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables connecting to and querying multiple database types (PostgreSQL, MySQL, SQLite) through a unified interface. Supports managing multiple concurrent database connections with connection pooling and SQL query execution through MCP tools.