MCP.so
登录

go-mcp-mysql

@optimisticdur

关于 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. mcp, mcp-server, model-context-protocol, mysql

基本信息

分类

数据库

许可证

MIT license

运行时

go

传输方式

stdio

发布者

optimisticdur

配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

工具

未检测到工具

工具是从 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. It provides tools for CRUD operations on databases and tables, supports a read-only mode to prevent accidental writes, and can optionally check query plans via EXPLAIN before executing queries. No Node.js or Python runtime is required. This is a work in progress and may not yet be ready for production.

How to use go-mcp-mysql?

Download the latest release binary and place it in your $PATH, or build from source with go install -v github.com/optimisticdur/go-mcp-mysql@latest. Configure it in your MCP client using either command‑line arguments (host, user, pass, port, db) or a DSN string. Optional flags include --read-only to restrict tools to read-only operations and --with-explain-check to disable the default EXPLAIN check for CRUD queries.

Features of go-mcp-mysql

  • No Node.js or Python environment needed
  • Supports both command‑line arguments and DSN configuration
  • Read-only mode prevents surprise write operations
  • Optional EXPLAIN query plan checking before execution
  • Tools for listing databases and tables
  • CRUD operations: read, write, update, delete queries

Use cases of go-mcp-mysql

  • Managing MySQL databases through AI‑assisted chat interfaces
  • Executing read‑only queries safely during development or auditing
  • Creating, altering, and describing table schemas via natural language
  • Performing automated database maintenance with write‑protected safeguards

FAQ from go-mcp-mysql

What is go-mcp-mysql and how does it differ from other database MCP servers?

It is a self‑contained MCP server for MySQL that does not require Node.js or Python, making it lighter and easier to deploy. It also offers a read‑only mode and built‑in EXPLAIN query plan checks for added safety.

What are the runtime dependencies?

The only dependency is the compiled binary itself (or a Go installation if building from source). No other language runtimes are needed.

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_, and desc_ are available. Restart the MCP server after adding the flag.

What does the EXPLAIN check do?

By default, each CRUD query is first run through EXPLAIN ? to inspect the query plan. If the plan does not match expected patterns, the query may be rejected. Adding the --with-explain-check flag disables this check.

Can I use a DSN to connect to MySQL?

Yes. Use the --dsn flag with a standard MySQL DSN string. Refer to the MySQL driver documentation for DSN format options.

评论

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