Database MCP server with multi-database SQL tools

Database MCP server with multi-database SQL tools

database-mcp•byxavieryang007

An MCP service that connects to databases via GORM and exposes tools for listing tables, inspecting table details, and executing SQL queries.

License: Not specified•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Offers MCP tools to get all database tables with names and comments, and to get detailed column information for a specific table.
  • •Provides an execute_sql tool that runs SQL queries, returning result arrays for SELECT queries and affected row counts for other queries.
  • •Supports MySQL, PostgreSQL, SQLite, SQL Server and ClickHouse databases through GORM.
  • •Can be configured via a YAML configuration file, command line arguments, or environment variables.

BEST FOR

  • •Letting an MCP client explore database schema, including tables and column details, before writing queries.
  • •Running SELECT and non-SELECT SQL statements against a configured database through an MCP tool.
  • •Working across several relational and analytical database engines with a single MCP service.

ABOUT DATABASE-MCP

Database MCP server with multi-database SQL tools is cataloged as an MCP server attributed to xavieryang007. An MCP service that connects to databases via GORM and exposes tools for listing tables, inspecting table details, and executing SQL queries. 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: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

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 Database MCP server with multi-database SQL tools 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

Which database types does the service support?

MySQL, PostgreSQL, SQLite, SQL Server and ClickHouse are supported.

How can the service be configured?

It can be configured through a YAML configuration file, command line arguments and environment variables.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 0572a39a511d · 采集于 2026-11-13 11:30:42 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Database MCP Service

A MCP (Metoro Control Protocol) service with database capabilities, supporting multiple database types through GORM.

Features

  • Support for multiple database types:
    • MySQL
    • PostgreSQL
    • SQLite
    • SQL Server
    • ClickHouse
  • Configuration through:
    • Configuration file (YAML)
    • Command line arguments
    • Environment variables
  • MCP protocol integration
  • GORM ORM support

Installation

  1. Clone the repository
  2. Install dependencies:
    go mod tidy
    

Configuration

Configuration File (config.yaml)

Create a config.yaml file with the following structure:

database:
  type: "mysql"  # mysql, postgres, sqlite, sqlserver, clickhouse
  host: "localhost"
  port: 3306
  username: "root"
  password: "password"
  database: "mydb"
  ssl_mode: "disable"  # for postgres
  file: "database.db"  # for sqlite

Command Line Arguments

You can override configuration file settings using command line arguments:

./database-mcp --config=config.yaml \
  --db-type=mysql \
  --db-host=localhost \
  --db-port=3306 \
  --db-user=root \
  --db-pass=password \
  --db-name=mydb \
  --db-ssl-mode=disable \
  --db-file=database.db

Available command line arguments:

  • --config: Path to config file (default: "config.yaml")
  • --db-type: Database type (mysql, postgres, sqlite, sqlserver, clickhouse)
  • --db-host: Database host
  • --db-port: Database port
  • --db-user: Database username
  • --db-pass: Database password
  • --db-name: Database name
  • --db-ssl-mode: SSL mode (for PostgreSQL)
  • --db-file: Database file (for SQLite)

Usage

  1. Start the service:

    ./database-mcp --db-type=mysql --db-host=127.0.0.1 --db-port=3306 --db-user=dbuser --db-pass=passwd --db-name=dbname --db-ssl-mode=disable --mode=http
    
  2. The service will:

    • Load configuration from file and/or command line
    • Initialize database connection
    • Start MCP server
    • Register available tools and resources

MCP Configuration

To use the MCP service, configure the MCP endpoint in your MCP client:

http://127.0.0.1:8080/sse

This will connect your MCP client to the local service running on port 8080.

MCP Tools

The service provides the following MCP tools:

  1. get_tables: Get all tables in the database
    • Returns a list of tables with their names and comments
  2. get_table_detail: Get detailed information about a specific table
    • Arguments:
      • table_name: The name of the table to get details for
    • Returns table information including:
      • Table name and comment
      • Column information (name, type, comment, nullable, default value)
  3. execute_sql: Execute a SQL query
    • Arguments:
      • query: The SQL query to execute
    • Returns:
      • For SELECT queries: An array of results
      • For other queries: The number of rows affected

License

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 Database MCP server with multi-database SQL tools 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/database-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

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

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

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