通用数据库 MCP 服务器

通用数据库 MCP 服务器

universal-db-mcp-server•byxiaoshi7915

一个通用数据库 MCP 服务器,可连接多种关系型数据库,并提供数据库结构信息、样例数据查看和只读 SQL 查询。

License: MIT License•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •支持连接到 MySQL、PostgreSQL、Oracle、SQL Server 和 SQLite 多种关系型数据库。
  • •提供数据库元数据访问,包括表结构、字段注释、主键、索引和外键信息。
  • •可快速查看各表的数据样例。
  • •安全执行任意只读 SQL 查询,并自动掩码敏感信息以保护隐私数据。

BEST FOR

  • •让大语言模型通过标准 MCP 协议访问多种关系型数据库的结构信息与只读查询。
  • •需要在只读约束下安全探索数据库表与样例数据的场景。

ABOUT UNIVERSAL-DB-MCP-SERVER

通用数据库 MCP 服务器 is cataloged as an MCP server attributed to xiaoshi7915. 一个通用数据库 MCP 服务器,可连接多种关系型数据库,并提供数据库结构信息、样例数据查看和只读 SQL 查询。 It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for 通用数据库 MCP 服务器 are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

支持哪些数据库类型?

支持 MySQL、PostgreSQL、Oracle、SQL Server 和 SQLite。

是否允许修改数据库?

仅支持只读查询,禁止修改数据库操作。

敏感数据如何处理?

敏感信息(如密码、个人身份信息)会自动进行掩码处理,并建议使用只有读取权限的数据库用户。

Upstream README

View this exact version on GitHub

README.md · bd23b8415fb9 · Fetched 2026-11-13 10:36:20 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

通用数据库 MCP 服务器

这是一个通用的数据库 MCP (Model Context Protocol) 服务器,支持连接到各种关系型数据库系统并提供数据库结构信息和执行只读 SQL 查询。

功能特点

  • 多数据库支持:MySQL、PostgreSQL、Oracle、SQL Server和SQLite
  • 元数据访问:获取数据库表结构、字段注释、主键、索引和外键信息
  • 样例数据查看:快速查看各表数据样例
  • 只读SQL查询:安全执行任意只读SQL查询
  • 数据隐私保护:自动掩码敏感信息,保护隐私数据
  • MCP协议通信:通过标准MCP协议与大语言模型通信
  • SSE传输:使用服务器推送事件(SSE)传输,无WebSocket依赖

系统要求

  • Python 3.10 或更高版本
  • 适用的数据库服务器(根据需要): MySQL、PostgreSQL、Oracle、SQL Server或SQLite

快速开始

直接安装

  1. 克隆仓库:

    git clone https://github.com/xiaoshi7915/universal-db-mcp-server.git
    cd universal-db-mcp-server
    
  2. 安装依赖:

    pip install -r requirements.txt
    
  3. 启动服务器:

    ./start.sh --db-host localhost --db-user root --db-password password --db-name mydatabase
    

Docker部署

  1. 构建Docker镜像:

    docker build -t universal-db-mcp-server .
    
  2. 运行Docker容器:

    docker run -p 8088:8088 -e DB_HOST=host.docker.internal -e DB_USER=root -e DB_PASSWORD=password -e DB_NAME=mydatabase universal-db-mcp-server
    

配置选项

可以通过环境变量或命令行参数配置服务器:

参数环境变量说明默认值
--hostHOST服务器主机地址0.0.0.0
--portPORT服务器端口8088
--db-typeDB_TYPE数据库类型mysql
--db-hostDB_HOST数据库主机地址localhost
--db-portDB_PORT数据库端口3306
--db-userDB_USER数据库用户名root
--db-passwordDB_PASSWORD数据库密码(空)
--db-nameDB_NAME数据库名称(空)
--verbose-启用详细日志输出false

与Claude集成

要将此服务器与Claude集成,请在claude_desktop_config.json文件中添加以下配置:

{
  "mcpServers": {
    "db": {
      "command": "/path/to/start.sh",
      "args": [
        "--db-host", "localhost",
        "--db-user", "root",
        "--db-password", "password",
        "--db-name", "mydatabase"
      ],
      "env": {
        "DB_TYPE": "mysql"
      }
    }
  }
}

Docker Compose部署

对于更完整的部署环境,可以使用Docker Compose:

version: '3'

services:
  db-mcp-server:
    build: .
    ports:
      - "8088:8088"
    environment:
      - DB_TYPE=mysql
      - DB_HOST=mysql
      - DB_PORT=3306
      - DB_USER=root
      - DB_PASSWORD=rootpassword
      - DB_NAME=testdb
    depends_on:
      - mysql

  mysql:
    image: mysql:8.0
    environment:
      - MYSQL_ROOT_PASSWORD=rootpassword
      - MYSQL_DATABASE=testdb
    volumes:
      - mysql-data:/var/lib/mysql

volumes:
  mysql-data:

安全注意事项

  • 服务器默认监听所有网络接口 (0.0.0.0),生产环境中建议只监听localhost或使用反向代理
  • 敏感信息(如密码、个人身份信息)会自动进行掩码处理,但建议在生产环境中使用只有读取权限的数据库用户
  • 仅支持只读查询,禁止修改数据库操作

许可

MIT License

贡献

欢迎提交问题和拉取请求!

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for 通用数据库 MCP 服务器 from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/universal-db-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage