Skip to content
VS Code

mysql for VS Code

io.github.hughhan1/mysql

MySQL statements and transactions over MCP

client:VS Code transport:stdio runtime:oci

Install mysql in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "database-url",
      "description": "DATABASE_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "cloud-sql-instance",
      "description": "CLOUD_SQL_INSTANCE",
      "password": true
    }
  ],
  "servers": {
    "mysql": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hughhan1/mysql@sha256:858da81df0d25bba99f485ae663208f2255b2278be711924f9b08032398e7093"
      ],
      "env": {
        "DATABASE_URL": "${input:database-url}",
        "CLOUD_SQL_INSTANCE": "${input:cloud-sql-instance}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

mysql in other clients