MySQL MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MySQL MCP Serverlist all tables in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🐬 MySQL MCP Server (FastMCP-Powered)
Leverage the power of AI to automate your MySQL workflows with FastMCP.
This tool enables AI agents like Claude, OpenAI, or DeepSeek to interact with your MySQL database using natural language, making database management seamless and intelligent.
Whether you're generating synthetic data, querying your tables, or performing updates, this MCP server allows AI to operate on your database through standardized interfaces — all from your local machine.
🔎 Best use for generating synthetic data for testing your apis.
Related MCP server: MySql MCP Server
💡 Key Features
Automates SQL tasks via AI (Claude, OpenAI, DeepSeek, etc.)
Works over Stdio, ideal for local desktop integration
Generates synthetic data based on your schema and recent values
No manual SQL knowledge required
Highly useful for test environments and data prototyping
🛠️ Supported Tools
Tool | Description |
| Retrieve all column names of a table |
| List all table names in the database |
| Fetch records from any table |
| Insert data into a table |
| Update records with conditions |
| Delete records based on criteria |
These are internally used by the AI to understand and manipulate your database efficiently.
⚙️ Configuration & Setup
📋 Prerequisites
Python 3.10+
MySQL (running locally or remotely)
Anthropic Claude Desktop app (or Cursor)
UV (Python package manager), install with
curl -LsSf https://astral.sh/uv/install.sh | sh
Steps
Clone this repository
git clone https://github.com/Ashutosh-rajput/mysql-mcp.git cd mysql-mcp uv pip install -r requirements.txtFill the .env
MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_USER=root MYSQL_PASSWORD=yourpassword MYSQL_DATABASE=yourdatabaseConnect to the MCP server
Copy the below json with the appropriate {{PATH}} values:
{ "mcpServers": { "Mysql": { "command": "[path to uv]/uv", "args": [ "run", "--with", "fastmcp", "--with", "mysql-connector-python", "--with", "python-dotenv", "fastmcp", "run", "[path to your main.py]/main.py" ] } } }For Claude, save this as
claude_desktop_config.jsonin your Claude Desktop configuration directory at:~/Library/Application Support/Claude/claude_desktop_config.jsonFor Cursor, save this as
mcp.jsonin your Cursor configuration directory at:~/.cursor/mcp.jsonRestart Claude Desktop / Cursor
Open Claude Desktop and you should now see WhatsApp as an available integration.
Or restart Cursor.
🧠 Tip
Use this project as a backbone to build intelligent, event-driven Mysql bots, agents.
📜 License
MIT License. Feel free to use and modify as per your needs.
👤 Author: Ashutosh Rajput
🌐 Project: MySql-MCP
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ashutosh-rajput/mysql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server