Skip to main content
Glama
yuru-sha

MCP MySQL Server

by yuru-sha

mcp-server-mysql

CIステータス 鍛冶屋のバッジ

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

特徴

  • MySQL データベースへの読み取り専用アクセス

  • スキーマ検査機能

  • 読み取り専用トランザクション内での安全なクエリ実行

  • Dockerサポート

  • NPMパッケージが利用可能

Related MCP server: MySQL MCP Server

インストール

Dockerの使用

# Build the Docker image
make docker

# Run with Docker
docker run -i --rm mcp/mysql mysql://host:port/dbname

Smithery経由でインストール

Smithery経由で Claude Desktop 用の MySQL データベース サーバーを自動的にインストールするには:

npx -y @smithery/cli install @yuru-sha/mcp-server-mysql --client claude

使用法

クロード・デスクトップ

claude_desktop_config.jsonに次の構成を追加します。

{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/mysql",
        "mysql://host:port/dbname"
      ]
    }
  }
}

注意: macOS で Docker を使用する場合、MySQL サーバーがホスト ネットワーク上で実行されている場合は、 host.docker.internalを使用します。

接続URLの形式

mysql://[user][:password]@host[:port]/database

/databaseデータベース名に置き換えます。

発達

# Initial setup
make setup

# Build the project
make build

# Format code
make format

# Run linter
make lint

ライセンス

このプロジェクトはMIT ライセンスの下でリリースされています。

安全

このサーバーは、データベースを保護するために読み取り専用アクセスを強制します。すべてのクエリは読み取り専用トランザクション内で実行されます。

セキュリティを強化するために、読み取り専用ユーザーを作成することをお勧めします。

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables read-only access to MySQL databases through natural language queries. Provides automatic table schema discovery and executes SELECT, SHOW, DESCRIBE, and EXPLAIN statements within secure read-only transactions.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables safe interaction with MySQL databases through SELECT queries, table structure inspection, and database schema exploration. Provides read-only access to query data and examine database metadata.
    1
    -
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to inspect and query a MySQL database through safe, structured tools, including schema discovery and read-only queries.
    9
    35 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables schema introspection and safe read-only queries on MySQL databases, supporting table/column discovery, relationship exploration, and controlled SELECT queries.
    8 npm
    MIT