mcp-dbutils

MIT License
65
  • Linux
  • Apple

Integrations

  • Provides containerized deployment options with specific configurations for database connections from within Docker environments.

  • Enables connection to MySQL databases with support for secure connections, allowing SQL query execution, schema information retrieval, and performance analysis.

  • Provides a unified database access interface to PostgreSQL databases, allowing SQL query execution, table structure retrieval, and database analysis capabilities.

MCP 数据库工具

English | Français | Español | العربية | Русский | 文档导航

简介

MCP Database Utilities 是一个多功能的 MCP 服务,它使您的 AI 能够通过统一的连接配置安全地访问各种类型的数据库(SQLite、MySQL、PostgreSQL 等)进行数据分析。

您可以将其视为 AI 系统和数据库之间的安全桥梁,允许 AI 在不直接访问数据库或冒数据修改风险的情况下读取和分析您的数据。

核心特性

  • 安全优先:严格只读操作,无直接数据库访问,隔离连接,按需连接,自动超时
  • 隐私保障:本地处理,最小数据暴露,凭证保护,敏感数据屏蔽
  • 多数据库支持:使用相同的接口连接 SQLite、MySQL、PostgreSQL
  • 简单配置:所有数据库连接使用单个 YAML 文件
  • 高级功能:表格浏览、架构分析和查询执行

🔒 安全说明:MCP 数据库工具采用安全优先的架构设计,非常适合注重数据保护的企业、初创公司和个人用户。详细了解我们的安全架构

快速入门

我们提供了多种安装方式,包括 uvx、Docker 和 Smithery。详细的安装和配置步骤请参阅安装指南

基本步骤

  1. 安装:选择适合您的安装方式(详细说明
  2. 配置:创建包含数据库连接信息的 YAML 文件(配置指南
  3. 连接:将配置添加到您的 AI 客户端
  4. 使用:开始与您的数据库交互(使用指南

示例交互

:"能否列出我的数据库中的所有表?"

AI:"以下是您的数据库中的表:

  • customers(客户)
  • products(产品)
  • orders(订单)
  • inventory(库存)"

:"customers 表的结构是什么样的?"

AI:"customers 表有以下结构:

  • id(整数,主键)
  • name(文本)
  • email(文本)
  • registration_date(日期)"

文档导航

入门指南

技术文档

示例文档

多语言文档

支持与反馈

可用工具

MCP 数据库工具提供了多种工具,使 AI 能够与您的数据库交互:

  • dbutils-list-connections:列出配置中的所有可用数据库连接,包括数据库类型、主机、端口和数据库名称等详细信息,同时隐藏密码等敏感信息。
  • dbutils-list-tables:列出指定数据库连接中的所有表,包括表名、URI和可用的表描述,按数据库类型分组以便于识别。
  • dbutils-run-query:执行只读SQL查询(仅SELECT),支持包括JOIN、GROUP BY和聚合函数在内的复杂查询,返回包含列名和数据行的结构化结果。
  • dbutils-describe-table:提供表结构的详细信息,包括列名、数据类型、是否可为空、默认值和注释,以易于阅读的格式呈现。
  • dbutils-get-ddl:获取创建指定表的完整DDL(数据定义语言)语句,包括所有列定义、约束和索引。
  • dbutils-list-indexes:列出指定表上的所有索引,包括索引名称、类型(唯一/非唯一)、索引方法和包含的列,按索引名称分组。
  • dbutils-get-stats:获取表的统计信息,包括估计行数、平均行长度、数据大小和索引大小。
  • dbutils-list-constraints:列出表上的所有约束,包括主键、外键、唯一约束和检查约束,对于外键约束还显示引用的表和列。
  • dbutils-explain-query:获取SQL查询的执行计划,显示数据库引擎将如何处理查询,包括访问方法、连接类型和估计成本。
  • dbutils-get-performance:获取数据库连接的性能指标,包括查询计数、平均执行时间、内存使用情况和错误统计。
  • dbutils-analyze-query:分析SQL查询的性能特性,提供执行计划、实际执行时间和具体的优化建议。

有关这些工具的详细说明和使用示例,请参阅使用指南

星标历史

许可证

本项目采用 MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

DButils is an all-in-one MCP service that enables your AI to do data analysis by accessing versatile types of database (sqlite, mysql, postgres, and more) within a unified connection configuration in a safe way.

  1. 简介
    1. 核心特性
  2. 快速入门
    1. 基本步骤
    2. 示例交互
  3. 文档导航
    1. 入门指南
    2. 技术文档
    3. 示例文档
    4. 多语言文档
    5. 支持与反馈
  4. 可用工具
    1. 星标历史
      1. 许可证

        Related MCP Servers

        • -
          security
          F
          license
          -
          quality
          An MCP server that provides safe, read-only access to SQLite databases through MCP. This server is built with the FastMCP framework, which enables LLMs to explore and query SQLite databases with built-in safety features and query validation.
          Last updated -
          49
          Python
        • -
          security
          A
          license
          -
          quality
          MCP to access any database accessible via JDBC such as Postgres, Oracle, mysql, mariadb, sqlite etc.
          Last updated -
          103
          Apache 2.0
        • -
          security
          A
          license
          -
          quality
          The Multi DB MCP Server is a high-performance implementation of the Database Model Context Protocol designed to revolutionize how AI agents interact with databases. Currently supporting MySQL and PostgreSQL databases.
          Last updated -
          142
          Go
          MIT License
          • Linux
          • Apple
        • -
          security
          -
          license
          -
          quality
          An MCP server that allows working with MySQL databases by providing tools for executing read-only SQL queries, getting table schemas, and listing database tables.
          Last updated -
          1
          JavaScript

        View all related MCP servers

        ID: jrocqkgtpd