MySQL MCP Server
MySQL MCP Server is an MCP server that enables secure interaction with MySQL databases. It has 1,398 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)
- Needs API key
- Databases
- MIT
- Actively maintained
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
Dbx
t8y2/dbx
Query databases from AI agents using connections configured in DBX.
DatabasesRustButterbase AI MCP Server
butterbase-ai/butterbase
Butterbase MCP server — manage your backend: schemas, auth, functions, storage, RAG, deploys.
DatabasesTypeScriptDBHub
bytebase/dbhub
Token-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite.
DatabasesTypeScriptLINQ to DB
linq2db/linq2db
Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB.
DatabasesC#Mindwtr
dongdongbh/Mindwtr
Task automation via SQLite, desktop Local API, or Mindwtr Cloud; read-only by default.
DatabasesTypeScriptMCP Memory Service
doobidoo/mcp-memory-service
Open-source persistent memory for AI agent pipelines (LangGraph, CrewAI, AutoGen) and Claude.
DatabasesPython
What is MySQL MCP Server?
MySQL MCP Server is an MCP server that enables secure interaction with MySQL databases. It has 1,398 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. The source code is at github.com/designcomputer/mysql_mcp_server.
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 and re-checks every server daily.