MCP Catalogs
Home

go-mcp-mysql

by Zhwt·53·Score 44

A production-ready Go-based MCP server for MySQL database operations with read-only mode and query plan checking.

databasedeveloper-toolsai-llm
14
Forks
1
Open issues
4 mo ago
Last commit
2d ago
Indexed

Overview

go-mcp-mysql is a well-structured Model Context Protocol server that enables AI models to interact with MySQL databases. Built in Go, it provides a zero-dependency solution for executing CRUD operations while maintaining security through read-only mode and optional query plan validation. The server implements proper MCP protocol patterns with clearly defined tools for database schema inspection and data manipulation.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Automating database queries and data analysis through AI assistants
you:Enabling natural language interfaces for MySQL database operations
you:Safely exploring database structures with read-only access before making changes
you:Is this server safe for production use?
you:Can I use custom MySQL connection parameters?

When to choose this

Choose this server when you need a lightweight MySQL integration for AI systems without Node.js/Python dependencies, or when you specifically need query plan validation via EXPLAIN statements.

When NOT to choose this

Avoid this if you need advanced security features, authentication beyond basic credentials, or production stability as it's marked as work in progress.

Tools this server exposes

9 tools extracted from the README
  • list_database

    List all databases in the MySQL server.

  • list_table

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

  • create_table

    Create a new table in the MySQL server.

  • alter_table

    Alter an existing table structure without dropping tables or columns.

  • desc_table

    Describe the structure of a table.

  • read_query

    Execute a read-only SQL query.

  • write_query

    Execute a write SQL query.

  • update_query

    Execute an update SQL query.

  • delete_query

    Execute a delete SQL query.

Comparable tools

mysql-mcppostgres-mcpdatabase-js

Installation

Installation

Option 1: Download Binary

  1. Get the latest [release](https://github.com/Zhwt/go-mcp-mysql/releases)
  2. Place it in your $PATH or easily accessible location

Option 2: Build from Source

go install -v github.com/Zhwt/go-mcp-mysql@latest

Configuration

Add to Claude Desktop configuration:

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

FAQ

Is this server safe for production use?
The README mentions it's a work in progress and may not be ready for production use yet. However, it includes security features like read-only mode and query plan checking.
Can I use custom MySQL connection parameters?
Yes, you can use either individual parameters (--host, --user, etc.) or a full DSN string with --dsn flag for more complex configurations.

Compare go-mcp-mysql with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.