Back to MCP Directory
Go MCP MySQL
Model Context Protocol moderate risk

Go MCP MySQL

A ready-to-use Model Context Protocol (MCP) server for interacting with MySQL databases, supporting CRUD operations and read-only modes.

Connections & Capabilities

Connects To

GitHubMySQL

Capabilities

readwriteexecadmin

Quickstart

Config

{
  "mcpServers": {
    "mysql": {
      "command": "go-mcp-mysql",
      "args": [
        "--host", "localhost",
        "--user", "root",
        "--pass", "password",
        "--port", "3306",
        "--db", "mydb"
      ]
    }
  }
}

Exposed MCP Tools (9)

safe
list_database

Lists all databases available on the MySQL server.

Read-only operation, no data modification.

safe
list_table

Lists tables in the MySQL server, optionally filtered by name.

Read-only operation, no data modification.

high
create_table

Creates a new table in the MySQL server using a provided SQL query.

Modifies the database schema, potentially causing disruption.

high
alter_table

Alters an existing table in the MySQL server using a provided SQL query.

Modifies the database schema, potentially causing disruption.

safe
desc_table

Describes the structure of a specified table.

Read-only operation, no data modification.

safe
read_query

Executes a read-only SQL query against the database.

Read-only operation, no data modification.

high
write_query

Executes a write SQL query against the database.

Modifies data in the database.

high
update_query

Executes an update SQL query against the database.

Modifies data in the database.

critical
delete_query

Executes a delete SQL query against the database.

Deletes data from the database.

Safety Assessment

This MCP server offers a balance between functionality and risk. The read-only mode and explain check provide some safety, but the ability to execute arbitrary write queries and the handling of credentials require careful management and oversight. It is safest when used in read-only mode with trusted queries, and riskiest when write access is enabled without proper input validation.

  • Optional read-only mode restricts potentially harmful operations.
  • Includes a query plan check using `EXPLAIN` before executing queries.
  • No external internet exposure by default; operates within the local environment.
  • Uses command-line arguments or DSN for configuration, avoiding hardcoded credentials in code.
  • Write operations allowed by default, posing a risk of unintended data modification.
  • Secrets (database credentials) are passed as command-line arguments or within the DSN string.
  • No built-in RBAC or fine-grained permission controls.
  • Potential for SQL injection if queries are not properly sanitized by the LLM.
Go MCP MySQL Review, Pricing & Alternatives (2026) | Flaex AI