Feedback

MySQL Database MCP Server

@burakdirin Claim

Basic information

Runtime
Python
Version
1.0.0
Category
License
MIT
Transports
stdio
Author
burakdirin
Submitted by
Community
Quality
20
Stars
8

About MySQL Database MCP Server

Connect to MySQL databases, execute SQL queries, and get JSON results easily with our simple interface—ideal for MySQL and MySQL Workbench users.

MySQL Database is a MCP server in the Databases category listed in the AddMCP.net directory, published by burakdirin. Supported transport: stdio. Runtime: Python. License: MIT. The repository has 8 GitHub stars. Source code is hosted on github.com. Related topics: community, database-integration, databases, mcp-server, mysqldb.

Setup

{
    "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"
            }
        }
    }
}

MySQL Database MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "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"
            }
        }
    }
}

MySQL Database MCP Server tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MySQL Database?

mysqldb-mcp-server is a Model Context Protocol (MCP) server that provides tools to connect to and query MySQL databases. It is designed for AI assistants, like Claude, that need to interact directly with MySQL databases through natural language or structured commands.

How to use MySQL Database?

Install the package using pip install mysqldb-mcp-server or uv pip install mysqldb-mcp-server. Configure it with environment variables for MySQL connection (host, user, password, optional database, read-only mode). Then add it to your MCP client (e.g., Claude Desktop) by editing the client’s configuration file and specifying the command and environment variables. You can also install it automatically via Smithery.

Key features of MySQL Database

  • Connects to a MySQL database using the connect_database tool.
  • Executes SQL queries with the execute_query tool.
  • Supports multiple semicolon-separated queries in one call.
  • Offers an optional read-only mode to prevent data modification.
  • Configurable via environment variables for host, user, and password.

Use cases of MySQL Database

  • Let an AI assistant query a MySQL database to answer user questions.
  • Execute administrative SQL statements (e.g., SELECT, INSERT) from a chat interface.
  • Interact with a development or testing database in read-only mode to avoid accidental writes.

Frequently asked questions

1 What environment variables are required?

MYSQL_HOST (default “localhost”), MYSQL_USER (default “root”), and MYSQL_PASSWORD (default empty). MYSQL_DATABASE is optional, and MYSQL_READONLY disables write queries when set to “1” or “true”.

2 What tools does mysqldb-mcp-server provide?

It provides two tools: connect_database (takes a database string) and execute_query (takes a query string). Both return results in JSON format.

3 How do I install mysqldb-mcp-server?

You can install it via pip (pip install mysqldb-mcp-server) or uv (uv pip install mysqldb-mcp-server). For use with Claude Desktop, add a configuration entry pointing to the installed package via uvx.

4 Can I execute multiple queries in one call?

Yes. The execute_query tool accepts multiple SQL statements separated by semicolons and returns results for all queries.

5 How do I enable read-only mode?

Set the environment variable MYSQL_READONLY to “1” or “true”. When enabled, the server will refuse any queries that attempt to modify data.

Videos

Tutorials, guides, and showcases related to MySQL Database MCP Server. The player loads when you press play.

Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