MySQL Database
About
Enables direct SQL query execution and database connections to MySQL databases through a simple interface that returns results in JSON format.
Details
- Author
- burakdirin
- Repository
- burakdirin/mysqldb-mcp-server
- GitHub stars
- 2
- Downloads
- 3,403
- License
- MIT License
- Categories
- Database, Other, Productivity, Developer Tools, Design, AI, Search, Frontend, Infrastructure, Security
- Tags
- #integration
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MySQL DatabaseCommand (node, npx, python, etc.)uvArguments-
Argument 1
--directory -
Argument 2
/Users/burakdirin/Projects/mysqldb-mcp-server -
Argument 3
run -
Argument 4
mysqldb-mcp-server
Environment-
MYSQL_HOST
localhost -
MYSQL_USER
root -
MYSQL_DATABASE
[optional] -
MYSQL_PASSWORD
password -
MYSQL_READONLY
true
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
connect_database
Connects to a specific MySQL database. Parameters: database (string) - Name of the database to connect to. Returns a confirmation message when connection is successful.
execute_query
Executes MySQL queries. Parameters: query (string) - SQL query/queries to execute. Returns query results in JSON format. Multiple queries can be sent separated by semicolons.
The server provides two tools:
- connect_database: Connects to a specific MySQL database
- database parameter: Name of the database to connect to (string)
- Returns a confirmation message when connection is successful
- execute_query: Executes MySQL queries
- query parameter: SQL query/queries to execute (string)
- Returns query results in JSON format
- Multiple queries can be sent separated by semicolons
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mysql database": {
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_DATABASE": "[optional]",
"MYSQL_PASSWORD": "password",
"MYSQL_READONLY": "true"
},
"args": [
"--directory",
"/Users/burakdirin/Projects/mysqldb-mcp-server",
"run",
"mysqldb-mcp-server"
],
"command": "uv"
}
}
}
Linux
{
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_DATABASE": "[optional]",
"MYSQL_PASSWORD": "password",
"MYSQL_READONLY": "true"
},
"args": [
"--directory",
"/Users/burakdirin/Projects/mysqldb-mcp-server",
"run",
"mysqldb-mcp-server"
],
"command": "uv"
}
Macos
{
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_DATABASE": "[optional]",
"MYSQL_PASSWORD": "password",
"MYSQL_READONLY": "true"
},
"args": [
"--directory",
"/Users/burakdirin/Projects/mysqldb-mcp-server",
"run",
"mysqldb-mcp-server"
],
"command": "uv"
}
Windows
{
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_DATABASE": "[optional]",
"MYSQL_PASSWORD": "password",
"MYSQL_READONLY": "true"
},
"args": [
"mysqldb-mcp-server"
],
"command": "uvx"
}
-
connect_database: Connects to a specific MySQL database
- databaseparameter: Name of the database to connect to (string)
- Returns a confirmation message when connection is successful
- queryparameter: SQL query/queries to execute (string)
- Returns query results in JSON format
- Multiple queries can be sent separated by semicolons
The server uses the following environment variables:
- MYSQL_HOST: MySQL server address (default: "localhost")
- MYSQL_USER: MySQL username (default: "root")
- MYSQL_PASSWORD: MySQL password (default: "")
- MYSQL_DATABASE: Initial database (optional)
- MYSQL_READONLY: Read-only mode (set to 1/true to enable, default: false)
MacOS:~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows:%APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "mysqldb-mcp-server": { "command": "uv", "args": [ "--directory", "/Users/burakdirin/Projects/mysqldb-mcp-server", "run", "mysqldb-mcp-server" ], "env": { "MYSQL_HOST": "localhost", "MYSQL_USER": "root", "MYSQL_PASSWORD": "password", "MYSQL_DATABASE": "[optional]", "MYSQL_READONLY": "true" } } } }
{ "mcpServers": { "mysqldb-mcp-server": { "command": "uvx", "args": [ "mysqldb-mcp-server" ], "env": { "MYSQL_HOST": "localhost", "MYSQL_USER": "root", "MYSQL_PASSWORD": "password", "MYSQL_DATABASE": "[optional]", "MYSQL_READONLY": "true" } } } }
To install MySQL Database Integration Server for Claude Desktop automatically viaSmithery:
npx -y @smithery/cli install @burakdirin/mysqldb-mcp-server --client claude
To prepare the package for distribution:
This will create source and wheel distributions in thedist/directory.
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:--tokenorUV_PUBLISH_TOKEN
- Or username/password:--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using theMCP Inspector.
You can launch the MCP Inspector vianpmwith this command:
npx @modelcontextprotocol/inspector uv --directory /Users/burakdirin/Projects/mysqldb-mcp-server run mysqldb-mcp-server
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Multi-database agent access (PostgreSQL, SQLite, MySQL, Oracle, SQL Server) with batch queries, pre-configured connections, and SQLGlot-enforced read-only safety
A read-only MCP server for MySQL, enabling LLMs to query live data using the CData JDBC Driver.
Database MCP server for MySQL, MariaDB, PostgreSQL & SQLite
A single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite
A Model Context Protocol (MCP) server that provides multi-database query execution capabilities with support for SQLite, PostgreSQL, and MySQL databases. Includes a built-in Web UI for managing database connections.
Allows Claude AI to interact directly with MySQL databases.
Update various databases (PostgreSQL, MySQL, MongoDB, SQLite) using data from CSV and Excel files.
Enables AI assistants to interact with various databases through JDBC connections.
An MCP server for retrieving data from a MariaDB database.
Access and manage MariaDB or MySQL databases using an MCP server.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





