Skip to main content
Glama
LeonMelamud

MySQL MCP Server

by LeonMelamud

MySQL MCP サーバー

MySQLデータベースへの直接アクセスを提供する強力なMCPサーバー。このサーバーにより、AIエージェントはMySQLデータベースと対話し、SQLクエリを実行し、シンプルなインターフェースを通じてデータベースコンテンツを管理できるようになります。

特徴

リソース

  • データベースに保存されているノートにnote:///{id} URI 経由でアクセスします。

  • 各メモにはタイトルと内容があります

  • シンプルなコンテンツアクセスのためのプレーンテキスト MIME タイプ

ツール

  • create_note - データベースに新しいテキストノートを作成する

    • タイトルとコンテンツを必須パラメータとして受け取ります

    • MySQLデータベースにメモを保存する

  • list_tables - 接続されたデータベース内のすべてのテーブルを一覧表示します

  • count_tables - データベース内のテーブルの合計数を取得します

  • search_tables - LIKEパターンを使用してテーブルを検索する

  • describe_table - 特定のテーブルの構造を取得する

  • execute_sql - カスタムSQLクエリを実行する

Related MCP server: MySQL MCP Server

前提条件

  • Node.js 18以上

  • MySQLサーバーがインストールされ、実行中

  • 適切な権限を持つデータベース

設定

  1. このリポジトリをクローンします:

    git clone git@github.com:LeonMelamud/mysql-mcp.git
    cd mysql-mcp
  2. 依存関係をインストールします:

    npm install
  3. MySQL 接続の詳細を含む.envファイルをルート ディレクトリに作成します。

    MYSQL_HOST=localhost
    MYSQL_USER=your_username
    MYSQL_PASSWORD=your_password
    MYSQL_DATABASE=your_database
  4. サーバーを構築します。

    npm run build

インストール

クロードデスクトップ向け

Claude Desktop 構成ファイルにサーバー構成を追加します。

MacOS の場合: ~/Library/Application Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mysql": {
      "command": "node",
      "args": ["/path/to/mysql-server/build/index.js"],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_USER": "your_username",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "your_database"
      }
    }
  }
}

クラインのために

Cline MCP 設定ファイルにサーバー設定を追加します。

MacOS の場合: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json Windows の場合: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

{
  "mcpServers": {
    "mysql": {
      "command": "node",
      "args": ["/path/to/mysql-server/build/index.js"],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_USER": "your_username",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "your_database"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

使用例

インストールが完了すると、Claude との会話で MySQL MCP サーバーを使用できるようになります。

データベース内のすべてのテーブルを一覧表示する

Please list all the tables in my MySQL database.

SQLクエリを実行する

Run this SQL query: SELECT * FROM users LIMIT 5

メモを作成する

Create a note titled "Meeting Notes" with the content "Discussed project timeline and assigned tasks."

発達

自動リビルドを使用した開発の場合:

npm run watch

デバッグ

MCP Inspector を使用してサーバーをデバッグします。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

ライセンス

マサチューセッツ工科大学

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A server that enables AI models to interact with MySQL databases through a Model Control Protocol, providing tools for table creation, schema inspection, query execution, and data retrieval.
    28
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol server that allows AI agents to execute SQL queries against a MySQL database, supporting operations like reading data, creating tables, inserting, updating, and deleting records.
    6
    519
    8
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that connects AI agents to MySQL databases for schema exploration, data querying, and SQL execution via natural language.
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • GibsonAI MCP server: manage your databases with natural language

  • Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

View all MCP Connectors

Latest Blog Posts

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/LeonMelamud/mysql-mcp'

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