MCP Dbutils logo

MCP Dbutils

Community
donghao1393

数读 是一件可以让你的大模型安全连接到数据库的MCP工具。| DButils is an all-in-one MCP service that enables your AI to do data analysis by harnessing versatile types of database (sqlite, mysql, postgres, and more) within a unified configuration of multiple connections in a secured way (like SSL and controlled write access).

Publisherdonghao1393
Repositorymcp-dbutils
LanguagePython
Forks
13
Stars
89
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP Dbutils exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    89 stars and 13 forks from the linked repository.

MCP 数据库工具

构建状态 覆盖率 质量门禁状态

PyPI 版本 PyPI 下载量 Smithery

Python 许可证 GitHub 星标

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

Image

简介

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 文件。

Use MCP Dbutils MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP Dbutils is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP Dbutils as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP Dbutils MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mcp-dbutils": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP Dbutils MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP Dbutils MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP Dbutils to help me with this task?
MCP Dbutils
Sure. I read it.
Here is what I found using MCP Dbutils.

Frequently asked questions

What is the MCP Dbutils MCP server used for?

MCP Dbutils is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP Dbutils MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP Dbutils with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP Dbutils MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP Dbutils connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP Dbutils MCP to TypingMind?

MCP Dbutils runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP Dbutils MCP provide in TypingMind?

MCP Dbutils exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP Dbutils MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP Dbutils requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