
MySQL Ops MCP
io.github.GT-dinuo由 GitHub 帳號 GT-dinuo 發布v1.0.0更新於 Oct 24, 2026
MySQL MCP server: browse schema, query, CRUD. Delete/drop gated by user approval.
概覽
本機 MCP 伺服器,讓 AI 助理瀏覽 MySQL 資料庫與資料表結構、執行 SELECT 查詢與 CRUD,DELETE 與 DROP 需使用者確認。
- 可以做什麼
- 列出資料庫與資料表,檢視資料表欄位與型別
- 取得資料表完整資訊,包含索引、DDL 與統計資料
- 對任一資料庫執行 SELECT 查詢
- 建立資料表、插入與更新資料,每個工具只接受對應的 SQL 語句
- 刪除資料或刪除資料表,每次都需要用戶端確認
- 透過通用 execute_sql 工具執行任意自訂 SQL
- 適用情境
- 適合在 Claude Code、Cursor、Codex 等桌面用戶端以自然語言探索與修改 MySQL 資料庫,例如檢視資料表結構、撰寫查詢或進行少量資料變更。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js 18 以上版本。需要可連線的 MySQL 伺服器與帳密,透過環境變數 DB_HOST、DB_PORT、DB_USER、DB_PASSWORD、DB_DATABASE 提供;皆為選用,預設為 localhost、3306、root 且無預設資料庫。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MySQL Ops MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MySQL Ops MCP
English | 简体中文
[npm version] [License: MIT] [Node.js] [MCP] [GitHub stars]
A MySQL database MCP Server. Let AI tools like Claude Code / Cursor / Codex talk to your MySQL databases in natural language — browse databases and tables, inspect schemas, run queries, and perform CRUD operations, with destructive operations (DELETE / DROP) gated behind explicit user approval.
Features
- 🗄️ Schema browsing: list databases, list tables, describe table structure, full table info (indexes, DDL, stats)
- 🔍 Queries: run
SELECTqueries against any database - ✏️ CRUD: create tables, insert, update — with SQL-statement validation per tool
- 🔐 Approval-gated destructive ops:
delete_dataanddrop_tablealways require explicit user confirmation in the client - 🔌 Zero install: runs via
npx, configured entirely through environment variables
Installation
Requires Node.js 18+. No clone or build needed — npx fetches and runs the published npm package on first use (see the config below).
To build from source instead (e.g. for development):
Build output goes to dist/; the entry point is dist/index.js.
Configuration
In each project where you want to use this tool, create (or append to) .mcp.json:
If you built from source, point the command at the local build instead: "command": "node", "args": ["/absolute/path/to/mysql-ops-mcp/dist/index.js"].
Environment Variables
Usage
Once configured, just ask in natural language in your AI tool:
Destructive operations (delete_data, drop_table) are always confirmed by the MCP client before execution — nothing irreversible happens silently.
Tool List
Security
- Destructive operations require approval:
delete_dataanddrop_tableare gated by the MCP client's tool-call confirmation — approve or reject each one. - Statement validation: each write tool only accepts its own SQL verb (e.g.
queryrejects anything butSELECT). - Use a least-privilege account: don't connect as
rootin production — create a MySQL user scoped to the databases the AI may touch. - Never commit credentials:
.env/.mcp.jsonwith real passwords must stay out of version control (.gitignorealready covers.env).
Testing the Connection
After configuring .env (copy from env.example), you can verify connectivity before wiring up the client:
Development
License
MIT © 2026 mysql-ops-mcp
來源:README.md,提交 295b862
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分