Mysql MCP server
MCP server by designcomputer Verified · gh:designcomputer
Gives AI assistants controlled access to MySQL databases through the Model Context Protocol. It is for developers who want to explore and query MySQL data from tools like Claude Desktop or VS Code.
Install Mysql MCP server
Built from the published package, never by AI.
claude mcp add mysql-mcp-server -- uvx mysql_mcp_serverRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"mysql-mcp-server": {
"args": [
"mysql_mcp_server"
],
"command": "uvx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"mysql-mcp-server": {
"args": [
"mysql_mcp_server"
],
"command": "uvx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"mysql-mcp-server": {
"args": [
"mysql_mcp_server"
],
"command": "uvx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add mysql-mcp-server -- uvx mysql_mcp_server{
"mcpServers": {
"mysql-mcp-server": {
"args": [
"mysql_mcp_server"
],
"command": "uvx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add mysql-mcp-server uvx 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 implementation that connects AI applications to MySQL databases. It lists tables as resources, reads table contents, and runs SQL queries through a controlled interface. It also provides schema details and small data samples so an assistant can understand a table before querying it.
The server runs over standard input/output (STDIO) by default, and it also supports Streamable HTTP (SSE) transport. It is configured through environment variables for host, port, user, password and database, with optional SSL and SSH tunneling settings. It can run in single-database mode or in multi-database mode, where names like mydb.mytable are used. The project is aimed at developers and analysts who want an AI assistant to explore MySQL data with a dedicated, least-privilege database user.
Written from the project's README and checked against it.
Tools it gives your assistant
execute_sqlRuns standard SQL queries, including SELECT, SHOW, DESCRIBE, INSERT, UPDATE and DELETE.get_schema_infoReturns column names, types, nullability, default values and comments for a table.get_table_sampleFetches a sample of table rows, with a limit of up to 20 rows.
What you need
- Python, installed with pip or run through uvx
- A MySQL database and connection credentials
- uv, for the VS Code configuration
- MIT licensed project, no paid plan stated
Try asking
- Explore my MySQL database and summarize the tables you find
- Show the schema of the customers table and sample a few rows
- Run a SELECT query on the orders table for last month's totals
Good to know
- Only single SQL statements are supported, not multi-statement queries.
- The SSE transport has no built-in authentication and should sit behind a reverse proxy if exposed.
- In Claude Code and Claude Desktop, a project .env file is not found, so settings must go in the MCP config.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. 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
Does the MySQL MCP server support multiple databases?
Yes. When MYSQL_DATABASE is not set, the server runs in multi-database mode and tools accept names like database.table. Only single SQL statements are supported in this mode.
Is the SSE transport secured?
The source says the SSE transport has no built-in authentication and accepts connections without credentials. The README advises placing it behind a reverse proxy that enforces authentication if it is exposed beyond localhost.
Can it connect to a MySQL server through SSH?
Yes. The server lists SSH tunneling support with settings for an SSH jump host, user, key path and ports. It also supports SSL modes such as REQUIRED and VERIFY_CA.
How do I install Mysql MCP server?
In Claude Code run claude mcp add mysql-mcp-server -- uvx 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 gh:designcomputer 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 84 of 100. Grades: maintenance B, licence A, quality A. 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.
