MCP.so
登录
M

MySQL

@pengcunfu

关于 MySQL

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

基本信息

分类

数据库

传输方式

stdio

发布者

pengcunfu

提交者

Peng Cunfu

配置

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

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

工具

未检测到工具

工具是从 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.

FAQ from MySQL

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.

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.

What does the read_query tool return?

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

What does the write_query tool return?

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

评论

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