Skip to content
appsgit

MySQL MCP Server

MySQL MCP Server is an MCP server that enables secure interaction with MySQL databases. It has 1,398 GitHub stars, is released under the MIT license and runs locally with uvx mysql_mcp_server. It works with Claude Desktop, Claude Code, Cursor and VS Code and needs an API key.

github.com/designcomputer/mysql_mcp_server (opens in a new tab)

Install MySQL MCP Server

Generated from the server's published package. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "mysql-mcp-server": {
      "command": "uvx",
      "args": [
        "mysql_mcp_server"
      ],
      "env": {
        "MYSQL_PASSWORD": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env MYSQL_PASSWORD=your-value --transport stdio mysql-mcp-server -- uvx mysql_mcp_server

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "mysql-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mysql_mcp_server"
      ],
      "env": {
        "MYSQL_PASSWORD": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "mysql_password",
      "description": "MYSQL_PASSWORD",
      "password": true
    }
  ],
  "servers": {
    "mysql-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mysql_mcp_server"
      ],
      "env": {
        "MYSQL_PASSWORD": "${input:mysql_password}"
      }
    }
  }
}

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
MYSQL_HOSTNoShown in the README's example configuration.
MYSQL_PORTNoShown in the README's example configuration.
MYSQL_USERNoShown in the README's example configuration.
MYSQL_PASSWORDsecretNoShown in the README's example configuration.
MYSQL_DATABASENoShown in the README's example configuration.

Tools (3)

Parsed from the Tools section of the README; check the repository for the current list.

  • execute_sql

    Executes any standard SQL query.

  • get_schema_info

    Provides detailed metadata about database structures.

  • get_table_sample

    Fetches a representative sample of data.

About MySQL MCP Server

# MySQL MCP Server A Model Context Protocol (MCP) implementation that enables secure interaction with MySQL databases. This server component facilitates communication between AI applications (hosts/clients) and MySQL databases, making database exploration and analysis safer and more structured through a controlled interface.

  • ai
  • mcp
  • model-context-protocol
  • mysql
  • claude
  • claude-code
  • database
  • llm
  • mcp-server

FAQ

MySQL MCP Server FAQ

Still curious? Email info@appsgit.com.

What is MySQL MCP Server?

MySQL MCP Server is an MCP server that enables secure interaction with MySQL databases. It has 1,398 GitHub stars, is released under the MIT license and runs locally with uvx mysql_mcp_server. It works with Claude Desktop, Claude Code, Cursor and VS Code and needs an API key. The source code is at github.com/designcomputer/mysql_mcp_server.

How do I install the MySQL MCP Server MCP server?

Add the command uvx mysql_mcp_server to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is MySQL MCP Server free?

The server is open source under the MIT license, so running it is free. It needs credentials (MYSQL_PASSWORD) for the service it connects to, which may require a paid account.

Is MySQL MCP Server actively maintained?

The most recent commit was on Aug 2, 2026. The latest release is v0.4.4, published Jul 30, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.