Skip to main content
Glama
ismaelrodimb

mcp-mysql-server

by ismaelrodimb

MCP mysql


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.


Related MCP server: Mysql-mcp

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.json uses ./dist/index.js (relative) to avoid Windows path bugs such as C:\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).


Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Facilitates interaction with a local MySQL database via a RESTful API, supporting database queries and real-time updates with integration for Cursor MCP services.
    4
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    A specialized MySQL MCP server for Cursor that enables users to query table structures, execute SQL, and generate database documentation. It features multiple security modes to ensure safe interaction while providing tools for database overviews and query caching.
    5
    MIT