MySQL MCP Server
An MCP server that integrates with MySQL databases, enabling secure read and write operations through LLM-driven interfaces with support for transaction handling and performance monitoring.
kevinwatt
README
MySQL MCP Server
An MCP server implementation that integrates with MySQL databases, providing secure database access capabilities for LLMs.
Features
- Read Operations
- Execute read-only SELECT queries
- List all database tables
- Show table structures
- View schema information
- Write Operations
- Execute INSERT/UPDATE/DELETE with transaction support
- Parameterized queries for data safety
- Returns affected rows and insert IDs
- Security
- Read-only transaction mode for SELECT queries
- Query length and result size limits
- Performance monitoring and logging
- Automatic transaction handling
Installation
npm install -g @kevinwatt/mysql-mcp
Usage with Dive Desktop
- Click "+ Add MCP Server" in Dive Desktop
- Copy and paste this configuration:
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"-y",
"@kevinwatt/mysql-mcp"
],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASS": "",
"MYSQL_DB": "your_database"
}
}
}
}
- Click "Save" to install the MCP server
Tool Documentation
-
mysql_query
- Execute read-only SELECT queries
- Inputs:
sql
(string): SQL SELECT query to execute
- Limits:
- Maximum query length: 4096 characters
- Maximum result rows: 1000
- Query timeout: 30 seconds
-
mysql_execute
- Execute data modification operations
- Inputs:
sql
(string): SQL statement (INSERT/UPDATE/DELETE)params
(array, optional): Parameters for the SQL statement
- Features:
- Returns affected rows count
- Returns last insert ID
- Automatic transaction handling
-
list_tables
- List all tables in current database
- No inputs required
-
describe_table
- Show table structure
- Inputs:
table
(string): Table name to describe
Usage Examples
Ask your LLM to:
"Show me all tables in the database"
"Describe the structure of users table"
"Select all active users from the database"
"Insert a new record into orders table"
Manual Start
If needed, start the server manually:
npx @kevinwatt/mysql-mcp
Requirements
- Node.js 18+
- MySQL Server
- MCP-compatible LLM service
License
MIT
Author
Dewei Yen
Keywords
- mcp
- mysql
- database
- dive
- llm
- ai
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
AIO-MCP Server
🚀 All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from
Persistent Knowledge Graph
An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.
Hyperbrowser MCP Server
Welcome to Hyperbrowser, the Internet for AI. Hyperbrowser is the next-generation platform empowering AI agents and enabling effortless, scalable browser automation. Built specifically for AI developers, it eliminates the headaches of local infrastructure and performance bottlenecks, allowing you to
React MCP
react-mcp integrates with Claude Desktop, enabling the creation and modification of React apps based on user prompts
Atlassian Integration
Model Context Protocol (MCP) server for Atlassian Cloud products (Confluence and Jira). This integration is designed specifically for Atlassian Cloud instances and does not support Atlassian Server or Data Center deployments.

Any OpenAI Compatible API Integrations
Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.