MCP.so
Sign In
Servers
M

MySQL

@pengcunfu

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

Overview

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.

Tags

More from Databases