MCP Universal DB Client
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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Universal DB Client connect to my production database and show me the users table schema"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: mcp-tools-sql
Supported Databases
PostgreSQL (
psql)MySQL (
mysql)SQLite (
sqlite)
Configuration
Add the server to your MCP settings configuration file:
{
"mcpServers": {
"universal-db-client": {
"command": "npx",
"args": ["-y", "@izumisy/mcp-universal-db-client"]
}
}
}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:
{
"name": "my-postgres-db",
"dialect": "psql",
"connectionString": "postgresql://user:password@localhost:5432/mydb"
}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:
{
"connectionID": "my-postgres-db",
"query": [
"SELECT * FROM users WHERE id = 1",
"SELECT COUNT(*) FROM orders WHERE status = 'pending'"
]
}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:
{
"connectionID": "my-postgres-db",
"query": [
"INSERT INTO users (name, email) VALUES ('John Doe', 'john@example.com')",
"UPDATE orders SET status = 'completed' WHERE id = 123"
]
}Security: Use with caution as this tool can modify data. Should be restricted to authorized users only.
License
MIT
Available Tools
5 toolsconnect_databaseConnect DatabaseC
Connect to a database using connection string
Inputs: connectionString (required), dialect (required).
disconnect_allDisconnect AllB
Disconnect all active database connections
Inputs: no named parameters.
disconnect_databaseDisconnect DatabaseC
Disconnect from a database using connection ID
Inputs: connectionID (required).
list_connectionsList ConnectionsB
List all active database connections
Inputs: no named parameters.
run_queryRun SQL QueryC
Run SQL query on the connected database
Inputs: connectionID (required), query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no overlap: connect_database establishes connections, disconnect_all and disconnect_database manage disconnection (with clear scope differences), list_connections provides status, and run_query executes queries. The descriptions make it impossible to confuse these tools.
All tools follow a consistent verb_noun pattern (e.g., connect_database, disconnect_all, run_query) with clear, descriptive names. There are no deviations in style or convention, making the set highly predictable and readable.
With 5 tools, this server is well-scoped for database connectivity and query execution. Each tool earns its place by covering essential operations (connect, disconnect, list, query) without unnecessary bloat or missing core functionality.
The toolset covers the core lifecycle of database connections (connect, disconnect, list) and query execution, with no dead ends. A minor gap exists in lacking tools for schema inspection or transaction management, but agents can work around this using run_query for such operations.
Maintenance
Related MCP Connectors
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Hosted PostgreSQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs and agents to interact with relational databases (SQL Server, MySQL, PostgreSQL) through MCP tools. Supports executing queries, inserting records, listing tables, and exposing database schemas with secure credential management.-
- AlicenseNot gradedqualityBmaintenanceProvides safe, configurable SQL database access via MCP tools, enabling schema introspection, predefined queries, and structured updates with multi-backend support.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables database interaction (MySQL, PostgreSQL, SQL Server) via MCP, supporting SQL queries and command execution.14 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables LLM agents to connect to and retrieve data from PostgreSQL, MySQL, SQLite, BigQuery, Oracle, MS SQL, and Redshift via a unified MCP API, with schema normalization, query optimization, and secure connections.-