# MySQL Ops MCP [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/GT-dinuo/mysql-ops-mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 248  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mysql-ops-mcp

## Description
MySQL MCP server: browse schema, query, CRUD. Delete/drop gated by user approval.

## Tools
Capabilities this server exposes over MCP:

- **list_databases** — List all databases
- **list_tables** — List tables in a database
- **describe_table** — Show table columns and types
- **get_table_info** — Full table details: columns, indexes, DDL, stats
- **query** — Run a SELECT query
- **create_table** — Create a table (CREATE TABLE only)
- **insert** — Insert rows (INSERT only)
- **update** — Update rows (UPDATE only)
- **delete_data** — Delete rows — requires user approval
- **drop_table** — Drop a table — requires user approval
- **execute_sql** — Run any custom SQL statement

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mysql-ops-mcp": {
    "command": "npx",
    "args": ["-y","mysql-ops-mcp"],
    "env": {
      "DB_HOST": "",
      "DB_PORT": "",
      "DB_USER": "",
      "DB_PASSWORD": "",
      "DB_DATABASE": ""
    }
  }
}
```

**Requires environment variables:** `DB_HOST`, `DB_PORT`, `DB_USER`, `DB_PASSWORD`, `DB_DATABASE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What MySQL Ops MCP MCP server does

MySQL Ops MCP MCP server exposes MySQL database operations as MCP tools for AI clients. It can enumerate databases and tables, inspect columns and types, and retrieve broader table metadata such as indexes, DDL, and statistics. It also supports SELECT queries and selected data-definition or data-manipulation operations.

The tool set separates common actions by intended SQL statement. `create_table` accepts CREATE TABLE operations, `insert` handles INSERT statements, and `update` handles UPDATE statements. `delete_data` removes rows only after client confirmation, while `drop_table` applies the same approval requirement to table removal. `execute_sql` is available for custom SQL statements, so its use should be governed by the database account and client controls.

## How it works

The server communicates with an MCP client over its configured process connection. A client can translate a request such as listing databases, examining a table, or retrieving recent rows into the corresponding tool call. The server returns database metadata or query results to that client.

Write-oriented tools perform statement validation for their intended operation. For example, the query tool is for SELECT statements, while the create-table tool is limited to CREATE TABLE. Delete and drop requests are presented for explicit approval by the MCP client before execution; they are not silently applied.

Access is determined by the MySQL credentials supplied to the process. The project recommends using a least-privilege account scoped to the databases the agent may access rather than connecting as `root` in production. The `execute_sql` tool can run any custom SQL statement, making those database permissions especially important.

## Setup and configuration

MySQL Ops MCP MCP server requires Node.js 18 or newer. The published package can run without cloning or compiling by configuring `npx -y mysql-ops-mcp` as the MCP server command in a project `.mcp.json` file. A source build is also supported: clone the repository, install dependencies, run the build command, and point the client to `dist/index.js` with Node.js.

Connection settings are supplied through environment variables. `DB_HOST`, `DB_PORT`, `DB_USER`, and `DB_PASSWORD` define the connection, while `DB_DATABASE` selects a default database. The host defaults to `localhost`, the port to `3306`, and the user to `root`; if no default database is set, the database can be provided in each tool call.

Keep real passwords out of version control. A connection can be checked before client setup with the repository's `test-connection` command after creating and filling an `.env` file.

## Tools and capabilities

- `list_databases`: returns available databases.
- `list_tables`: lists tables within a selected database.
- `describe_table`: reports table columns and types.
- `get_table_info`: returns columns, indexes, DDL, and statistics.
- `query`: executes a SELECT query.
- `create_table`: executes CREATE TABLE operations.
- `insert`: executes INSERT operations.
- `update`: executes UPDATE operations.
- `delete_data`: deletes rows after user approval.
- `drop_table`: drops a table after user approval.
- `execute_sql`: runs a custom SQL statement.

These capabilities cover database discovery, schema review, read queries, table creation, row insertion and updates, and explicitly confirmed destructive actions.

_Full upstream README: https://allmcps.com/mcp/mysql-ops-mcp/readme_

