Skip to main content
Glama
keevor-mysql-mcp-server

keevor-mysql-mcp-server

by KeeVor

keevor-mysql-mcp-server

一个 MCP (Model Context Protocol) 服务器,用于连接 MySQL 数据库并执行常用操作。

功能

  • list_tables - 查询数据库中的所有表

  • describe_table - 查询指定表的结构

  • execute_sql - 执行 SQL 语句

Related MCP server: MySQL Custom MCP Server

使用方法

1. 安装 uv

# Windows (PowerShell)
irm https://astral.sh/uv/install.ps1 | iex

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

2. 配置 MCP

在 AI 工具的 MCP 配置文件中添加:

{
  "mcpServers": {
    "keevor-mysql-mcp-server": {
      "command": "uvx",
      "args": ["keevor-mysql-mcp-server"],
      "env": {
        "DB_HOST": "localhost",
        "DB_PORT": "3306",
        "DB_USER": "root",
        "DB_PASSWORD": "your_password",
        "DB_NAME": "your_database"
      }
    }
  }
}

3. 开始使用

配置完成后,AI 助手即可使用以下工具:

  • 查询所有表:调用 list_tables

  • 查询表结构:调用 describe_table,传入表名

  • 执行 SQL:调用 execute_sql,传入 SQL 语句

环境变量

变量

说明

默认值

DB_HOST

数据库主机地址

localhost

DB_PORT

数据库端口

3306

DB_USER

数据库用户名

root

DB_PASSWORD

数据库密码

-

DB_NAME

数据库名称

-

License

MIT

Available Tools

3 tools
describe_tableA

查询指定表的详细结构,包含字段注释、索引、外键等信息

Args:
    table_name: 要查询结构的表名

Inputs: table_name (required). Returns: result

execute_sqlC

执行SQL语句

Args:
    sql: 要执行的SQL语句

Inputs: sql (required). Returns: result

list_tablesA

查询数据库中的所有表,包含表注释、引擎、行数等信息

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clear, distinct purpose: list_tables retrieves metadata about all tables, describe_table zooms into a single table's structure, and execute_sql runs arbitrary queries. No overlaps.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern (list_tables, describe_table, execute_sql), making them predictable and easy to understand.

    Tool Count4/5

    With only 3 tools, the server covers the minimum needed for MySQL interaction. While a bit sparse, the tools are well-chosen and each one serves a necessary role, making the count appropriate for a focused utility server.

    Completeness3/5

    The tool set covers basic discovery (list, describe) and execution (execute_sql), but lacks specialized tools for common operations like SELECT, INSERT, or database management. The generic execute_sql fills many gaps, so the surface is functional but not comprehensive.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP server that enables interaction with MySQL databases through the Model Context Protocol, allowing execution of SQL queries and database table listing operations from Cline AI.
      -