MySQL MCP Server

MySQL MCP server for cursor

Local serverstdio

What is the MySQL MCP Server?

MySQL MCP server for cursor

What you get

This project implements an MCP (Model Context Protocol) server for working with MySQL database.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
queryexecute SQL queries (only SELECT, SHOW, EXPLAIN, DESCRIBE)
table-schemaget table structure
list-tablesget list of all tables in the database

Configuration

VariableDescriptionRequired
MYSQL_HOSTEndpoint or connection string the server talks to.Optional
MYSQL_PORTConfiguration value read at startup.Optional
MYSQL_USERConfiguration value read at startup.Optional
MYSQL_PASSConfiguration value read at startup.Optional
MYSQL_DBConfiguration value read at startup.Optional

Example prompts to try

  • “Use MySQL to query.”
  • “Use MySQL to table-schema.”
  • “Use MySQL to list-tables.”

Frequently asked questions

Only SELECT, SHOW, EXPLAIN, and DESCRIBE statements. The server enforces read‑only access, so INSERT, UPDATE, DELETE, and other write commands are not allowed.