# Mysql

> Mysql is an open-source MCP server for databases. MySQL statements and transactions over MCP. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/hughhan1/mysql
- **MCP Registry name:** io.github.hughhan1/mysql
- **Categories:** databases
- **Listing updated:** 2026-11-13

## About

MySQL statements and transactions over MCP

## Install

### Claude Code (Terminal)

```sh
claude mcp add mysql --env DATABASE_URL='<DATABASE_URL>' -- docker run -i --rm -e DATABASE_URL ghcr.io/hughhan1/mysql@sha256:858da81df0d25bba99f485ae663208f2255b2278be711924f9b08032398e7093
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DATABASE_URL",
        "ghcr.io/hughhan1/mysql@sha256:858da81df0d25bba99f485ae663208f2255b2278be711924f9b08032398e7093"
      ],
      "env": {
        "DATABASE_URL": "<DATABASE_URL>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DATABASE_URL",
        "ghcr.io/hughhan1/mysql@sha256:858da81df0d25bba99f485ae663208f2255b2278be711924f9b08032398e7093"
      ],
      "env": {
        "DATABASE_URL": "<DATABASE_URL>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "mysql": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DATABASE_URL",
        "ghcr.io/hughhan1/mysql@sha256:858da81df0d25bba99f485ae663208f2255b2278be711924f9b08032398e7093"
      ],
      "env": {
        "DATABASE_URL": "<DATABASE_URL>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DATABASE_URL",
        "ghcr.io/hughhan1/mysql@sha256:858da81df0d25bba99f485ae663208f2255b2278be711924f9b08032398e7093"
      ],
      "env": {
        "DATABASE_URL": "<DATABASE_URL>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "DATABASE_URL",
        "ghcr.io/hughhan1/mysql@sha256:858da81df0d25bba99f485ae663208f2255b2278be711924f9b08032398e7093"
      ],
      "env": {
        "DATABASE_URL": "<DATABASE_URL>"
      }
    }
  }
}
```

## FAQ

### Is Mysql free?

Yes. Mysql is open source, so you can use and self-host it for free.

### How do I add Mysql to Claude Code?

Run this command in your terminal: claude mcp add mysql --env DATABASE_URL='<DATABASE_URL>' -- docker run -i --rm -e DATABASE_URL ghcr.io/hughhan1/mysql@sha256:858da81df0d25bba99f485ae663208f2255b2278be711924f9b08032398e7093

### What are the best alternatives to Mysql?

The closest alternatives to Mysql are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.

## Alternatives

- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [PlatypusDB](https://ai-powered.com/mcp/platypusdb): PlatypusDB is an open-source MCP server for databases.
- [Lorebase](https://ai-powered.com/mcp/lorebase): Lorebase is an open-source MCP server for knowledge and memory.
- [Sovaria](https://ai-powered.com/mcp/sovaria): Sovaria is a freemium MCP server for databases.
- [model2data studio](https://ai-powered.com/mcp/model2data-studio): model2data studio is a freemium MCP server for databases.
- [semlayer](https://ai-powered.com/mcp/semlayer): semlayer is a free MCP server for databases.
- [bricksentry](https://ai-powered.com/mcp/bricksentry): bricksentry is an open-source MCP server for databases.
- [MCP Toolbox for Databases](https://ai-powered.com/mcp/mcp-toolbox-for-databases-2): MCP Toolbox for Databases is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/mysql-2
