MCP MySQL Server
Allows Language Learning Models (LLMs) to inspect database schemas and execute read-only queries on MySQL databases
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP MySQL Servershow me the schema for the orders table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-mysql
Model Context Protocol Server for MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Features
Read-only access to MySQL databases
Schema inspection capabilities
Safe query execution within READ ONLY transactions
Docker support
NPM package available
Related MCP server: MySQL MCP Server
Installation
Using Docker
# Build the Docker image
make docker
# Run with Docker
docker run -i --rm mcp/mysql mysql://host:port/dbnameInstalling via Smithery
To install MySQL Database Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @yuru-sha/mcp-server-mysql --client claudeUsage
With Claude Desktop
Add the following configuration to your claude_desktop_config.json:
{
"mcpServers": {
"mysql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/mysql",
"mysql://host:port/dbname"
]
}
}
}Note: When using Docker on macOS, use host.docker.internal if the MySQL server is running on the host network.
Connection URL Format
mysql://[user][:password]@host[:port]/databaseReplace /database with your database name.
Development
# Initial setup
make setup
# Build the project
make build
# Format code
make format
# Run linter
make lintLicense
This project is released under the MIT License.
Security
This server enforces read-only access to protect your database. All queries are executed within READ ONLY transactions.
For enhanced security, we recommend creating a read-only user.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables read-only access to MySQL databases through natural language queries. Provides automatic table schema discovery and executes SELECT, SHOW, DESCRIBE, and EXPLAIN statements within secure read-only transactions.Last updatedMIT
- Alicense-qualityDmaintenanceProvides read-only access to MySQL databases with automatic schema discovery and secure query execution. Enables users to explore database structure and execute SELECT queries through natural language interactions.Last updatedMIT
- Flicense-qualityDmaintenanceEnables safe interaction with MySQL databases through SELECT queries, table structure inspection, and database schema exploration. Provides read-only access to query data and examine database metadata.Last updated1
- AlicenseAqualityBmaintenanceEnables AI assistants to inspect and query a MySQL database through safe, structured tools, including schema discovery and read-only queries.Last updated9183MIT
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Read-only bank access for your AI agent. Connects Claude, ChatGPT, Cursor, Gemini, Codex.
Connect to PlanetScale databases, branches, schema, query insights, and execute SQL
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuru-sha/mcp-server-mysql'
If you have feedback or need assistance with the MCP directory API, please join our Discord server