# MySQL (security-first)

> MySQL (security-first) is an open-source MCP server for databases. Security-first MySQL MCP server with AST validation, table whitelist, schema resources, and audit. It runs locally on your machine and is started by your AI client.

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

## About

Security-first MySQL MCP server with AST validation, table whitelist, schema resources, and audit.

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-server-mysql --env MYSQL_MCP_PASSWORD='<MYSQL_MCP_PASSWORD>' -- docker run -i --rm -e MYSQL_MCP_PASSWORD ghcr.io/kurok1/mcp-server-mysql:2.1.0
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-server-mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MYSQL_MCP_PASSWORD",
        "ghcr.io/kurok1/mcp-server-mysql:2.1.0"
      ],
      "env": {
        "MYSQL_MCP_PASSWORD": "<MYSQL_MCP_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-server-mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MYSQL_MCP_PASSWORD",
        "ghcr.io/kurok1/mcp-server-mysql:2.1.0"
      ],
      "env": {
        "MYSQL_MCP_PASSWORD": "<MYSQL_MCP_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "mcp-server-mysql": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MYSQL_MCP_PASSWORD",
        "ghcr.io/kurok1/mcp-server-mysql:2.1.0"
      ],
      "env": {
        "MYSQL_MCP_PASSWORD": "<MYSQL_MCP_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-server-mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MYSQL_MCP_PASSWORD",
        "ghcr.io/kurok1/mcp-server-mysql:2.1.0"
      ],
      "env": {
        "MYSQL_MCP_PASSWORD": "<MYSQL_MCP_PASSWORD>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-server-mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MYSQL_MCP_PASSWORD",
        "ghcr.io/kurok1/mcp-server-mysql:2.1.0"
      ],
      "env": {
        "MYSQL_MCP_PASSWORD": "<MYSQL_MCP_PASSWORD>"
      }
    }
  }
}
```

## FAQ

### Is MySQL (security-first) free?

Yes. MySQL (security-first) is open source, so you can use and self-host it for free.

### How do I add MySQL (security-first) to Claude Code?

Run this command in your terminal: claude mcp add mcp-server-mysql --env MYSQL_MCP_PASSWORD='<MYSQL_MCP_PASSWORD>' -- docker run -i --rm -e MYSQL_MCP_PASSWORD ghcr.io/kurok1/mcp-server-mysql:2.1.0

### What are the best alternatives to MySQL (security-first)?

The closest alternatives to MySQL (security-first) are REA, Agent Roast, Midplane, Leash and Tinplate Edge AI Safety, Security & EU Compliance.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.
- [SecureCloud](https://ai-powered.com/mcp/securecloud): SecureCloud is a free MCP server for security.
- [Eikino](https://ai-powered.com/mcp/eikino): Eikino is a freemium MCP server for security.
- [SynomosAI Governance MCP](https://ai-powered.com/mcp/synomosai-governance-mcp-2): SynomosAI Governance MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/mysql-security-first
