MySQL Database Access is an MCP server that provides read-only integration between Model Context Protocol clients and MySQL databases. Designed for developers, data analysts, and database administrators, this server allows AI assistants to explore schemas and run data retrieval queries securely. It connects to any standard MySQL instance using environment variables for host, port, credentials, and default database targets. The server enforces security policies by restricting queries to SELECT, SHOW, DESCRIBE, and EXPLAIN statements, actively preventing data modification and SQL injection attempts. It also features query timeouts, connection pooling options, and row limits to protect database performance during large retrieval operations. Through dedicated tools, users can list all available databases on the host, inspect specific tables, view detailed column schemas, and execute arbitrary read-only SQL queries to extract data context directly into conversations with AI assistants.
Category: Databases & Data Stores
Tags: database, mysql, relational, SQL
npx -y @smithery/cli install @dpflucas/mysql-mcp-server --client claude. 2. To install manually, run npm install -g mysql-mcp-server or clone the repository and run npm run build. 3. Add the server to your MCP client configuration file (such as Claude Desktop) under mcpServers: json { "mcpServers": { "mysql": { "command": "npx", "args": ["mysql-mcp-server"], "env": { "MYSQL_HOST": "your-mysql-host", "MYSQL_PORT": "3306", "MYSQL_USER": "your-mysql-user", "MYSQL_PASSWORD": "your-mysql-password", "MYSQL_DATABASE": "your-default-database" } } } } 4. Restart your MCP client to load the connection.Part of MCP Servers
MySQL Database Access connects AI clients to MySQL instances. It provides tools to list accessible databases, list tables within a database, view table schemas, and execute read-only SQL queries using SELECT, SHOW, DESCRIBE, and EXPLAIN statements.
You can install it globally via npm using npm install -g mysql-mcp-server, install it automatically via Smithery with the command npx -y @smithery/cli install @dpflucas/mysql-mcp-server --client claude, or clone the repository and build from source.
No. The server strictly enforces read-only access. It validates all incoming queries and only permits SELECT, SHOW, DESCRIBE, and EXPLAIN statements, blocking any INSERT, UPDATE, DELETE, or other data modification attempts.
Yes, MySQL Database Access is open source software published under the MIT License on GitHub.
It works with any Model Context Protocol compliant client that supports stdio process execution, including Claude Desktop, Claude AI via Smithery, Cursor, and custom MCP client implementations.