Cover image
Try Now
2025-04-14

3 years

Works with Finder

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"]
}

相关推荐

  • av
  • Führen Sie mühelos LLM -Backends, APIs, Frontends und Dienste mit einem Befehl aus.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llm 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Zusammenfassung der weltbesten LLM -Ressourcen.

  • 1Panel-dev
  • 🔥 1Panel bietet eine intuitive Weboberfläche und einen MCP -Server, um Websites, Dateien, Container, Datenbanken und LLMs auf einem Linux -Server zu verwalten.

  • rulego
  • ⛓️Rugele ist ein leichter, leistungsstarker, leistungsstarker, eingebetteter Komponenten-Orchestrierungsregel-Motor-Rahmen für GO.

  • Azure
  • Dieses Repository dient zur Entwicklung des Azure MCP -Servers, wodurch Ihre Agenten die Leistung von Azure verleiht.

  • caio-moliveira
  • Dieses Projekt wurde erstellt, um zu demonstrieren, wie wir uns mit verschiedenen Modellkontextprotokollen (MCPs) verbinden können.

  • MarcusAdriano
  • Estudando mcp usando eine api do bacen ptax

    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!