Go Mysql MCP Server

A Model Context Protocol (MCP) server that provides AI agents with direct access to MySQL databases. This server enables AI models to query, search

Local serverstdioGo

What is the Go Mysql MCP Server?

A Model Context Protocol (MCP) server that provides AI agents with direct access to MySQL databases. This server enables AI models to query, search, and analyze MySQL database content through a set of well-defined tools.

Key capabilities

  • Schema exploration — - List all schemas/databases with pagination
  • Table discovery — - Browse tables in any schema with detailed metadata
  • Structure inspection — - Get column definitions, types, and indexes
  • Safe querying — - Execute SELECT queries with automatic result limiting
  • Full-text search — - Search for values across all text columns in a table
  • DDL retrieval — - Get CREATE TABLE statements for any table

Requirements

  • Go 1.23 or later - Docker (optional, for building Docker images)

Practical notes

  • Maintained by SagenKoder, written in Go.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
list_schemas
list_tables
get_table_structure
get_table_create
execute_query
search_table

How to install the Go Mysql MCP Server

{
  "mcpServers": {
    "mysql": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--network",
        "host",
        "-e",
        "MYSQL_HOST=localhost",
        "-e",
        "MYSQL_USER=your_user",
        "-e",
        "MYSQL_PASSWORD=your_password",
        "-e",
        "MYSQL_DATABASE=your_database",
        "ghcr.io/sagenkoder/go-mysql-mcp-server:stdio"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Go 1.23 or later - Docker (optional, for building Docker images)

Example prompts to try

  • “Use Go Mysql to Prerequisites.”
  • “Use Go Mysql to list schemas.”
  • “Use Go Mysql to list tables.”

Frequently asked questions

A Model Context Protocol (MCP) server that provides AI agents with direct access to MySQL databases. This server enables AI models to query, search, and analyze Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.