
MCP server that provides direct access to MySQL databases
MCP server that provides direct access to MySQL databases
A powerful MCP server that provides direct access to MySQL databases. This server enables AI agents to interact with MySQL databases, execute SQL queries, and manage database content through a simple interface.
note:///{id} URIscreate_note - Create new text notes in the database
list_tables - List all tables in the connected databasecount_tables - Get the total number of tables in the databasesearch_tables - Search for tables using LIKE patterndescribe_table - Get the structure of a specific tableexecute_sql - Execute custom SQL queriesClone this repository:
git clone [email protected]:LeonMelamud/mysql-mcp.git
cd mysql-mcpInstall dependencies:
npm installCreate a .env file in the root directory with your MySQL connection details:
MYSQL_HOST=localhost
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_databaseBuild the server:
npm run buildAdd the server config to your Claude Desktop configuration file:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mysql": {
"command": "node",
"args": ["/path/to/mysql-server/build/index.js"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
}
}
}
}Add the server config to your Cline MCP settings file:
On MacOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
On Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
{
"mcpServers": {
"mysql": {
"command": "node",
"args": ["/path/to/mysql-server/build/index.js"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
},
"disabled": false,
"autoApprove": []
}
}
}Once installed, you can use the MySQL MCP server in your conversations with Claude:
Please list all the tables in my MySQL database.Run this SQL query: SELECT * FROM users LIMIT 5Create a note titled "Meeting Notes" with the content "Discussed project timeline and assigned tasks."For development with auto-rebuild:
npm run watchUse the MCP Inspector to debug the server:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
MIT
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add mysql -- node /path/to/mysql-server/build/index.js{
"mcpServers": {
"mysql": {
"env": {
"MYSQL_HOST": "",
"MYSQL_USER": "",
"MYSQL_DATABASE": "",
"MYSQL_PASSWORD": ""
},
"args": [
"/path/to/mysql-server/build/index.js"
],
"command": "node"
}
}
}code --add-mcp '{"name":"mysql","env":{"MYSQL_HOST":"","MYSQL_USER":"","MYSQL_DATABASE":"","MYSQL_PASSWORD":""},"args":["/path/to/mysql-server/build/index.js"],"command":"node"}'[mcp_servers.mysql]
command = "node"
args = ["/path/to/mysql-server/build/index.js"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/mysql-mcp-server-2 to learn what the "MySQL MCP Server" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
This server runs locally, so we can't read its tool list over the web yet.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/mysql-mcp-server-2)Nothing comparable is listed yet.
No tagged releases on record.
Connect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "mysql-mcp-server-2" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.