mysql_mcp_server

Level ALocal

A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases

Overview

MySQL MCP Server is an MCP server that lets AI applications interact securely with MySQL databases over STDIO or SSE/HTTP. It lists tables, reads table contents, runs single SQL statements, and provides detailed schema info and data sampling. It supports multi-database mode, SSH tunneling, and SSL/TLS, with credentials via environment variables and strict identifier validation to prevent injection.

⭐ 1.4kDatabasePythonRepo ↗Updated 2026-10-28

Installation

MCP client config (paste into mcp.json)

{
  "mcpServers": {
    "designcomputer-mysql-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "mysql-mcp-server",
        "mysql_mcp_server"
      ],
      "env": {
        "MYSQL_HOST": "${MYSQL_HOST}",
        "MYSQL_PORT": "${MYSQL_PORT}",
        "MYSQL_USER": "${MYSQL_USER}",
        "MYSQL_PASSWORD": "${MYSQL_PASSWORD}",
        "MYSQL_DATABASE": "${MYSQL_DATABASE}"
      }
    }
  }
}

Agent install prompt

Copy and paste into Cursor / Claude / other agents to install this MCP for you

Please read this MCP repository and install it into my current environment:
https://github.com/designcomputer/mysql_mcp_server

Known working client config (can write into mcp.json):
{
  "mcpServers": {
    "designcomputer-mysql-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "mysql-mcp-server",
        "mysql_mcp_server"
      ],
      "env": {
        "MYSQL_HOST": "${MYSQL_HOST}",
        "MYSQL_PORT": "${MYSQL_PORT}",
        "MYSQL_USER": "${MYSQL_USER}",
        "MYSQL_PASSWORD": "${MYSQL_PASSWORD}",
        "MYSQL_DATABASE": "${MYSQL_DATABASE}"
      }
    }
  }
}

Please: 1) check README for deps and env vars; 2) write config for my client; 3) if secrets are missing, tell me what to fill — do not invent values.

Related servers