mysqldb-mcp-server logo

mysqldb-mcp-server

by burakdirin

A MySQL database MCP server project that allows connecting to and querying MySQL databases. It provides tools for connecting to a database and executing SQL queries, returning results in JSON format.

View on GitHub

Last updated: N/A

What is mysqldb-mcp-server?

The mysqldb-mcp-server is a server designed to integrate MySQL databases with other applications using the Model Context Protocol (MCP). It provides tools to connect to MySQL databases and execute queries, making database interaction accessible through a standardized protocol.

How to use mysqldb-mcp-server?

To use the server, first install it using uv pip install mysqldb-mcp-server or pip install mysqldb-mcp-server. Configure the server with environment variables for MySQL connection details (host, user, password, database). Then, use the provided tools (connect_database, execute_query) through the MCP interface to interact with the database. You can install the MySQL Database Integration Server for Claude Desktop automatically via Smithery using the command npx -y @smithery/cli install @burakdirin/mysqldb-mcp-server --client claude

Key features of mysqldb-mcp-server

  • Connects to MySQL databases

  • Executes SQL queries

  • Returns query results in JSON format

  • Supports multiple queries separated by semicolons

  • Configurable via environment variables

  • Supports read-only mode

  • Integration with Claude Desktop via Smithery

Use cases of mysqldb-mcp-server

  • Integrating MySQL databases with AI assistants like Claude

  • Building data-driven applications that require database access

  • Automating database tasks through a standardized interface

  • Querying and retrieving data from MySQL databases programmatically

FAQ from mysqldb-mcp-server

What is the default MySQL host?

The default MySQL host is 'localhost'.

What is the default MySQL user?

The default MySQL user is 'root'.

What is the default MySQL password?

The default MySQL password is an empty string ("").

How do I enable read-only mode?

Set the MYSQL_READONLY environment variable to '1' or 'true'.

How do I execute multiple queries?

Separate the queries with semicolons in the query parameter of the execute_query tool.