MySQL MCP Server
MySQL MCP Server is an MCP server that enables secure interaction with MySQL databases. It has 1,403 GitHub stars, is released under the MIT license and runs locally with uvx mysql_mcp_server. It works with Claude Desktop, Claude Code, Cursor and VS Code and needs an API key.
github.com/designcomputer/mysql_mcp_server (opens in a new tab)
Data as of from the GitHub API; description from the project's repository. Report an error
Install MySQL MCP Server
Generated from the server's published package. Replace your-value with your own values.
Claude Desktop
{
"mcpServers": {
"mysql-mcp-server": {
"command": "uvx",
"args": [
"mysql_mcp_server"
],
"env": {
"MYSQL_PASSWORD": "your-value"
}
}
}
}Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.
Claude Code
claude mcp add --env MYSQL_PASSWORD=your-value --transport stdio mysql-mcp-server -- uvx mysql_mcp_serverCursor
{
"mcpServers": {
"mysql-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"mysql_mcp_server"
],
"env": {
"MYSQL_PASSWORD": "your-value"
}
}
}
}Project file; use ~/.cursor/mcp.json to enable it in every project.
VS Code
{
"inputs": [
{
"type": "promptString",
"id": "mysql_password",
"description": "MYSQL_PASSWORD",
"password": true
}
],
"servers": {
"mysql-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"mysql_mcp_server"
],
"env": {
"MYSQL_PASSWORD": "${input:mysql_password}"
}
}
}
}Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).
Environment variables
Variables the server reads at startup.
| Name | Required | Description |
|---|---|---|
MYSQL_HOST | No | Shown in the README's example configuration. |
MYSQL_PORT | No | Shown in the README's example configuration. |
MYSQL_USER | No | Shown in the README's example configuration. |
MYSQL_PASSWORDsecret | No | Shown in the README's example configuration. |
MYSQL_DATABASE | No | Shown in the README's example configuration. |
Tools (3)
Parsed from the Tools section of the README; check the repository for the current list.
execute_sqlExecutes any standard SQL query.
get_schema_infoProvides detailed metadata about database structures.
get_table_sampleFetches a representative sample of data.
About MySQL MCP Server
# MySQL MCP Server A Model Context Protocol (MCP) implementation that enables secure interaction with MySQL databases. This server component facilitates communication between AI applications (hosts/clients) and MySQL databases, making database exploration and analysis safer and more structured through a controlled interface.
- ai
- mcp
- model-context-protocol
- mysql
- claude
- claude-code
- database
- llm
- mcp-server
Similar MCP servers
More databases MCP servers
Erd Editor
dineug/erd-editor
Design database schemas as ERDs in your browser, VS Code, JetBrains IDEs or Obsidian.
Active · last commit Oct 25, 2026
DatabasesTypeScriptMongoDB MCP Server
mongodb-js/mongodb-mcp-server
MongoDB Model Context Protocol Server.
Active · last commit Oct 23, 2026
DatabasesTypeScriptPg Aiguide
timescale/pg-aiguide
Comprehensive PostgreSQL documentation and best practices, including ecosystem tools.
Active · last commit Oct 22, 2026
DatabasesPythonCloudBase
TencentCloudBase/CloudBase-AI-Toolkit
CloudBase MCP: DB, functions, storage, hosting via @cloudbase/cloudbase-mcp.
Active · last commit Oct 25, 2026
DatabasesTypeScriptMCP Memory Service
doobidoo/mcp-memory-service
Open-source persistent memory for AI agent pipelines (LangGraph, CrewAI, AutoGen) and Claude.
Active · last commit Oct 26, 2026
DatabasesPythonMCP Neo4j Cloud Aura API
neo4j-contrib/mcp-neo4j
MCP server for Neo4j Aura Database Instance Manager.
Maintained · last commit Sep 9, 2026
OfficialDatabasesPython
How do I install the MySQL MCP Server MCP server?
Add the command uvx mysql_mcp_server to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.
Is MySQL MCP Server free?
The server is open source under the MIT license, so running it is free. It needs credentials (MYSQL_PASSWORD) for the service it connects to, which may require a paid account.
Is MySQL MCP Server actively maintained?
The most recent commit was on Aug 2, 2026. The latest release is v0.4.4, published Jul 30, 2026. appsgit only lists MCP servers with a commit in the last six months.