MySQL MCP Server
@vitalyDV
关于 MySQL MCP Server
MySQL MCP server for cursor
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MySQL MCP Server?
MySQL MCP Server is an MCP (Model Context Protocol) server that integrates with MySQL databases. It allows AI assistants and MCP-compatible clients to execute read-only SQL queries, explore database schemas, and retrieve table data. The server is intended for developers who want to connect an AI tool to a MySQL database safely using only query‑side operations.
How to use MySQL MCP Server?
Clone the repository from GitHub, install dependencies with npm install, and add the server configuration to your mcp.json file under mcpServers. The configuration requires setting environment variables for the MySQL connection (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, MYSQL_DB). The server is started with the command node ./mysql-mcp/index.js.
Key features of MySQL MCP Server
- Execute read‑only SQL queries (SELECT, SHOW, EXPLAIN, DESCRIBE)
- Retrieve the structure (schema) of any table
- List all tables in the connected database
- Access table data via the resource
table://{name}(up to 100 rows) - Simple environment‑variable based configuration
Use cases of MySQL MCP Server
- Query a MySQL database using natural language through an MCP‑capable AI assistant
- Inspect table schemas and list tables without writing raw SQL
- Quickly fetch sample data from a table for preview or analysis
- Enable read‑only database exploration for non‑technical users via an AI interface
FAQ from MySQL MCP Server
Which SQL statements are supported?
Only SELECT, SHOW, EXPLAIN, and DESCRIBE statements. The server enforces read‑only access, so INSERT, UPDATE, DELETE, and other write commands are not allowed.
How do I configure the MySQL connection?
Set the environment variables MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, and MYSQL_DB in the MCP server configuration. They specify the MySQL host, port, username, password, and database name.
Does the server allow write operations to the database?
No. The query tool only accepts read‑only SQL statements, and the other tools (table‑schema, list‑tables) are also read‑only. The server is designed for safe, query‑only access.
How many rows can I retrieve from a table resource?
The table://{name} resource returns up to 100 rows. There is no pagination or limit override described in the README.
What runtime does the server require?
The server runs on Node.js. You need to have Node.js and npm installed to clone the repository and install dependencies before launching the server.
数据库 分类下的更多 MCP 服务器
MCP Alchemy
runekaagaardA MCP (model context protocol) server that gives the LLM access to and knowledge about relational databases like SQLite, Postgresql, MySQL & MariaDB, Oracle, and MS-SQL.
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
Meilisearch MCP Server
meilisearchA Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces.
Postgres Mcp
crystaldbaPostgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
评论