MySQL MCP Server
This project implements an MCP (Model Context Protocol) server for working with MySQL database.
Repository
This project is available on GitHub: https://github.com/vitalyDV/mysql-mcp
Clone the repository
git clone https://github.com/vitalyDV/mysql-mcp.git
cd mysql-mcp
npm install
add config to mcp.json
{
"mcpServers": {
"mysql_mcp_readonly": {
"command": "node",
"args": [
"./mysql-mcp/index.js"
],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASS": "",
"MYSQL_DB": "db",
}
}
}
}
Environment Variables
MYSQL_HOST
- MySQL server hostMYSQL_PORT
- MySQL server portMYSQL_USER
- MySQL usernameMYSQL_PASS
- MySQL passwordMYSQL_DB
- MySQL database name
Available MCP tools
query
- execute SQL queries (only SELECT, SHOW, EXPLAIN, DESCRIBE)table-schema
- get table structurelist-tables
- get list of all tables in the database
Available MCP resources
table://{name}
- get data from the specified table (up to 100 rows)
MySQL Database Server
Project Details
- vitalyDV/mysql-mcp
- Last Updated: 4/16/2025
Recomended MCP Servers
All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows
Giving Claude ability to run code with E2B via MCP (Model Context Protocol)
A Model Context Protocol (MCP) server for providing code context from git repositories
A lightweight mcp server that tells you exactly what time is it based on your IP.
Google Sheets MCP Server
A Model Context Protocol (MCP) server for academic tools, integrating with Canvas and Gradescope platforms.
Anki MCP Server to allow LLMs to create and manage Anki decks via Anki Connect
query table from some websites, support MCP
A Kubernetes MCP (Model Control Protocol) server that enables interaction with Kubernetes clusters through MCP tools.