mcp -mysql
MCP Server for MySQL databases
claude mcp add --transport stdio yuru-sha-mcp-server-mysql docker run -i --rm mcp/mysql mysql://host:port/dbname
How to use
This MCP server provides read-only access to a MySQL database, exposing schema inspection capabilities and the ability to execute read-only queries within safe transactions. It is designed to be used by LLMs and client applications to understand database structures and to fetch data without risking data modification. The server is typically run via Docker or integrated into an orchestration workflow, and it can be configured under a named server like 'mysql' for easy reference in client configurations. Tools offered include database schema discovery (tables, columns, keys) and executing select queries against the target MySQL instance with read-only enforcement.
How to install
Prerequisites:
- Docker installed and running
- Optional: Node.js and npm if you plan to install via Smithery or npm package
Installation methods:
-
Docker (recommended):
-
Build/run using Docker as shown in the repository examples:
docker run -i --rm mcp/mysql mysql://host:port/dbname
-
Replace mysql://host:port/dbname with your actual connection URL.
-
-
Smithery (Node ecosystem):
-
Install via Smithery to integrate with Claude Desktop or other clients:
npx -y @smithery/cli install @yuru-sha/mcp-server-mysql --client claude
-
This will provision the server through Smithery for Claude Desktop usage.
-
-
Direct npm package (if you prefer programmatic usage):
-
Install the npm package (example name used in this project):
npm install @yuru-sha/mcp-server-mysql
-
Run according to your environment setup (node-based usage not shown here; see package docs).
-
Additional notes
Notes:
- This server enforces read-only access; all queries are executed within READ ONLY transactions to protect the underlying database.
- When using Docker on macOS, connect to the host environment via host.docker.internal if the MySQL server runs on the host network.
- The provided connection URL should be in the form: mysql://[user][:password]@host[:port]/database, with /database replaced by the intended database name.
- If you create a dedicated read-only user for production, configure authentication in the connection URL accordingly.
- The npm package name for this server is @yuru-sha/mcp-server-mysql (if you use Node/npm workflows).
- For Claude Desktop, add a mcpServers entry with the appropriate command and args to integrate with the UI.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.