TQ
MySQL MCP Server
A Model Context Protocol (MCP) server for interacting with MySQL databases in Cursor IDE.
Features
- Execute SQL queries (read-only by default).
- Inspect database schemas.
- Configurable write permissions.
Installation
npm install
Configuration
Create .env with:
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=your_username
MYSQL_PASS=your_password
MYSQL_DB=your_database
ALLOW_INSERT_OPERATION=false
ALLOW_UPDATE_OPERATION=false
ALLOW_DELETE_OPERATION=false
Usage in Cursor
Add to .cursor/mcp.json
{
"mcpServers": {
"mysqlMcpServer": {
"command": "npx",
"args": ["ts-node", "path/to/src/index.ts"],
"env": {
"MYSQL_HOST": "<host>",
"MYSQL_PORT": "<port>",
"MYSQL_USER": "<user>",
"MYSQL_PASS": "<pass>",
"MYSQL_DB": "db",
"ALLOW_INSERT_OPERATION": "false",
"ALLOW_UPDATE_OPERATION": "false",
"ALLOW_DELETE_OPERATION": "false"
}
}
}
}
License
MIT
Transport:
stdio
Language: 
Created: 4/21/2025
Updated: 4/23/2025
Recommend MCP Servers 💡
FunnyPuppet/mcp-s3-server
FunnyPuppet
MCP server for object storage operations including list, create, delete buckets and objects
2025-04-20
PostgresSchemaServer
RichardHFYU
An MCP server built with Spring Boot and Spring AI that provides tools to inspect PostgreSQL database schema using SSE transport
2025-04-17
sse
mcp-adonet-server
OpenLinkSoftware
A C#-based MCP server enabling ADO.NET ODBC database interactions for LLMs via Model Context Protocol, supporting SQL/SPARQL queries and Virtuoso-specific features
2025-04-22
@malove86/mcp-mysql-server
Malove86
基于Model Context Protocol的MySQL数据库操作服务器,支持AI模型通过标准化接口与MySQL交互。
2025-04-16
cdata-jdbc-mcp-server
CDataSoftware
A read-only MCP Server that connects Claude Desktop to external data through CData JDBC Drivers
2025-04-28
influxdb-mcp-server
idoru
An MCP Server for querying InfluxDB
2025-03-11