ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Mysql

โดย marcelo-ochoaรุ่น 1.0.7i★ –iรันบนเครื่อง
ชื่อใน registryio.github.marcelo-ochoa/mysql

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

An MCP server for MySQL databases.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: ฐานข้อมูลและชุดข้อมูล
  • ต้องใส่ค่าเหล่านี้: MYSQL_PASSWORD

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "@marcelo-ochoa/server-mysql"
      ],
      "env": {
        "MYSQL_USER": "ใส่ค่าของคุณ",
        "MYSQL_PASSWORD": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add mysql --env MYSQL_USER='ใส่ค่าของคุณ' --env MYSQL_PASSWORD='ใส่ค่าของคุณ' -- npx -y @marcelo-ochoa/server-mysql

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "@marcelo-ochoa/server-mysql"
      ],
      "env": {
        "MYSQL_USER": "ใส่ค่าของคุณ",
        "MYSQL_PASSWORD": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "mysql": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@marcelo-ochoa/server-mysql"
      ],
      "env": {
        "MYSQL_USER": "ใส่ค่าของคุณ",
        "MYSQL_PASSWORD": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • MYSQL_USER env
    MySQL username
  • MYSQL_PASSWORD ความลับ env
    MySQL password

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub marcelo-ochoa ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด ฐานข้อมูลและชุดข้อมูลi

  • ดาวมากกว่า 0% ของอีก 953 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 6% ของอีก 953 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 953 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Mysql ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: MYSQL_PASSWORD

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.0.7) เข้า registry 8 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Supabase, MongoDB MCP Server, Elasticsearch MCP Server

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Supabase

โดย supabase

server ทางการของ Supabase ให้ AI สร้างตาราง ถามข้อมูล และดูการตั้งค่าโปรเจกต์ในฐานข้อมูล Supabase ของคุณ

บนเครื่องหรือคลาวด์★ 2,993Apache-2.0อัปเดต วันนี้
ติดตั้ง

MongoDB MCP Server

โดย mongodb-js

MongoDB Model Context Protocol Server

รันบนเครื่อง★ 1,157Apache-2.0อัปเดต เมื่อวานซืน
ติดตั้ง

Elasticsearch MCP Server

โดย cr7258

MCP server for interacting with Elasticsearch

รันบนเครื่อง★ 315Apache-2.0อัปเดต 14 เดือนที่ผ่านมา
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

MySQL Database

A Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas, execute and explain read-only queries, and analyze performance metrics.

Components

Tools
  • mysql-query
  • Execute read-only SQL queries against the connected MySQL database
  • Input: sql (string): The SQL query to execute
  • All queries are executed within a READ ONLY transaction
  • mysql-explain
  • Explain plan SQL queries against the connected MySQL database
  • Input: sql (string): The SQL query to explain
  • Returns execution plan in JSON format
  • mysql-stats
  • Get statistics for a given table in the current connected database
  • Input: name (string): The table name
  • Returns comprehensive table, index, and column statistics
  • mysql-connect
  • Reconnect using new credentials
  • Input: connectionString (string): MySQL connect string (e.g., host.docker.internal:3306/mydb)
  • Input: user (string): Username (e.g., root)
  • Input: password (string): Password

Example: mysql-connect host.docker.internal:3306/hr root my_2025

  • mysql-awr
  • Generate a MySQL performance report similar to Oracle AWR
  • Includes database statistics, InnoDB metrics, top queries (requires performance_schema), table/index statistics, connection info, and optimization recommendations
  • No input required
Resources

The server provides schema information for each table in the MySQL database:

  • Table Schemas (mysql:// / /schema)
  • JSON schema information for each table
  • Includes column names and data types
  • Automatically discovered from MySQL database metadata

Configuration

The MySQL server uses environment variables or the mysql-connect tool for secure credential management:

  • `MYSQL_USER`: MySQL username (optional if using mysql-connect)
  • `MYSQL_PASSWORD`: MySQL password (optional if using mysql-connect)
Connection String

The connection string should contain only the host, port, and database information (without embedded credentials). Providing it as a command-line argument is optional. If omitted at startup, you must use the mysql-connect tool to establish a connection before using other functionality.

Supported connection string formats:

  • mysql://host:port/dbname
  • host:port/dbname

Usage with Claude Desktop

To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:

Docker
  • When running Docker on macOS, use host.docker.internal if the MySQL server is running on the host network (e.g., localhost)
  • Credentials are passed via environment variables MYSQL_USER and MYSQL_PASSWORD
{

"mcpServers": { "mysql": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "MYSQL_USER=myuser", "-e", "MYSQL_PASSWORD=mypassword", "mochoa/mcp-mysql" ] } } }

