Skip to main content
Glama

MCP Server for MySQL

by hkk101

NodeJS ベースの MySQL 用 MCP サーバー

デモ

MySQLデータベースへの読み取り専用アクセスを提供するモデルコンテキストプロトコル(CMP)サーバー。このサーバーにより、LLMはデータベーススキーマを検査し、読み取り専用クエリを実行できます。

コンポーネント

ツール

  • mysql_クエリ
    • 接続されたデータベースに対して読み取り専用のSQLクエリを実行する
    • 入力: sql (文字列): 実行するSQLクエリ
    • すべてのクエリは読み取り専用トランザクション内で実行されます

リソース

サーバーは、データベース内の各テーブルのスキーマ情報を提供します。

  • テーブルスキーマ
    • 各テーブルのJSONスキーマ情報
    • 列名とデータ型が含まれます
    • データベースのメタデータから自動的に検出

Claude Desktopでの使用

このサーバーを Claude Desktop アプリで使用するには、 claude_desktop_config.jsonの「mcpServers」セクションに次の構成を追加します。

{ "mcpServers": { "mcp_server_mysql": { "command": "npx", "args": [ "-y", "@benborla29/mcp-server-mysql", ], "env": { "MYSQL_HOST": "127.0.0.1", "MYSQL_PORT": "3306", "MYSQL_USER": "root", "MYSQL_PASS": "", "MYSQL_DB": "db_name" } } } }

/db_nameをデータベース名に置き換えるか、空白のままにしてすべてのデータベースを取得します。

トラブルシューティング

「MCP サーバー mcp-server-mysql に接続できませんでした」というエラーが発生した場合は、以下の構成のように、必要なすべてのバイナリのパスを明示的に設定する必要がある場合があります。

{ "mcpServers": { "mcp_server_mysql": { "command": "/path/to/npx/binary/npx", "args": [ "-y", "@benborla29/mcp-server-mysql", ], "env": { "MYSQL_HOST": "127.0.0.1", "MYSQL_PORT": "3306", "MYSQL_USER": "root", "MYSQL_PASS": "", "MYSQL_DB": "db_name" "PATH": "/path/to/node/bin:/usr/bin:/bin" <-- Add this } } } }

ライセンス

このMCPサーバーはMITライセンスに基づいてライセンスされています。つまり、MITライセンスの条件に従って、ソフトウェアを自由に使用、改変、配布することができます。詳細については、プロジェクトリポジトリのLICENSEファイルをご覧ください。

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

MySQL データベースへの読み取り専用アクセスを提供し、LLM がデータベース スキーマを検査し、読み取り専用クエリを実行できるようにするモデル コンテキスト プロトコル サーバー。

  1. コンポーネント
    1. ツール
    2. リソース
  2. Claude Desktopでの使用
    1. トラブルシューティング
      1. ライセンス

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          Enables LLMs to interact with MySQL databases by inspecting schemas and executing safe, read-only queries within transactions.
          Last updated -
          6
          JavaScript
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that provides read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.
          Last updated -
          5,426
          418
          TypeScript
          MIT License
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server providing read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.
          Last updated -
          5,426
          TypeScript
          MIT License
          • Linux
          • Apple
        • -
          security
          -
          license
          -
          quality
          A Model Context Protocol server providing read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.
          Last updated -
          1
          JavaScript

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/hkk101/mcp-server-mysql'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server