Mysql MCP server
MCP server by mukul975 Verified · gh:mukul975
MCP MySQL Server is a Model Context Protocol server for MySQL databases. It offers tools for running queries, checking server status, and diagnosing performance, deadlocks, replication lag and user privileges.
Install Mysql MCP server
Built from the published package, never by AI.
claude mcp add mysql-mcp-server -- npx -y mcp-mysql-serverRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"mysql-mcp-server": {
"args": [
"-y",
"mcp-mysql-server"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"mysql-mcp-server": {
"args": [
"-y",
"mcp-mysql-server"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"mysql-mcp-server": {
"args": [
"-y",
"mcp-mysql-server"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add mysql-mcp-server -- npx -y mcp-mysql-server{
"mcpServers": {
"mysql-mcp-server": {
"args": [
"-y",
"mcp-mysql-server"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add mysql-mcp-server npx -y mcp-mysql-serverGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mysql-mcp-server block.
About
MCP MySQL Server is a Model Context Protocol server for MySQL databases. Its README describes HTTP endpoints for executing read-only queries, analyzing database performance, and monitoring MySQL server status. It also lists diagnostic, operational and security tools, such as slow query analysis, deadlock detection, privilege auditing and replication lag monitoring.
The server runs over stdio by default and can use SSE for web clients. It reads MySQL connection settings from environment variables. The source describes Docker and local installation, and optional bearer token or API key authentication with rate limiting for the HTTP server. It suits people who want an AI assistant to inspect and diagnose MySQL databases.
Written from the project's README and checked against it.
Tools it gives your assistant
mysql_queryExecutes read-only SQL queries and returns columns, rows and row count.mysql_statusGets MySQL server status variables.mysql_innodb_metricsAnalyzes InnoDB performance metrics.pingHealth check utility that returns an echo and timestamp.list_mysql_tablesLists tables in the MySQL database.mysql_slow_query_analysisAnalyzes slow queries.mysql_deadlock_detectionDetects deadlocks.mysql_user_privilegesAudits user privileges.mysql_replication_lag_monitoringMonitors replication lag.mysql_ssl_tls_configuration_auditAudits SSL/TLS configuration.
What you need
- Python
- A reachable MySQL server
- Docker or Docker Compose (optional)
Try asking
- Run a read-only query to count the rows in my users table.
- Analyze slow queries on my MySQL server and suggest fixes.
- Check user privileges and SSL/TLS configuration for my MySQL server.
Good to know
- The README describes the core query tool as read-only.
- The README also lists execute_sql and user management tools, which can modify data.
- The README says to use the server only in trusted environments or behind network security.
- The README does not give a total tool count.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Mysql MCP server
All alternatives →Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.
ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.
Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.
MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.
Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.
MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.
Compare with Supabase, ArcadeDB MCP Server or DBHub
Mysql MCP server: common questions
Is MCP MySQL Server read-only?
The README says the HTTP query endpoint executes read-only queries and prevents data modification. It also lists execute_sql and user management tools, which can change data.
How does it connect to MySQL?
It reads MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE from environment variables.
What transports does it support?
The README says it uses stdio by default and SSE for web clients when started with the transport flag.
How do I install Mysql MCP server?
In Claude Code run claude mcp add mysql-mcp-server -- npx -y mcp-mysql-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Mysql MCP server the official server?
Mysql MCP server is published by gh:mukul975 from its verified domain in the official MCP Registry.
Is Mysql MCP server free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Mysql MCP server safe to use?
It scores 70 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Mysql MCP server?
Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.
Does Mysql MCP server work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
