MCP.so
登录
M

MySQL MCP Server

@pengcunfu

基本信息

分类

数据库

传输方式

stdio

作者

pengcunfu

提交者

Peng Cunfu

关于 MySQL MCP Server

零负担、开箱即用的模型上下文协议(MCP)服务器,用于与 MySQL 交互和自动化操作。无需 Node.js 或 Python 环境。该服务器提供对 MySQL 数据库和表进行 CRUD 操作的工具,以及只读模式以防止意外的写入操作。您还可以通过添加 --with-explain-check 标志让 MCP 服务器在执行查询前使用 EXPLAIN 语句检查查询计划。

MySQL MCP Server 配置

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

{
  "mcpServers": {
    "mysql": {
      "command": "C:\\Users\\<username>\\Downloads\\go-mcp-mysql.exe",
      "args": [
        "--host",
        "localhost",
        "--user",
        "root",
        "--pass",
        "password",
        "--port",
        "3306",
        "--db",
        "mydb"
      ]
    }
  }
}

MySQL MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

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

概览

What is MySQL?

This MCP server provides tools for interacting with a MySQL database, allowing an LLM to list databases and tables, create and alter tables, describe table structures, and execute SQL queries. It is intended for developers who want to manage MySQL data through an AI assistant.

How to use MySQL?

Invoke the server’s tools via the Model Context Protocol to perform database operations. The README does not include installation or configuration steps; it only lists the available tools and their parameters.

Key features of MySQL

  • List all databases on the server.
  • List, create, and describe tables.
  • Alter existing tables (without deleting tables or columns).
  • Execute read-only SQL queries.
  • Execute write, update, and delete SQL queries.

Use cases of MySQL

  • Exploring database schema and table structures.
  • Creating new tables for data storage.
  • Modifying existing table definitions.
  • Running analytical queries on data.
  • Inserting, updating, and deleting records.

常见问题

1

What SQL operations are supported?

The server supports read queries, write queries (INSERT), update queries, and delete queries, as well as schema operations like CREATE TABLE and ALTER TABLE.

2

What precautions are taken when altering tables?

The server instructs the LLM not to delete existing tables or columns when using the alter_table tool.

3

What does the read_query tool return?

It returns the query results from a read-only SQL query.

4

What does the write_query tool return?

It returns the number of affected rows and the last inserted ID.

评论

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