MySQL Ops MCP logo

MySQL Ops MCP

Connects AI clients to MySQL for schema inspection, queries, CRUD, and approval-gated deletes or table drops.

Install MySQL Ops MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mysql-ops-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mysql-ops-mcp"
      ],
      "env": {
        "DB_HOST": "YOUR_VALUE_HERE",
        "DB_PORT": "YOUR_VALUE_HERE",
        "DB_USER": "YOUR_VALUE_HERE",
        "DB_PASSWORD": "YOUR_VALUE_HERE",
        "DB_DATABASE": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y mysql-ops-mcp

Process exited after initialize, before tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

MySQL Ops MCP MCP server connects MCP-compatible AI clients to MySQL databases for schema browsing, queries, and data changes. It runs through npx or a locally built Node.js entry point and reads connection settings from environment variables. Separate tools validate common SQL operations, while delete_data and drop_table require explicit client approval. Reach for it when an agent needs controlled access to inspect or operate on MySQL data.

Use cases

  • Browse MySQL databases and tables
  • Inspect columns, indexes, DDL, and statistics
  • Run SELECT queries against a chosen database
  • Insert or update records through validated tools
  • Approve row deletion or table removal explicitly

Key features

  • Database and table discovery
  • Schema and table metadata inspection
  • Validated SELECT, CREATE TABLE, INSERT, and UPDATE tools
  • Approval-gated row deletion and table drops
  • Custom SQL execution
  • Environment-variable configuration

Tools11

What MySQL Ops MCP lets your agent do. Expand a tool for its parameters.

Self-reported~109 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

26/26 checks healthy over the last 111d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · mysql-ops-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads248Package downloads in the last 30 days.
Last commit4mo agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed11Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How MySQL Ops MCP works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MySQL Ops MCP

MySQL Ops MCP is an MCP server that connects AI clients to MySQL databases. Its main tools list databases and tables, inspect schemas and table metadata, run SELECT queries, perform CRUD operations, and execute custom SQL, with explicit client approval required before deleting rows or dropping tables.

Install it by configuring `npx -y mysql-ops-mcp` in the MCP client's `.mcp.json` file. Node.js 18 or newer is required, and no repository clone or build is needed for the published package. You can instead build from source and run `dist/index.js` with Node.js.

Yes, MySQL Ops MCP works with Cursor. Configure the server in the project's `.mcp.json` using the `npx` command and MySQL environment variables, then use Cursor to issue natural-language requests that invoke the exposed MCP tools.

The MCP client asks for explicit approval before `delete_data` or `drop_table` executes. Each request can be approved or rejected by the user, so these operations are not performed silently.

MySQL Ops MCP uses `DB_HOST`, `DB_PORT`, `DB_USER`, `DB_PASSWORD`, and `DB_DATABASE`. Host, port, and user default to `localhost`, `3306`, and `root`; omitting `DB_DATABASE` requires passing a database with each applicable tool call.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMySQL Ops MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mysql-ops-mcp?style=directory)](https://allmcps.com/mcp/mysql-ops-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/mysql-ops-mcp"><img src="https://allmcps.com/api/badge/mysql-ops-mcp?style=directory" alt="MySQL Ops MCP on AllMCPs" /></a>