MCP Mysql Server
MCP server by berthojoris Verified · npm:@berthojoris
Lets AI agents work with MySQL databases through the Model Context Protocol, with permission levels set per project. It is for developers who connect tools such as Cursor, Claude Code and Codex to a MySQL database.
Install MCP Mysql Server
Built from the published package, never by AI.
claude mcp add mcp-mysql-server -- npx -y @berthojoris/mcp-mysql-serverRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"mcp-mysql-server": {
"args": [
"-y",
"@berthojoris/mcp-mysql-server"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"mcp-mysql-server": {
"args": [
"-y",
"@berthojoris/mcp-mysql-server"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"mcp-mysql-server": {
"args": [
"-y",
"@berthojoris/mcp-mysql-server"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add mcp-mysql-server -- npx -y @berthojoris/mcp-mysql-server{
"mcpServers": {
"mcp-mysql-server": {
"args": [
"-y",
"@berthojoris/mcp-mysql-server"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add mcp-mysql-server npx -y @berthojoris/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 mcp-mysql-server block.
About
MySQL MCP Server is a Model Context Protocol server that connects AI agents to MySQL databases. It runs over stdio by default and can also run as a Streamable HTTP service for remote clients such as ChatGPT. Access is controlled by permissions such as list, read, utility, create, update and ddl, and by optional tool categories.
The server is started with npx, using a connection string or DB_* environment variables. In HTTP mode it can enforce query timeouts, rate limits and result size limits, write audit logs, and check that the MySQL user is read-only. It suits teams that want an AI assistant to explore schemas, run queries, export CSV files and change data within defined limits.
Written from the project's README and checked against it.
Tools it gives your assistant
list_all_toolsReturns the live tool catalog, enabled or disabled status, and recommended workflows.export_table_to_csvExports a table to a CSV file.export_query_to_csvExports the results of a SELECT query to a CSV file.execute_ddlRuns DDL statements such as DROP TABLE.cursor_execute_requestNo-argument bridge that reads a request file and runs the requested SQL tool.
What you need
- A MySQL database and its connection details
- npm, for the npx command and build steps
- Bearer tokens or OAuth settings, only for remote HTTP mode
Try asking
- What's the structure of the users table?
- Show me the first 5 records from users
- Export the orders table to CSV
Good to know
- Query timeouts, rate limits and audit logging are off by default over stdio.
- The cursor_execute_request bridge is for Cursor wrappers that cannot send arguments.
- MCP_HTTP_AUTH=none only works on loopback addresses.
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 MCP Mysql 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
MCP Mysql Server: common questions
Does it work with remote clients like ChatGPT?
Yes. It can run with the Streamable HTTP transport, using bearer token or OAuth authentication. Stdio stays the default.
How are permissions set?
Permissions are set with the 4th argument or the MCP_PERMISSIONS variable, using levels such as list, read, utility, create and ddl. Categories can narrow the available tools further.
What if my database password has special characters?
URL-encode them in the connection string. For example, the password p@ss:w0rd becomes p%40ss%3Aw0rd.
How do I install MCP Mysql Server?
In Claude Code run claude mcp add mcp-mysql-server -- npx -y @berthojoris/mcp-mysql-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is MCP Mysql Server the official server?
MCP Mysql Server is published by npm:@berthojoris from its verified domain in the official MCP Registry.
Is MCP Mysql Server free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is MCP Mysql Server safe to use?
It scores 78 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 MCP Mysql Server?
Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.
Does MCP Mysql 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.
