# MCP Server MySQL (MCP server)

> MCP Server MySQL is an MCP server that provides read-only access to MySQL databases. It has 2,166 GitHub stars, is released under the MIT license and runs locally with npx -y @benborla29/mcp-server-mysql. It works with Claude Desktop, Claude Code, Cursor and VS Code.

Using mcp-server-mysql to let your AI query MySQL? Bloome brings that to your whole team — an AI-agent IM platform where AI agents are members of the chat. Connect your MCP tools and have agents inspect schemas, run queries, and answer data questions for everyone in one thread. Zero local setup, runs in the cloud, on web and mobile.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/benborla/mcp-server-mysql |
| GitHub stars | 2,166 |
| License | MIT |
| Language | JavaScript |
| Transport | stdio |
| Packages | npm: @benborla29/mcp-server-mysql |
| Remote URL | none |
| Needs API key | no |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | Databases |
| Latest release | v2.0.9 (Jun 19, 2026) |
| Last commit | Jul 27, 2026 |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-server-mysql": {
      "command": "npx",
      "args": [
        "-y",
        "@benborla29/mcp-server-mysql"
      ],
      "env": {
        "MYSQL_HOST": "your-value",
        "MYSQL_PORT": "your-value",
        "MYSQL_USER": "your-value",
        "MYSQL_PASS": "your-value",
        "MYSQL_DB": "your-value"
      }
    }
  }
}
```

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

### Claude Code

```sh
claude mcp add --env MYSQL_HOST=your-value --env MYSQL_PORT=your-value --env MYSQL_USER=your-value --env MYSQL_PASS=your-value --env MYSQL_DB=your-value --transport stdio mcp-server-mysql -- npx -y @benborla29/mcp-server-mysql
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-server-mysql": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@benborla29/mcp-server-mysql"
      ],
      "env": {
        "MYSQL_HOST": "your-value",
        "MYSQL_PORT": "your-value",
        "MYSQL_USER": "your-value",
        "MYSQL_PASS": "your-value",
        "MYSQL_DB": "your-value"
      }
    }
  }
}
```

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

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-server-mysql": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@benborla29/mcp-server-mysql"
      ],
      "env": {
        "MYSQL_HOST": "your-value",
        "MYSQL_PORT": "your-value",
        "MYSQL_USER": "your-value",
        "MYSQL_PASS": "your-value",
        "MYSQL_DB": "your-value"
      }
    }
  }
}
```

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `MYSQL_HOST`: Shown in the README's example configuration.
- `MYSQL_PORT`: Shown in the README's example configuration.
- `MYSQL_USER`: Shown in the README's example configuration.
- `MYSQL_PASS`: Shown in the README's example configuration.
- `MYSQL_DB`: Shown in the README's example configuration.

## Similar MCP servers

- [Mindwtr](https://appsgit.com/mcp-servers/mindwtr): Task automation via SQLite, desktop Local API, or Mindwtr Cloud; read-only by default. (2,270 stars, AGPL-3.0, needs API key)
- [MCP Memory Service](https://appsgit.com/mcp-servers/mcp-memory-service): Open-source persistent memory for AI agent pipelines (LangGraph, CrewAI, AutoGen) and Claude. (2,021 stars, Apache-2.0)
- [Supabase](https://appsgit.com/mcp-servers/supabase): MCP server for interacting with the Supabase platform. (2,956 stars, Apache-2.0, official, needs API key)
- [Pg Aiguide](https://appsgit.com/mcp-servers/pg-aiguide): Comprehensive PostgreSQL documentation and best practices, including ecosystem tools. (1,870 stars, Apache-2.0, needs API key)
- [Butterbase AI MCP Server](https://appsgit.com/mcp-servers/butterbase-ai-mcp-server): Butterbase MCP server — manage your backend: schemas, auth, functions, storage, RAG, deploys. (3,111 stars, Apache-2.0, needs API key)
- [MySQL MCP Server](https://appsgit.com/mcp-servers/mysql-mcp-server): A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases. (1,399 stars, MIT, needs API key)

---

Canonical page: https://appsgit.com/mcp-servers/mcp-server-mysql
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed daily.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
