MCP cover image
See in Github
2025-04-14

1

Github Watches

0

Github Forks

1

Github Stars

MySQL Schema MCP Server

MySQLデータベースのスキーマ情報を提供するModel Context Protocol (MCP) サーバーです。

概要

このツールはClaudeなどのLLMクライアントから接続され、データベースのスキーマ情報を簡単に取得できるようにするためのものです。

LLMはこのツールを通じて以下のことができるようになります:

  • データベース内のテーブル一覧を取得
  • 特定のテーブルの詳細情報(カラム、キー制約、インデックスなど)を確認

使用方法

  1. 環境変数の設定:

    DB_HOST=データベースのホスト名
    DB_PORT=データベースのポート番号
    DB_USER=データベースのユーザー名
    DB_PASSWORD=データベースのパスワード
    
  2. サーバーの起動:

    go run main.go
    

提供するツール

1. テーブル一覧の取得 (list_tables)

指定したデータベース内のすべてのテーブル情報を一覧表示します。テーブル名、コメント、主キー、一意キー、外部キー情報などが含まれます。

パラメータ:

  • dbName: 情報を取得するデータベース名

2. テーブル詳細の取得 (describe_tables)

指定したデータベースの特定テーブルの詳細情報を表示します。カラム定義、キー制約、インデックスなどの情報を整形して提供します。

パラメータ:

  • dbName: 情報を取得するデータベース名
  • tableNames: 詳細情報を取得するテーブル名の配列

技術情報

  • 実装言語: Go
  • 使用ライブラリ: github.com/mark3labs/mcp-go
  • 通信方式: 標準入出力(stdio)

Claude Desktopでの利用方法

Claude Desktopでこのツールを利用するには、以下の設定を行います:

  1. Claude Desktopの設定ファイル (~/Library/Application Support/Claude/claude_desktop_config.json) を編集
  2. 以下のように設定を追加
{
  "mcpServers": {
    "mysql-schema": {
      "command": "サーバー実行コマンドのパス",
      "args": [],
      "env": {
        "DB_HOST": "データベースのホスト名",
        "DB_PORT": "データベースのポート番号",
        "DB_USER": "データベースのユーザー名",
        "DB_PASSWORD": "データベースのパスワード"
      }
    }
  }
}

使用例

テーブル一覧の取得

{
  "dbName": "my_database"
}

テーブル詳細の取得

{
  "dbName": "my_database",
  "tableNames": ["users", "products"]
}

相关推荐

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • John Rafferty
  • Text your favorite pet, after answering 10 questions about their everyday lives!

  • Ian O'Connell
  • Provide players' names or enter Quickstart to start the game!

  • analogchat.com
  • Efficient Spotify assistant for personalized music data.

  • seabiscuit.ai
  • Discover A More Robust Business: Craft tailored value proposition statements, develop a comprehensive business model canvas, conduct detailed PESTLE analysis, and gain strategic insights on enhancing business model elements like scalability, cost structure, and market competition strategies. (v1.18)

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • langgenius
  • alibaba
  • Azure
  • 该存储库用于开发Azure MCP服务器,将Azure的功能带给您的代理商。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

  • caio-moliveira
  • 创建该项目是为了证明我们如何与不同的模型上下文协议(MCP)连接。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • nbonamy
  • Witsy:桌面AI助手

    Reviews

    2.9 (7)
    Avatar
    user_5QZ2V3s0
    2025-04-26

    As a devoted user of the mysql-schema-explorer-mcp, I must say it is an exceptional tool for database management. Its intuitive interface, crafted by shibayu36, makes navigating and exploring MySQL schemas a breeze. I highly recommend it for anyone seeking efficiency and ease in managing their databases.

    Avatar
    user_w6IaD669
    2025-04-26

    I have been using the mysql-schema-explorer-mcp and it has significantly improved my database management tasks. The tool, developed by shibayu36, offers an intuitive interface and robust features that make exploring MySQL schemas seamless and efficient. Highly recommend this for any developer looking to streamline their workflow!

    Avatar
    user_bhlAXsjn
    2025-04-26

    mysql-schema-explorer-mcp by shibayu36 is a fantastic tool for anyone working with MySQL databases. It makes exploring and understanding complex schemas incredibly easy with its intuitive interface. The seamless integration and efficient performance make it a must-have for database administrators and developers alike. Highly recommended!

    Avatar
    user_AqoYN7V3
    2025-04-26

    As a dedicated user of mysql-schema-explorer-mcp, I find it exceptionally powerful for navigating and visualizing MySQL schemas. Created by shibayu36, the tool excels in providing a smooth experience, making database management more efficient and intuitive. Highly recommended for anyone serious about optimizing their database workflows!

    Avatar
    user_JjeeN2rt
    2025-04-26

    As a dedicated user of MySQL Schema Explorer MCP, I can confidently say that this tool is a game-changer for database management. Created by shibayu36, it offers an intuitive platform to explore and navigate MySQL schemas effortlessly. The user-friendly interface makes it easy to visualize and understand complex databases. Whether you're a seasoned developer or a newbie, this tool is indispensable for optimizing schema design and performance. Highly recommended!

    Avatar
    user_y2Q0GaIA
    2025-04-26

    As a devoted user of mysql-schema-explorer-mcp, I highly recommend it for anyone needing a reliable and efficient tool for MySQL database schema exploration. Created by shibayu36, this tool is incredibly user-friendly and comprehensive. It has greatly simplified my database management tasks and improved my workflow. A must-have for database administrators and developers!

    Avatar
    user_uakA9ijo
    2025-04-26

    I've been using mysql-schema-explorer-mcp by shibayu36, and it has exceeded my expectations. It's a powerful and intuitive tool for exploring MySQL schemas. The user interface is straightforward, making it easy even for beginners to navigate. Highly recommended for anyone working with MySQL databases!