1. Conduid
  2. Data
  3. Universal DB MCP
MCP server · Data

Universal DB MCP

通用数据库 MCP 连接器:支持 MySQL、PostgreSQL、Oracle、MongoDB 等 17 种数据库,支持 Claude Desktop、Cursor、Windsurf、VS Code、ChatGPT 等 50+ 平台,用自然语言查询和分析数据

Unclaimed MIT last commit 8 months ago data
72Good

Scored 20 hours ago · breakdown

About Universal DB MCP

Universal DB MCP is an MCP server published by Anarkh-Lee in the Data category: 通用数据库 MCP 连接器:支持 MySQL、PostgreSQL、Oracle、MongoDB 等 17 种数据库,支持 Claude Desktop、Cursor、Windsurf、VS Code、ChatGPT 等 50+ 平台,用自然语言查询和分析数据. Conduid read 9 tools from its source: clear_cache, connect_database, disconnect_database, execute_query, get_connection_status, get_enum_values and 3 more. It is published to npm as universal-db-mcp and starts with npx.

The repository has 944 stars and 90 forks, is licensed MIT, and its last commit was on 17 Mar 2026. The latest release is v2.14.0 (17 Mar 2026): [2.14.0] - 2026 新增 MCP stdio 模式动态数据库连接 - 支持在对话中动态连接/切换数据库,无需写死配置 新增 3 个 MCP Tool: connect_database:动态连接数据库,支持全部 17 种数据库类型,已有连接时自动断开旧连接 disconnect_database:断开当前数据库连接 get_… It follows v2.13.0 (17 Mar 2026), and the 5 most recent releases go back to v2.10.1 (10 Mar 2026). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include data.

Install

Claude Code
claude mcp add universal-db-mcp -- npx universal-db-mcp --type mysql --host localhost --port 3306 --user root --password your_password --database your_database
Run
npx universal-db-mcp --type mysql --host localhost --port 3306 --user root --password your_password --database your_database
From source
git clone https://github.com/Anarkh-Lee/universal-db-mcp

Tools (9)

clear_cache清除 Schema 缓存。当数据库结构发生变化(如新增表、修改列)时,可以调用此工具清除缓存。
connect_database连接到数据库。支持动态指定数据库类型和连接参数,无需重启服务。如果当前已有连接,会自动断开旧连接再建立新连接。支持的数据库类型:mysql, postgres, redis, oracle, dm, sqlserver, mongodb, sqlite, kingbase, gaussdb, oceanbase, tidb, clickhouse, polardb, vastbase, highgo, goldendb。
ParameterTypeDescription
allowWriteboolean是否允许写操作(默认 false)
authSourcestringMongoDB 认证数据库(默认 admin)
databasestring数据库名称
filePathstringSQLite 数据库文件路径
hoststring数据库主机地址
oracleClientPathstringOracle Instant Client 路径
passwordstring密码
permissionModestring权限模式: safe(只读) | readwrite(读写不删) | full(完全控制)
portnumber数据库端口
type *string数据库类型
userstring用户名
disconnect_database断开当前数据库连接。断开后需要重新调用 connect_database 才能执行查询。
execute_query执行 SQL 查询或数据库命令。支持 SELECT、JOIN、聚合等查询操作。如果启用了写入模式,也可以执行 INSERT、UPDATE、DELETE 等操作。
ParameterTypeDescription
paramsarray查询参数(可选,用于参数化查询防止 SQL 注入)
query *string要执行的 SQL 语句或数据库命令
get_connection_status获取当前数据库连接状态。返回是否已连接、数据库类型、地址、数据库名、权限模式等信息。
get_enum_values获取指定列的所有唯一值。用于了解 status、type、category 等枚举类型列的所有可能值,帮助生成准确的 WHERE 条件。例如:获取 orders.status 列的所有状态值(pending, shipped, delivered 等)。
ParameterTypeDescription
columnName *string列名(通常是 status、type、category 等枚举类型的列)
includeCountboolean是否包含每个值的出现次数(可选,默认 false)。设为 true 可了解数据分布。
limitnumber最大返回数量(可选,默认 50,最大 100)。如果唯一值超过此数量,说明该列可能不是枚举类型。
tableName *string表名。支持 schema.table_name 格式指定 Schema(如 analytics.users)。
get_sample_data获取表的示例数据(已自动脱敏)。用于了解数据格式,如日期格式(2024-01-01 vs 20240101)、ID格式(UUID vs 自增)、金额精度等。敏感数据(手机号、邮箱、身份证等)会自动脱敏保护隐私。
ParameterTypeDescription
columnsarray要查看的列(可选,默认全部列)
limitnumber返回行数(可选,默认 3,最大 10)
tableName *string表名。支持 schema.table_name 格式指定 Schema(如 analytics.users)。
get_schema获取数据库结构信息,包括所有 Schema 中用户可访问的表名、列名、数据类型、主键、索引等元数据。在执行查询前调用此工具可以帮助理解数据库结构。结果会被缓存以提高性能。
ParameterTypeDescription
forceRefreshboolean是否强制刷新缓存(可选,默认 false)。设为 true 可获取最新的数据库结构。
get_table_info获取指定表的详细信息,包括列定义、索引、预估行数等。用于深入了解某个表的结构。
ParameterTypeDescription
forceRefreshboolean是否强制刷新缓存(可选,默认 false)
tableName *string表名。支持 schema.table_name 格式指定 Schema(如 analytics.users)。不指定 Schema 时查询默认 Schema。

