MCP.so
登录

go-mcp-mysql

@Zhwt

关于 go-mcp-mysql

Zero burden, ready-to-use Model Context Protocol (MCP) server for interacting with MySQL and automation. No Node.js or Python environment needed.

基本信息

分类

数据库

许可证

MIT

运行时

go

传输方式

stdio

发布者

Zhwt

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

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

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is go-mcp-mysql?

go-mcp-mysql is a zero-burden, ready-to-use Model Context Protocol (MCP) server for interacting with MySQL databases and automation. It requires no Node.js or Python environment. The server provides tools for CRUD operations on MySQL databases and tables, a read-only mode to prevent surprise writes, and optional EXPLAIN‑checking before queries. It is a work in progress and may not be production‑ready.

How to use go-mcp-mysql?

Download the latest binary from GitHub releases and place it in your $PATH (or build from source with go install). Configure your MCP client (e.g., Claude Desktop) with a JSON entry specifying the binary path and connection parameters either via --host, --user, --pass, --port, --db or via a DSN string using --dsn. Optional flags --read-only (restricts tools to list_, read_, and desc_ only) and --with-explain-check (disables the default EXPLAIN plan check) can be added.

Key features of go-mcp-mysql

  • No Node.js or Python runtime required (Go binary).
  • CRUD operations on databases and tables.
  • Read-only mode prevents accidental write operations.
  • Optional EXPLAIN plan check before query execution.
  • Schema tools: list, create, alter, and describe tables.
  • Data tools: read, write, update, and delete queries.

Use cases of go-mcp-mysql

  • Query MySQL databases via natural language through an LLM.
  • Explore database schemas and table structures.
  • Perform controlled CRUD operations under LLM guidance.
  • Safely analyse query plans with automatic EXPLAIN checks.
  • Isolate read‑only tasks to avoid unintended writes.

FAQ from go-mcp-mysql

What runtime do I need to run go-mcp-mysql?

No Node.js or Python is required. The server is a single Go binary that works on Windows, macOS, and Linux.

How do I enable read-only mode?

Add the --read-only flag to the server arguments. In this mode only tools starting with list_, read_ or desc_ are available.

How can I disable the default EXPLAIN plan check?

By default every write query is preceded by an EXPLAIN check. To disable this, add the --with-explain-check flag.

Is go-mcp-mysql ready for production?

No, the README states that it is a work in progress and may not yet be ready for production use.

Where can I download the binary?

Binaries are available on the GitHub releases page. You can also build from source using go install -v github.com/Zhwt/go-mcp-mysql@latest.

评论

数据库 分类下的更多 MCP 服务器