npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mysql-metadata-mcp

v1.0.1

Published

MySQL Metadata Query MCP Server - Query database structure, tables, columns and DDL

Readme

MySQL 数据库元数据查询 MCP 服务,支持通过 AI 助手查询数据库结构、表信息、字段详情和 DDL 语句。

安装配置

将以下配置添加到你的 MCP 客户端配置文件中:

{
  "mcpServers": {
    "mysql-metadata": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ]
    }
  }
}

前置要求

  • Node.js >= 18.0.0
  • MySQL 数据库访问权限

工具列表

set_connection

设置数据库连接,必须在使用其他工具前调用。

| 参数 | 说明 | |------|------| | host | 数据库主机地址 | | port | 数据库端口 | | user | 数据库用户名 | | password | 数据库密码 | | charset | 字符集,默认 utf8mb4 |

list_databases

列出所有可访问的数据库。

list_tables

列出指定数据库中的所有表。

| 参数 | 说明 | |------|------| | database | 数据库名称 |

describe_columns

获取表的字段详细信息,包括字段名、类型、是否可空、主键、默认值、注释等。

| 参数 | 说明 | |------|------| | database | 数据库名称 | | table | 表名 |

show_create_table

获取表的 CREATE TABLE 语句。

| 参数 | 说明 | |------|------| | database | 数据库名称 | | table | 表名 |

使用场景

  • 数据库结构探索:快速了解数据库和表结构
  • DDL 获取:获取表的创建语句用于迁移或文档
  • 字段分析:查看字段类型、约束和注释
  • 辅助 SQL 编写:基于表结构生成查询语句

许可证

MIT