mcp-mysql-server
Local Cursor plugin / MCP server for MySQL & MariaDB. Inspect schema, query data, and mutate safely with read-only by default.
README
MCP mysql
<p align="center"> <img src="./assets/logo.svg" alt="MCP mysql logo" width="96" height="96" /> </p>
<p align="center"> <strong>Local Cursor plugin / MCP server for MySQL & MariaDB</strong><br/> Inspect schema · query data · mutate safely · read-only by default </p>
<p align="center"> <a href="https://github.com/ismaelrodimb/mcp-mysql-server"><img alt="GitHub" src="https://img.shields.io/badge/GitHub-ismaelrodimb%2Fmcp--mysql--server-181717?logo=github" /></a> <a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg" /></a> <img alt="Node.js 20+" src="https://img.shields.io/badge/Node.js-20%2B-339933?logo=node.js&logoColor=white" /> <img alt="MCP" src="https://img.shields.io/badge/Protocol-MCP-6E56CF" /> <img alt="Default mode" src="https://img.shields.io/badge/Default-read--only-2ea44f" /> </p>
<p align="center"> <a href="./README.es.md">Español</a> · <a href="./docs/README.md">Docs</a> · <a href="./docs/INSTALL.md">Installation</a> · <a href="./docs/SUPPORT.md">Support</a> · <a href="https://github.com/ismaelrodimb">Author</a> </p>
Overview
MCP mysql is a Model Context Protocol server for Cursor. It connects directly to MySQL/MariaDB.
Not a phpMyAdmin integration. phpMyAdmin does not expose an MCP API. This plugin talks to the database server itself — the same kind of backend phpMyAdmin can use — not to the phpMyAdmin web UI.
The repo ships as a local Cursor plugin (.cursor-plugin/plugin.json + mcp.json) and includes an agent skill at skills/mysql-best-practices/SKILL.md.
| Author | Ismael Rodríguez |
| Repository | ismaelrodimb/mcp-mysql-server |
| License | MIT |
| Docs | docs/README.md |
| Privacy | docs/PRIVACY.md |
| Support | docs/SUPPORT.md |
| Security | docs/SECURITY.md |
Features
| Area | Capabilities |
|---|---|
| Discover | List databases and tables |
| Schema | Describe columns, primary keys, and foreign keys |
| Resources | Full schema via MCP resources (per DB / per table) |
| DDL | Create/drop tables · add/drop columns |
| DML | Select, insert, update, delete rows (write mode dependent) |
Security
Starts in read-only by default.
| Mode | Behavior |
|---|---|
none |
Writes disabled |
read-only |
Read access only (recommended to start) |
full |
Allows INSERT, UPDATE, DELETE, and schema changes |
Prefer a least-privilege MySQL user. Never commit real passwords to shared configs.
Requirements
- Node.js 20+
- MySQL or MariaDB reachable from this machine
- Database credentials
Quick start
Full guides: docs/INSTALL.md · docs/es/INSTALL.md
npm install
npm run build
Install as a local Cursor plugin (example path on Windows):
C:\Users\<YOUR_USER>\.cursor\plugins\local\mcp-mysql-server
Then enable MCP mysql in Cursor and set MYSQL_* + MCP_WRITE_MODE.
The plugin
mcp.jsonuses./dist/index.js(relative) to avoid Windows path bugs such asC:\c:\Users\....
Development
# watch / run from source
npm run dev
# production build
npm run build
npm start
MCP tools
Read
| Tool | Description |
|---|---|
list_databases |
List available databases |
list_tables |
List tables in a database |
describe_table |
Column metadata for a table |
inspect_database_schema |
Full schema for a database |
inspect_table_relationships |
Primary and foreign keys |
select_rows |
Read rows with simple filters |
Write / schema
| Tool | Description |
|---|---|
insert_row |
Insert a row |
update_rows |
Update rows (filters required) |
delete_rows |
Delete rows (filters + confirmation) |
create_table |
Create a table |
drop_table |
Drop a table (confirmation required) |
add_column |
Add a column |
drop_column |
Drop a column (confirmation required) |
MCP resources
| URI | Returns |
|---|---|
mysql://databases |
Available databases |
mysql://schema/{database} |
Full schema (tables, columns, keys, relations) |
mysql://table/{database}/{table} |
Single-table detail |
Limitations
- No free-form arbitrary SQL execution
- Identifiers limited to alphanumeric characters and
_ - Filters support:
=,!=,>,>=,<,<=,LIKE,IN
Support, privacy & security
| Topic | Document |
|---|---|
| Docs index | docs/README.md |
| End-user support | docs/SUPPORT.md |
| Contributing | docs/CONTRIBUTING.md · docs/es/CONTRIBUTING.md |
| Code of conduct | CODE_OF_CONDUCT.md |
| Privacy policy | docs/PRIVACY.md · docs/es/PRIVACY.md |
| Security reporting | docs/SECURITY.md |
| License | LICENSE (MIT) |
Support is provided by the publisher via GitHub Issues (use the bug / feature templates). Cursor / Anysphere do not provide support for this third-party plugin.
Contributing
See docs/CONTRIBUTING.md for the issue process, development setup, and PR guidelines.
Documentation
All guides live under docs/ (English) and docs/es/ (Spanish).
| Document | English | Español |
|---|---|---|
| Docs index | docs/README.md | docs/README.es.md |
| Installation | docs/INSTALL.md | docs/es/INSTALL.md |
| Contributing | docs/CONTRIBUTING.md | docs/es/CONTRIBUTING.md |
| Support | docs/SUPPORT.md | docs/es/SUPPORT.md |
| Privacy | docs/PRIVACY.md | docs/es/PRIVACY.md |
| Security | docs/SECURITY.md | docs/es/SECURITY.md |
| Code of conduct | CODE_OF_CONDUCT.md | — |
<p align="center"> Made by <a href="https://github.com/ismaelrodimb">Ismael Rodríguez</a> </p>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。