MCP Universal DB Client
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.
README
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:
{
"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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.