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>
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.