Provides comprehensive MySQL database operations including database and table management, data querying and modification (SELECT, INSERT, UPDATE, DELETE), index management, and schema operations with configurable permission controls for write operations.
MCP Server MySQL
A Model Context Protocol (MCP) server that provides MySQL database operations. This server enables LLMs to interact with MySQL databases through a standardized protocol.
Features
Database Management: Create, drop, list, and switch databases
Table Operations: Create, alter, drop, describe, and list tables
Data Queries: Execute SELECT queries and retrieve results
Data Modification: Execute INSERT, UPDATE, DELETE statements
Index Management: Create and drop indexes
Installation
Configuration
Set environment variables for database connection:
Permission Controls
Control which write operations are allowed (all default to true):
Or use the connect tool at runtime to specify connection parameters.
Usage with Claude Desktop
Using npx (Recommended)
Add to your claude_desktop_config.json:
Using Local Installation
Available Tools
Tool | Description |
| Connect to a MySQL database |
| Execute SELECT queries |
| Execute INSERT/UPDATE/DELETE queries |
| List all databases |
| List tables in a database |
| Get table structure |
| Create a new table |
| Modify table structure |
| Drop a table |
| Create a new database |
| Drop a database |
| Switch to a database |
| Create an index |
| Drop an index |
Examples
Query data
Create a table
Insert data
License
MIT