Note: You can still provide the connection string as a final argument if you want to connect automatically on startup: "args": [..., "mochoa/mcp-mysql", "host.docker.internal:3306/mydb"].

NPX
{

"mcpServers": { "mysql": { "command": "npx", "args": [ "-y", "@marcelo-ochoa/server-mysql" ], "env": { "MYSQL_USER": "myuser", "MYSQL_PASSWORD": "mypassword" } } } }

Replace /mydb with your database name.

Note: Replace the following placeholders with your actual values:

  • myuser and mypassword with your MySQL credentials
  • localhost:3306 with your MySQL server host and port
  • mydb with your database name

Usage with VS Code

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is not needed in the .vscode/mcp.json file.

Docker

Note: When using Docker and connecting to a MySQL server on your host machine, use host.docker.internal instead of localhost in the connection URL.

{

"mcp": { "inputs": [ { "type": "promptString", "id": "mysql_user", "description": "MySQL username" }, { "type": "promptString", "id": "mysql_password", "description": "MySQL password", "password": true } ], "servers": { "mysql": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "MYSQL_USER=${input:mysql_user}", "-e", "MYSQL_PASSWORD=${input:mysql_password}", "mochoa/mcp-mysql" ] } } } }

Note: You can add an input for mysql_url and append it to args if you want to connect on startup.

NPX
{

"mcp": { "inputs": [ { "type": "promptString", "id": "mysql_user", "description": "MySQL username" }, { "type": "promptString", "id": "mysql_password", "description": "MySQL password", "password": true } ], "servers": { "mysql": { "command": "npx", "args": [ "-y", "@marcelo-ochoa/server-mysql" ], "env": { "MYSQL_USER": "${input:mysql_user}", "MYSQL_PASSWORD": "${input:mysql_password}" } } } } }

Usage with Antigravity Code Editor

Put this in ~/.gemini/antigravity/mcp_config.json

{

"mcpServers": { "mysql": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "MYSQL_USER=myuser", "-e", "MYSQL_PASSWORD=mypassword", "mochoa/mcp-mysql", "host.docker.internal:3306/mydb" ] } }, "inputs": [] }

Performance Schema

For optimal performance monitoring with the mysql-awr tool, ensure that the Performance Schema is enabled in your MySQL configuration:

[mysqld]

performance_schema = ON

The Performance Schema provides detailed query statistics and performance metrics. If it's not enabled, the AWR report will still generate but with limited query-level statistics.

Building

Docker:

docker build -t mochoa/mcp-mysql -f src/mysql/Dockerfile .

NPM:

cd src/mysql

npm install npm run build

Demo Prompts

Sample prompts to try with the MySQL MCP server:

  • Connect to host.docker.internal:3306/mydb using root as user and password123 as password using mysql mcp server
  • Query all tables in the current database
  • Get stats for the users table
  • Explain the execution plan for: SELECT * FROM users WHERE email = 'test@example.com'
  • Generate a performance report using mysql-awr
  • Based on the AWR report, what optimizations would you recommend?

Demos

See Demos for usage examples with Claude Desktop, Docker AI, Gemini CLI, and Antigravity Code Editor.

MySQL AWR in action

See MySQL AWR in action for an example of a performance report generated by the mysql-awr tool, highlighting specific optimization opportunities.

Change Log

See Change Log for the history of changes.

Sources

As usual, the code of this extension is at GitHub, feel free to suggest changes and make contributions.

📜 License

This project is licensed under the Apache License, Version 2.0 for new contributions, with existing code under MIT - see the LICENSE file for details.

ถาม PopNx