FM

f4ww4z/mcp-mysql-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

171 stars 38 forks 品質 73 トレンド 17MIT

f4ww4z/mcp-mysql-server は、https://github.com/f4ww4z/mcp-mysql-server. からインポートされたMCPサーバー候補です。

概要

f4ww4z/mcp-mysql-server は、https://github.com/f4ww4z/mcp-mysql-server. からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

MySQLデータベース操作を提供するモデルコンテキストプロトコルサーバーです。このサーバーは、AIモデルが標準化されたインターフェースを通じてMySQLデータベースとやり取りできるようにします。

設置

Smithery経由のインストール

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

手動インストール

構成

サーバーはMCPの設定ファイルで以下の環境変数を設定する必要があります:

推奨される使用方法

コデックス

マック

在 ~/.codex/config.toml

窓

在 %USERPROFILE%\.codex\config.toml

評価を実行中

evalsパッケージはmcpクライアントを読み込み、index.tsファイルを実行するため、テスト間で再構築する必要がありません。環境変数はnpxコマンドを接頭辞に付けることで読み込めます。完全なドキュメントはこちらでご覧いただけます。

利用可能なツール

1.connect_db

提供された認証情報を使ってMySQLデータベースへの接続を確立します。

2.クエリ

オプションの準備済み文パラメータでSELECTクエリを実行します。

3.実行

オプションで準備された文パラメータを使ってINSERT、UPDATE、またはDELETEクエリを実行します。

4.list_tables

接続されたデータベースのすべてのテーブルをリストアップします。

5.describe_table

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

@f4ww4z/mcp-mysql-server

A Model Context Protocol server that provides MySQL database operations. This server enables AI models to interact with MySQL databases through a standardized interface.

Installation

Installing via Smithery

To install MySQL Server for Claude Desktop automatically via Smithery:

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

Manual Installation

npx @f4ww4z/mcp-mysql-server

Configuration

The server requires the following environment variables to be set in your MCP settings configuration file:

recommended use

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["-y", "@f4ww4z/mcp-mysql-server", "mysql://user:password@localhost:port/database"],
    }
  }
}
{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["-y", "@f4ww4z/mcp-mysql-server"],
      "env": {
        "MYSQL_HOST": "your_host",
        "MYSQL_USER": "your_user",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "your_database"
      }
    }
  }
}

codex

mac

在 ~/.codex/config.toml

[mcp_servers.mcp-mysql-server]
command = "npx"
args = [
  "-y",
  "@f4ww4z/mcp-mysql-server",
  "mysql://user:[email protected]:3306/database"
]

windows

在 %USERPROFILE%\.codex\config.toml

[mcp_servers.mcp-mysql-server]
command = "npx"
args = [
  "-y",
  "@f4ww4z/mcp-mysql-server",
  "mysql://user:[email protected]:3306/database"
]

Running evals

The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found here.

OPENAI_API_KEY=your-key  npx mcp-eval src/evals/evals.ts src/index.ts

Available Tools

1. connect_db

Establish connection to MySQL database using provided credentials.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "connect_db",
  arguments: {
    host: "localhost",
    user: "your_user",
    password: "your_password",
    database: "your_database"
  }
});

2. query

Execute SELECT queries with optional prepared statement parameters.

use_mcp_tool({
  server_name: "mysql",
  tool_name: "query",
  arguments: {
    sql: "SELECT * FROM users WHERE id = ?",
    params: [1]
  }
});

3. execute

GitHub で README 全文を見る

インストール

npx -y @f4ww4z/mcp-mysql-server mysql://user:password@localhost:port/database
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "mysql": { "command": "npx", "args": ["-y", "@f4ww4z/mcp-mysql-server", "mysql://user:password@localhost:port/database"], } } }