MySQL MCP Server
@gopikapeenikkal
About MySQL MCP Server
Custom MCP Server for MySQL
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mysql-mcp-server-gopikapeenikkal": {
"command": "uv",
"args": [
"pip",
"install",
"mcp_mysql_connect"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MySQL MCP Server?
A Model Context Protocol (MCP) server that connects to a MySQL database and exposes a tool for AI models to execute SQL queries via natural language, without direct database access.
How to use MySQL MCP Server?
Install with pip install mcp_mysql_connect or uv pip install mcp_mysql_connect. Set environment variables DB_HOST, DB_USER, DB_PASSWORD, and DB_NAME. Then configure in Cursor's mcp.json, use the Python client, or run manually with python -m mcp_mysql_connect.
Key features of MySQL MCP Server
- Provides a single
read_querytool for executing SELECT queries - Allows natural language querying through AI models like Claude
- Integrates with Cursor via
mcp.jsonconfiguration - Supports manual execution and Python client usage
- Requires Python 3.11+ and a MySQL database
Use cases of MySQL MCP Server
- Ask an AI model to list users registered in the last week
- Retrieve top 5 selling products via plain English
- Count orders per customer without writing SQL manually
- Explore database content through conversational chat interfaces
FAQ from MySQL MCP Server
What are the prerequisites for MySQL MCP Server?
Python 3.11 or above and a running MySQL database.
How do I install MySQL MCP Server?
Install via pip: pip install mcp_mysql_connect, or with UV: uv pip install mcp_mysql_connect.
What environment variables are required?
The server needs DB_HOST, DB_USER, DB_PASSWORD, and DB_NAME.
How can I use MySQL MCP Server with Cursor?
Add a "mysql-mcp-server" entry to ~/.cursor/mcp.json using either uvx or uv commands, including the four database environment variables.
What SQL operations does MySQL MCP Server support?
Currently only read_query for SELECT queries; write operations are not mentioned.
Frequently asked questions
What are the prerequisites for MySQL MCP Server?
Python 3.11 or above and a running MySQL database.
How do I install MySQL MCP Server?
Install via pip: `pip install mcp_mysql_connect`, or with UV: `uv pip install mcp_mysql_connect`.
What environment variables are required?
The server needs `DB_HOST`, `DB_USER`, `DB_PASSWORD`, and `DB_NAME`.
How can I use MySQL MCP Server with Cursor?
Add a `"mysql-mcp-server"` entry to `~/.cursor/mcp.json` using either `uvx` or `uv` commands, including the four database environment variables.
What SQL operations does MySQL MCP Server support?
Currently only `read_query` for SELECT queries; write operations are not mentioned.
Basic information
More Databases MCP servers
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Redis MCP Server
redisThe official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
MCP Server for MySQL based on NodeJS
benborlaA Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Neon MCP Server
neondatabase-labsMCP server for interacting with Neon Management API and databases
Comments