MySQL MCP Server
Enables secure access to MySQL databases with capabilities for reading data (SELECT queries, listing tables, viewing schemas), writing data (INSERT/UPDATE/DELETE with transaction support), and security features like read-only transaction modes and parameterized queries.
Requires Node.js 18+ as a runtime environment for the server to operate.
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 Servershow me 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
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
Related MCP server: DatabaseMCP
Installation
npm install -g @kevinwatt/mysql-mcpUsage 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-mcpRequirements
Node.js 18+
MySQL Server
MCP-compatible LLM service
License
MIT
Author
Dewei Yen
Keywords
mcp
mysql
database
dive
llm
ai
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.
Related MCP Servers
- Flicense-qualityDmaintenanceA high-performance MCP server that enables AI assistants to safely interact with MySQL databases through secure CRUD operations, schema inspection, and parameterized queries with built-in SQL injection prevention.Last updated1
- Flicense-qualityBmaintenanceAn MCP server that enables AI agents to safely explore and interact with MySQL databases through dynamic tool generation from stored procedures. It provides database discovery capabilities and intelligent procedure categorization while enforcing security restrictions to prevent data modification.Last updated
- Alicense-qualityDmaintenanceA MySQL MCP server for secure database interaction, enabling schema inspection, query execution, and RBAC via AI coding assistants.Last updated4485MIT
- Alicense-qualityDmaintenanceA secure and efficient MCP server for MySQL database operations, enabling LLMs to execute SQL queries with read-only access by default and optional write permissions.Last updated3MIT
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
MCP server for AI dialogue using various LLM models via AceDataCloud
Cloud-hosted MCP server for durable AI memory
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/kevinwatt/mysql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server