MySQL Ops MCP
English | 简体中文
接入你的智能体
發布者自己的指令。不是 PlugMCP 端點。
用我們的金鑰與日誌託管一份副本。
npx -y [email protected]Claude Code 沒有本機指令的安裝連結。複製下方指令並在終端機中執行。
DB_HOST=<value> DB_PORT=<value> DB_USER=<value> DB_PASSWORD=<secret> DB_DATABASE=<value> claude mcp add io.github.gt-dinuo-mysql-ops-mcp -- npx -y mysql-ops-mcp@1.0.0在終端機中執行。
{ "mcpServers": { "io.github.gt-dinuo-mysql-ops-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ], "env": { "DB_HOST": "<value>", "DB_PORT": "<value>", "DB_USER": "<value>", "DB_PASSWORD": "<secret>", "DB_DATABASE": "<value>" } } }}claude_desktop_config.json
遠端 URL 還是本機指令? 兩種安裝方式的差異
來自發布者
English | 简体中文
MySQL MCP server: browse schema, query, CRUD. Delete/drop gated by user approval.
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.
SELECT queries against any databasedelete_data and drop_table always require explicit user confirmation in the clientnpx, configured entirely through environment variablesRequires 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):
git clone https://github.com/GT-dinuo/mysql-ops-mcp.git
cd mysql-ops-mcp
npm install
npm run build
Build output goes to dist/; the entry point is dist/index.js.
In each project where you want to use this tool, create (or append to) .mcp.json:
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": ["-y", "mysql-ops-mcp"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "3306",
"DB_USER": "root",
"DB_PASSWORD": "your_password",
"DB_DATABASE": "your_database"
}
}
}
}
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"].
Once configured, just ask in natural language in your AI tool:
List all databases
Show the structure of the users table
Query the 10 most recent orders
Get full info for the users table — indexes and DDL included
Insert a test record into the users table
Delete the test record you just inserted ← the client will ask for your approval first
Destructive operations (delete_data, drop_table) are always confirmed by the MCP client before execution — nothing irreversible happens silently.
delete_data and drop_table are gated by the MCP client's tool-call confirmation — approve or reject each one.query rejects anything but SELECT).root in production — create a MySQL user scoped to the databases the AI may touch..env / .mcp.json with real passwords must stay out of version control (.gitignore already covers .env).After configuring .env (copy from env.example), you can verify connectivity before wiring up the client:
cp env.example .env # fill in real credentials
npm run test-connection
npm run dev # watch mode, recompiles on change
npm run build # build to dist/
npm start # run the built Server
MIT © 2026 mysql-ops-mcp
MySQL MCP server: browse schema, query, CRUD. Delete/drop gated by user approval.
{ "mcpServers": { "io.github.gt-dinuo-mysql-ops-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ], "env": { "DB_HOST": "<value>", "DB_PORT": "<value>", "DB_USER": "<value>", "DB_PASSWORD": "<secret>", "DB_DATABASE": "<value>" } } }}工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
發布者列出了以下環境變數:DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_DATABASE。
MySQL Ops MCP 透過 stdio 在本機執行。
上次檢查時間:2026-11-09。 MySQL MCP server: browse schema, query, CRUD. Delete/drop gated by user approval.