MySQL MCP

io.github.gistrec/mcp-mysql-client

MCP server for one MySQL database: schema, read-only queries and guarded writes.

Connect this server

Add this to your MCP client config — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor).Suits: Claude Desktop · Cursor.

{
  "mcpServers": {
    "mcp-mysql-client": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-mysql-client@1.1.1"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "<your MYSQL_USER>",
        "MYSQL_PASS": "<your MYSQL_PASS>",
        "MYSQL_DB": "<your MYSQL_DB>",
        "MYSQL_SSL": "false",
        "ALLOW_INSERT_OPERATION": "false",
        "ALLOW_UPDATE_OPERATION": "false",
        "ALLOW_DELETE_OPERATION": "false",
        "MYSQL_MAX_ROWS": "1000",
        "MYSQL_TIMEOUT_MS": "30000"
      }
    }
  }
}
Environment variables
  • MYSQL_HOSTDatabase host.
  • MYSQL_PORTDatabase port.
  • MYSQL_USERrequiredMySQL user. Use one with the least privileges the task needs, never root.
  • MYSQL_PASSsecretPassword for that user. Treat it as a secret; MYSQL_PASS_FILE reads it from a file instead.
  • MYSQL_DBrequiredThe one database this server is bound to. No tool can leave it.
  • MYSQL_SSLRequire a TLS connection to the server.
  • ALLOW_INSERT_OPERATIONAllow INSERT statements through the execute tool.
  • ALLOW_UPDATE_OPERATIONAllow UPDATE statements through the execute tool.
  • ALLOW_DELETE_OPERATIONAllow DELETE statements through the execute tool.
  • MYSQL_MAX_ROWSRow cap for one read; the result is marked truncated when it is hit.
  • MYSQL_TIMEOUT_MSStatement timeout in milliseconds; the connection is dropped on expiry.

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Databases
Version
1.1.1
Registry
active
Published
11/4/2026
Browse all Databases →

Add the badge to your site

Show visitors that MySQL MCP is listed here — it’s also the link we check for a free listing.

MySQL MCP — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-gistrec-mcp-mysql-client?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="MySQL MCP — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![MySQL MCP — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-gistrec-mcp-mysql-client?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.