Mysql MCP
ภาพรวม
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Enterprise-grade MySQL MCP Server with OAuth 2.0, 106 tools, and Docker deployment
ใช้ทำอะไรได้
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
- การเชื่อมต่อ: รันบนเครื่อง
- ช่องทาง (transport): stdio
- หมวด: ฐานข้อมูลและชุดข้อมูล
ติดตั้ง
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ผลตรวจผ่าน 2/2 · ทำงานบนเครื่องคุณ
ขั้นแรก: คุณใช้ AI ตัวไหน
เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง
ต่อกับ Claude ได้ แต่ต้องเตรียมก่อน
ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
เปิดไฟล์ตั้งค่าของแอป Claude บนคอม
SettingsDeveloperEdit Config
วางค่าตั้งนี้แล้วบันทึกไฟล์
{ "mcpServers": { "mysql": { "command": "docker", "args": [ "run", "-i", "--rm", "docker.io/writenotenow/mysql-mcp:v1.0.0" ] } } }ปิดแอป Claude แล้วเปิดใหม่
ลองเลย
ใช้ Mysql MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Claude บอกว่ากำลังใช้ Mysql MCP หรือมีชื่อเครื่องมือของ Mysql MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ChatGPT ยังต่อ Mysql MCP ไม่ได้
Mysql MCP ต้องติดตั้งในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะตัวที่ทำงานบนเว็บ
คุณทำแบบนี้แทนได้
ก · ใช้แอปที่ต่อ Mysql MCP ได้
- ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
- ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
- ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
- ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
ข · ตัวอื่นในหมวด ฐานข้อมูลและชุดข้อมูล ที่ต่อกับ ChatGPT ได้
เลือกจากตัวที่ใช้มากในหมวดเดียวกัน เฉพาะตัวที่ต่อด้วยที่อยู่ได้โดยไม่ต้องใส่คีย์
- Supabase✓ ChatGPT
- Appwrite MCP✓ ChatGPT
- Pg Aiguide✓ ChatGPT
ต่อกับ Claude Code ได้ แต่ต้องเตรียมก่อน
ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
เปิด Terminal
Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell
วางคำสั่งนี้แล้วกด Enter
claude mcp add mysql -- docker run -i --rm docker.io/writenotenow/mysql-mcp:v1.0.0พิมพ์ /mcp ใน Claude Code
ต้องเห็น Mysql MCP ในรายการและขึ้นว่าเชื่อมต่อแล้ว
ลองเลย
ใช้ Mysql MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Claude Code บอกว่ากำลังใช้ Mysql MCP หรือมีชื่อเครื่องมือของ Mysql MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ Cursor ได้ แต่ต้องเตรียมก่อน
ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
เปิดแชตของ AI ใน Cursor โหมด Agent
ลองเลย
ใช้ Mysql MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า Cursor บอกว่ากำลังใช้ Mysql MCP หรือมีชื่อเครื่องมือของ Mysql MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
ต่อกับ VS Code ได้ แต่ต้องเตรียมก่อน
ต้องลง Docker ในเครื่องก่อน (ทำครั้งเดียว)
เปิดแชตของ AI ใน VS Code โหมด Agent
ลองเลย
ใช้ Mysql MCP บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง✓ ถ้า VS Code บอกว่ากำลังใช้ Mysql MCP หรือมีชื่อเครื่องมือของ Mysql MCP ขึ้นในคำตอบ แปลว่าต่อสำเร็จ
ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป
โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม
ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON
ติดตั้งในเครื่อง
Claude Code
claude mcp add mysql -- docker run -i --rm docker.io/writenotenow/mysql-mcp:v1.0.0Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"mysql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/writenotenow/mysql-mcp:v1.0.0"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"mysql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/writenotenow/mysql-mcp:v1.0.0"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"mysql": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/writenotenow/mysql-mcp:v1.0.0"
]
}
}
}ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
สรุป
- การเชื่อมต่อ
- รันบนเครื่อง
- ช่องทาง (transport)
- stdio
- รุ่นล่าสุดi
- 1.0.0
- ส่งเข้า registryi
- 14 ธ.ค. 2568
- แก้โค้ดล่าสุดi
- 9 พ.ย. 2569
- ผู้ทำ
- neverinfamous
- แพ็กเกจ
oci: docker.io/writenotenow/mysql-mcp:v1.0.0- สถานะใน registry
- ใช้งานอยู่
ใช้กับโปรแกรมไหนได้
ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569
ติดตั้งบนเครื่องได้ใน
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
คู่มือที่เกี่ยวข้อง
ทำอะไรได้บ้าง
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
ผลตรวจเบื้องต้นi
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 12 พ.ย. 2569
- ✓ ผ่าน
ตัวตนผู้ทำตรงกับ repo
ชื่อใน registry ยืนยันด้วยบัญชี GitHub neverinfamous ซึ่งเป็นเจ้าของ repo
- ✓ ผ่าน
ยังมีคนดูแล
มีการแก้โค้ดล่าสุด เมื่อวานซืน
- … ยังไม่ตรวจ
มีสัญญาอนุญาต (license)
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
- – ไม่เกี่ยว
endpoint ตอบ
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
- – ไม่เกี่ยว
ล็อกอินแบบ OAuth
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
- … ยังไม่ตรวจ
คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
พูดคุย
ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์
ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย
ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx
รีวิวจากผู้ใช้
ยังไม่มีรีวิว
เทียบกับตัวอื่นในหมวด ฐานข้อมูลและชุดข้อมูลi
- ดาวมากกว่า 94% ของอีก 1168 ตัวในหมวดนี้
- ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 2% ของอีก 1168 ตัวในหมวดนี้
- ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 1168 ตัวในหมวดนี้
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
คำถามที่พบบ่อย
Mysql MCP ปลอดภัยไหม?
จากการตรวจเบื้องต้นของเรา ผ่าน 2 จาก 2 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใช้กุญแจหรือรหัสอะไรบ้าง?
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
ตัวนี้รันบนเครื่องหรือบนคลาวด์?
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
ยังมีคนดูแลอยู่ไหม?
repo บน GitHub มีการแก้โค้ดล่าสุด เมื่อวานซืน และส่งรุ่นล่าสุด (1.0.0) เข้า registry 11 เดือนที่ผ่านมา
ใช้กับโปรแกรมไหนได้บ้าง?
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Docker ในเครื่องด้วย
มีตัวไหนใช้แทนได้บ้าง?
ในหมวดเดียวกันมี Dbx, MCP Toolbox for Databases, MCP Toolbox for Databases
ตัวที่ใช้แทนได้
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
README จากผู้ทำ
เปิดอ่าน README
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
MySQL MCP Server (mysql-mcp)
[📚 Full Documentation (Wiki)](https://github.com/neverinfamous/mysql-mcp/wiki) • [Changelog](CHANGELOG.md) • [Security](SECURITY.md) • [Release Article](https://adamic.tech/articles/mysql-mcp-server)
💎 Value Proposition
Integrate your AI agents with a production-ready MySQL environment. Deploy MCP v2 stateless architecture via HTTP transport. Optimize token efficiency via Code Mode. Secure your database with OAuth 2.1.
🎯 Leverage Core Benefits
| Feature | Description |
|---|---|
| Specialized Tools | Access specialized tools for core CRUD, JSON, spatial data, document stores, and clusters. |
| Resources | Monitor schema, performance metrics, process lists, replication status, and InnoDB diagnostics in real-time. |
| AI-Powered Prompts | Execute guided workflows for query building, schema design, performance tuning, and infrastructure setup. |
| Code Mode | Reduce LLM token consumption by consolidating operations inside a secure, sandboxed V8 isolate. |
| Token-Optimized Payloads | Maximize token efficiency. Use optional flags to reduce response size for large payloads. |
| OAuth 2.1 Security | Enforce granular access control with RFC compliance, strict scopes, and Keycloak integration. |
| Smart Tool Filtering | Use tool groups and shortcuts to stay within IDE tool limits. |
| Streamable & Stateless HTTP | Support MCP v2 streamable HTTP and stateless HTTP deployments. |
| Connection Pooling | Leverage built-in connection pooling for efficient, highly concurrent database access. |
| Ecosystem Integrations | Manage MySQL Router, ProxySQL, and MySQL Shell utilities directly from your agent. |
| Advanced Encryption | Enforce TLS/SSL connections. Manage data masking, encryption monitoring, and compliance effortlessly. |
| Production-Ready Security | Prevent SQL injection with parameterized queries. Rely on strict input validation and audit logging. |
| Deterministic Errors | Receive structured responses with actionable suggestions. Eliminate silent failures and raw exceptions. |
| Observability | Export Prometheus metrics. Track container logs with Dozzle and audit trails with Grafana Alloy/Loki. |
| Strict TypeScript | Rely on strict TypeScript backed by robust test suites. |
| MCP v2 Compliant | Fully support the MCP v2 specification. This includes stateless routing, caching, safety hints, and notifications. |
🤖 Automate Tasks with Guided Workflows
This server includes intelligent prompts for guided workflows:
| Prompt | Description |
|---|---|
mysql_tool_index | Complete tool index with categories |
mysql_quick_query | Quick query execution shortcut |
mysql_quick_schema | Quick schema exploration |
mysql_setup_observability | Complete observability stack setup guide (Datadog, etc.) |
Note: This is a subset of available prompts. Use
mysql_tool_indexto discover the full list of guided workflows.
📊 Improve Observability with Resources
This server exposes a comprehensive set of resources for database observability and telemetry:
| Resource | Category | Description |
|---|---|---|
mysql://schema | Core | Full database schema |
mysql://tables | Core | Table listing with metadata |
mysql://variables | Core | Server configuration variables |
mysql://status | Core | Server status metrics |
mysql://processlist | Core | Active connections and queries |
mysql://pool | Core | Connection pool statistics |
mysql://capabilities | Extended | Server version, features, and tool categories |
mysql://health | Extended | Comprehensive database health status |
mysql://performance | Extended | Query performance metrics |
mysql://indexes | Extended | Index usage and statistics |
mysql://replication | Extended | Replication status and lag |
mysql://innodb | Extended | InnoDB buffer pool and engine metrics |
mysql://events | Domain | Event Scheduler status and scheduled events |
mysql://sysschema | Domain | sys schema diagnostics summary |
mysql://locks | Domain | InnoDB lock contention detection |
mysql://cluster | Domain | Group Replication / InnoDB Cluster status |
mysql://spatial | Domain | Spatial columns and indexes |
mysql://docstore | Domain | Document Store collections |
mysql://insights | Analytics | Business insights memo from mysql_append_insight |
mysql://metrics | Observability | In-memory token usage, latency, and request metrics |
mysql://audit | Observability | Forensic trail and snapshot of system errors |
mysql://help | Documentation | Critical gotchas and high-level API reference |
mysql://help/{group} | Documentation | Dynamic group-specific tool reference (e.g., core, codemode) |
🚀 Deploy Your AI Database
Meet Prerequisites
- Node.js >= 24.0.0 (See
.node-versionfor the pinned local development version) - Bun (for executing repository automation scripts)
- MySQL server
- pnpm
Install the Server
Install via NPM / PNPM
pnpm add -g @neverinfamous/mysql-mcp
Run the server:
mysql-mcp --transport stdio --mysql "mysql://mcp_user:secure_password@localhost:3306/testdb"
Or use npx without installing:
npx @neverinfamous/mysql-mcp --transport stdio --mysql "mysql://mcp_user:secure_password@localhost:3306/testdb"
Run with Docker
Note on Namespaces: The Docker image uses the
writenotenownamespace. The GitHub repo usesneverinfamous.
Linux Users: For
host.docker.internalon Linux, run the container with--add-host host.docker.internal:host-gateway.
docker run -i --rm -v ./data:/app/data -v ./logs:/var/log/mysql-mcp writenotenow/mysql-mcp:latest \
--transport stdio \ --allowed-io-roots /app/data \ --mysql "mysql://mcp_user:secure_password@host.docker.internal:3306/testdb"
Enable Observability via Docker Compose
Launch the full observability stack using the included template. This includes Datadog, OpenTelemetry, Prometheus, and Grafana. This spins up the MCP server, MySQL database, Redis, and observability sidecars:
cd examples/basic-mysql-datadog
cp .env.example .env docker compose up -d
- Grafana: Available at
http://localhost:3001(Dashboard pre-loaded). - Prometheus: Available at
http://localhost:9090. - MCP Server: Available at
http://localhost:3000.
Follow Datadog & OpenTelemetry Observability Rules
Datadog Constraints:
- Authentication: Use
pupCLI for authentication. - Autodiscovery: Avoid duplicate autodiscovery configurations. Add standard tracking labels (
tags.datadoghq.com/env,tags.datadoghq.com/service,tags.datadoghq.com/version) to your containers. - WSL2 Hardening Limits: Enforce
stop_grace_period: 30s,mem_limit: 1536m, and OpenMetrics timeouts of10s. - Host Configuration: Use
DD_HOSTNAMEand native/etc/docker/daemon.jsoncgroup configurations ("default-cgroupns-mode": "host"). DisableDD_EXTRA_PERFORMANCE_METRICS. - Windows File Tailing: Be warned that Windows
inotifytailing issues may occur with Docker/WSL2 log mapping.
OpenTelemetry Rules:
- Semantic Conventions: Enforce
gen_ai.*semantics. - Instrumentation: Use auto-instrumentation when possible.
- Context Propagation: Ensure
traceparentandtracestatepropagation. - Processing & Logging: Utilize batch processors and ensure logs are formatted as JSON logs.
Audit Architecture & Exporter Healthcheck:
- The primary MCP server writes execution traces to
mcp-audit.jsonlvia the--audit-logflag. - The metrics exporter runs as an independent sidecar process. It reads from
mcp-audit.jsonlusing theAUDIT_LOG_PATHenvironment variable to compute metrics. - The exporter isolates its own internal logs by setting its
--audit-logflag toexporter-audit.jsonl. - The metrics server and exporter share a single process. Both operate on port
3000. This prevents port contention. - Exporter Healthcheck:
wget --spider -q http://127.0.0.1:3000/metrics
Build From Source
git clone https://github.com/neverinfamous/mysql-mcp.git
cd mysql-mcp pnpm install pnpm run build node dist/cli.js --transport stdio --mysql "mysql://mcp_user:secure_password@localhost:3306/testdb"
🏗️ Use Infrastructure Templates
We provide production-ready Docker Compose templates in the examples/ directory. Use these to spin up test environments quickly. These templates include full Datadog observability out-of-the-box (Metrics, APM, and Logs).
- [Basic Template](examples/basic-mysql-datadog): A lightweight, single-node MySQL setup. Perfect for quick starts.
- [Enterprise HA Template](examples/enterprise-ha-mysql): A highly-available InnoDB Cluster with MySQL Router and ProxySQL. Perfect for staging or production replicas.
- [Full Observability Ecosystem](examples/full-observability-ecosystem): A complete enterprise monitoring stack with Datadog, Prometheus, Grafana, Loki, and Alloy. See the [Observability Wiki](https://github.com/neverinfamous/mysql-mcp/wiki/Observability) for deep-dive metrics configuration.
See the README in each directory for quick start instructions.
⚡ Optimize Token Usage with Code Mode
Code Mode (mysql_execute_code) reduces token usage by consolidating operations in a secure sandbox.
Code executes securely in a C++ V8 isolate sandbox. It enforces strict heap limits and synchronous termination. Native wrappers map all API calls across the boundary. This guarantees defense-in-depth and fleet-standard restrictions:
Enforce Engine-Level Restrictions
- ✅ Strict V8 Isolate Boundary — Code executes within a physically separate V8 isolate. It ensures native objects and prototypes cannot cross the boundary.
- ✅ Memory & CPU Constraints — enforced at the C++ level. This includes synchronous timeouts and strict heap limits.
- ✅ **API Bindings