mysqldb-mcp-server MCP server
@burakdirin
mysqldb-mcp-server MCP server について
An MCP server implementation that enables Claude AI to interact with MySQL databases.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"mysqldb-mcp-server": {
"command": "uv",
"args": [
"pip",
"install",
"mysqldb-mcp-server"
]
}
}
}ツール
2Connects to a specific MySQL database
Executes MySQL queries
概要
What is mysqldb-mcp-server?
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 mysqldb-mcp-server?
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 mysqldb-mcp-server
- Connects to a MySQL database using the
connect_databasetool. - Executes SQL queries with the
execute_querytool. - 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 mysqldb-mcp-server
- 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.
FAQ from mysqldb-mcp-server
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”.
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.
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.
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.
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.
「その他」の他のコンテンツ
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
Nginx UI
0xJackyYet another WebUI for Nginx
🪟 Windows-MCP
CursorTouchMCP Server for Computer Use in Windows
Servers
modelcontextprotocolModel Context Protocol Servers
コメント