donghao1393_mcp_dbutils

donghao1393_mcp_dbutils

by donghao1393
An MCP service enabling AI to perform secure data analysis across multiple database types like SQLite, MySQL, and PostgreSQL.

MCP Database Utilities for AI Data Analysis

Overview

MCP Database Utilities is a versatile MCP service that enables your AI to perform data analysis by securely accessing various types of databases (SQLite, MySQL, PostgreSQL, etc.) through a unified configuration. It acts as a secure bridge between AI systems and databases, allowing AI to read and analyze data without direct database access or the risk of data modification.

Key Features

  • Multi-Database Support: Connect to SQLite, MySQL, PostgreSQL, and more.
  • Secure Architecture: Strictly read-only operations, isolated connections, and automatic timeouts.
  • Local Processing: All data processing occurs locally, ensuring no data is sent to external servers.
  • Simple Configuration: Manage all database connections using a single YAML file.
  • Advanced Tools: Table browsing, schema analysis, and query execution.

Security and Privacy

Data Protection

  • Strictly Read-Only: Only SELECT queries are allowed.
  • Isolated Connections: Each database connection is managed and isolated separately.
  • Automatic Timeouts: Long-running operations are automatically terminated to prevent resource abuse.

Privacy Assurance

  • Local Processing: All data is processed locally, with no data sent to external servers.
  • Credential Protection: Connection credentials are never exposed to AI models.
  • Sensitive Data Masking: Passwords and connection details are automatically hidden in logs.

Enterprise-Level Security

  • SSL/TLS Support: Encrypted connections to remote databases.
  • Configuration Separation: YAML configuration files eliminate interpretation risks.
  • User-Controlled Access: You decide which databases can be accessed.

System Requirements

  • Python: 3.10 or higher.
  • Database Support:
  • SQLite 3.x
  • PostgreSQL 12+
  • MySQL 8+
  • AI Clients:
  • Claude Desktop
  • Cursor
  • Any MCP-compatible client

Getting Started

Installation Guide

Option A: Using uvx (Recommended)

  1. Install uv and uvx:
    shell curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Create a configuration file (config.yaml) with your database connection details.
  3. Add the configuration to your AI client:
    json "dbutils": { "command": "uvx", "args": ["mcp-dbutils", "--config", "/path/to/your/config.yaml"] }

Option B: Using Docker

  1. Install Docker from docker.com.
  2. Create a configuration file (config.yaml).
  3. Add the configuration to your AI client:
    json "dbutils": { "command": "docker", "args": ["run", "-i", "--rm", "-v", "/path/to/your/config.yaml:/app/config.yaml", "mcp/dbutils", "--config", "/app/config.yaml"] }

Option C: Using Smithery (Claude One-Click Configuration)

npx -y @smithery/cli install @donghao1393/mcp-dbutils --client claude

Usage

Once installed and configured, your AI can:
- List tables in the database.
- View table structures.
- Execute SQL queries securely.
- Analyze data across multiple databases.

Example Interaction:
- You: "Can you list all the tables in my database?"
- AI: "Here are the tables in your database: customers, products, orders, inventory, employees."

Available Tools

  • dbutils-list-tables: List all tables in the database.
  • dbutils-run-query: Execute SQL queries (SELECT only).
  • dbutils-get-stats: Get statistics about tables.
  • dbutils-list-constraints: List table constraints.
  • dbutils-explain-query: Get query execution plans.
  • dbutils-get-performance: Get database performance metrics.
  • dbutils-analyze-query: Analyze queries for optimization.

Need More Help?

License

This project is licensed under the MIT License. See the LICENSE file for details.

Features & Capabilities

Categories
mcp_server model_context_protocol python database sqlite mysql postgres api_integration docker ssl data_analysis

Implementation Details

Stats

0 Views
42 GitHub Stars

Repository Info

donghao1393 Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300
SunMonTueWedThuFriSat
303112345678910111213141516171819202122232425262728293012345678910
:
PM
SunMonTueWedThuFriSat
303112345678910111213141516171819202122232425262728293012345678910
:
PM