Security checks

Static checks derived from the repository 3 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository's README runs to about 3.0K words.
  • ✓License declaredThe repository declares the MIT license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedDependency versions are pinned by package-lock.json.
  • ✓No dynamic code executionScanned 47 source files and found no eval, dynamic Function or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

What the source scan found

Transport
stdio, Streamable HTTP and HTTP with SSEsrc/mcp/mcp-server.ts:9, src/http/routes/mcp-sse.ts:9, src/http/routes/mcp-sse.ts:10
Starts other programs
No calls that start other programs
Outbound network calls
No outbound network calls
Writes or deletes files
No file writes or deletes
Lockfile
package-lock.json

Pattern matches on the source text of 47 files: places to read, not proof of what the code does at run time.

Releases

v2.14.0v2.14.0 - 🚀 新增 MCP stdio 模式动态数据库连接 · 17 Mar 2026[2.14.0] - 2026 新增 MCP stdio 模式动态数据库连接 - 支持在对话中动态连接/切换数据库,无需写死配置 新增 3 个 MCP Tool: `connect_database`:动态连接数据库,支持全部 17 种数据库类型,已有连接时自动断开旧连接 `disconnect_database`:断开当前数据库连接 `get_connection_status`:查看当前连接状态(类型、地址、权限模式、缓存状态) `--type`…
v2.13.0v2.13.0 - 🚀 修复 stdio MCP server 在客户端(如 Codex CLI)关闭会话后进程挂起的问题 · 17 Mar 2026[2.13.0] - 2026 修复 stdio 进程优雅退出 - 修复 stdio MCP server 在客户端(如 Codex CLI)关闭会话后进程挂起的问题 问题表现:Codex CLI 执行 `/exit` 后终端提示符不返回,必须手动 `Ctrl+C` 根因:未监听 `process.stdin` 的 `end`/`close` 事件;`stop()` 方法未调用 `server.close()` 释放 transport 资源 修复方案:…
v2.12.0v2.12.0 - 🚀 新增 多 Schema 支持 · 16 Mar 2026<html> <body> 变化点 | 之前 | 现在 | -- | -- get_schema 返回的表 | 只有默认 Schema 的表 | 所有用户 Schema 的表 非默认 Schema 表的命名 | 不可见 | schema.table_name 格式(如 analytics.events) 默认 Schema 表的命名 | users | users(不变) 查询非默认 Schema 的表 | 不支持 | 使用 schema.table_name 格式即可(如…
v2.11.0v2.11.0 - 🚀 连接稳定性增强 · 12 Mar 2026[2.11.0] - 2026 改进 连接稳定性增强 - 全面升级数据库连接管理,彻底解决 `Can't add new command when connection is in closed state` 错误 连接池化 - 12 个网络数据库适配器从单连接升级为连接池 MySQL 系列(MySQL、TiDB、OceanBase、PolarDB、GoldenDB):使用 `mysql2` 连接池,配置 `enableKeepAlive` +…
v2.10.1v2.10.1 - 🚀 修改文档中sqllite错误的参数信息 · 10 Mar 2026修改文档中sqllite错误的参数信息 file-path修改为--file

README

The repository's README runs to about 3.0K words, fetched 3 days ago. The original in the repository is authoritative.

Read full README
Questions

About Universal DB MCP

How do I install Universal DB MCP?

In Claude Code, run claude mcp add universal-db-mcp -- npx universal-db-mcp --type mysql --host localhost --port 3306 --user root --password your_password --database your_database. Other MCP clients take the command after "--" in their server configuration.

Is Universal DB MCP safe to use with an AI agent?

Its trust score is 72 out of 100 (good). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Conduid's scan of 47 source files found that it serves MCP over stdio, Streamable HTTP and HTTP with SSE. Its dependencies are pinned by package-lock.json. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Universal DB MCP still maintained?

The last commit was 8 months ago and 12 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.

What tools does Universal DB MCP provide?

Conduid read 9 tools from the source: clear_cache, connect_database, disconnect_database, execute_query, get_connection_status, get_enum_values, get_sample_data, get_schema and 1 more. 6 of them publish their parameters, listed under Tools above.

What license is Universal DB MCP released under?

The repository declares the MIT license. That applies to the latest release, v2.14.0, as well.