Mysql MCP Server
MCP server by hechtcarmel Verified · npm:@hechtcarmel
MySQL MCP Server gives MCP clients access to MySQL queries and schema metadata, read-only by default. It is for developers who want AI assistants to query MySQL or MariaDB databases with controlled access.
Install Mysql MCP Server
Built from the published package, never by AI.
claude mcp add mysql-mcp-server -- npx -y @hechtcarmel/mysql-mcp-serverRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"mysql-mcp-server": {
"args": [
"-y",
"@hechtcarmel/mysql-mcp-server"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"mysql-mcp-server": {
"args": [
"-y",
"@hechtcarmel/mysql-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"mysql-mcp-server": {
"args": [
"-y",
"@hechtcarmel/mysql-mcp-server"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add mysql-mcp-server -- npx -y @hechtcarmel/mysql-mcp-server{
"mcpServers": {
"mysql-mcp-server": {
"args": [
"-y",
"@hechtcarmel/mysql-mcp-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 @hechtcarmel/mysql-mcp-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
MySQL MCP Server is a Model Context Protocol server that gives MCP clients access to MySQL queries and schema metadata. It provides one mysql_query tool that returns Markdown, JSON text, or structured results. It also exposes schema resources for databases, tables, columns, indexes, and foreign keys.
Queries are read-only by default, and writes are enabled only when MYSQL_ALLOW_WRITE=true is set. Read-only queries run inside a MySQL READ ONLY transaction, and results are bounded by row and character limits. The server uses stdio and does not open an HTTP port. It is aimed at people who want an AI assistant to query MySQL or MariaDB databases with controlled access.
Written from the project's README and checked against it.
Tools it gives your assistant
mysql_queryRuns a SQL query and returns results as Markdown, JSON text, or structured results.Schema resourcesExposes databases, tables, columns, indexes, and foreign keys as resources.Read-only modeBlocks writes by default and runs read-only queries in a READ ONLY transaction.Write modeAllows INSERT, UPDATE, DELETE, and REPLACE when MYSQL_ALLOW_WRITE=true is set.Bounded resultsLimits retained rows per call with MYSQL_MAX_ROWS and truncates long text output.Request cancellationSupports cancelling requests, with a per-call deadline set by MYSQL_QUERY_TIMEOUT.
What you need
- Node.js 20.19 or later, with Node.js 24 LTS recommended
- Access to a MySQL-compatible server
- MySQL account credentials for MYSQL_USER and MYSQL_PASSWORD
Try asking
- List the tables in the shop database and their columns.
- Run a SELECT on shop.products and return the results as JSON.
- Show the foreign keys defined on the orders table.
Good to know
- Read-only by default. Writes require MYSQL_ALLOW_WRITE=true.
- mysql_clear_password is accepted by default, so passwords are sent unencrypted if TLS is off.
- Not a sandbox for arbitrary stored functions or UDFs. Least-privilege grants are recommended.
- Uses stdio only and does not open an HTTP port.
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
Can the assistant change data with this server?
Not by default. Writes such as INSERT, UPDATE, DELETE, and REPLACE are blocked unless MYSQL_ALLOW_WRITE=true is set. DDL remains blocked in both modes.
Is the database password sent securely?
Not necessarily. The source says mysql_clear_password is accepted by default, even without TLS, which sends the password unencrypted. It recommends verified TLS for remote connections or setting MYSQL_ENABLE_CLEARTEXT_PLUGIN=false.
Does the server limit how much data it returns?
Yes. Results keep at most 1,000 rows per call by default, which can be changed with MYSQL_MAX_ROWS. Text and structured results also have a 25,000-character budget.
How do I install Mysql MCP Server?
In Claude Code run claude mcp add mysql-mcp-server -- npx -y @hechtcarmel/mysql-mcp-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 npm:@hechtcarmel 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.
