mysql
Provides tools for querying, inspecting, and modifying MySQL databases, including listing databases, tables, describing table structure, executing read-only queries, write operations, and table statistics.
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., "@mysqlList all tables in my database"
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.
@longlonga/mysql
A Model Context Protocol (MCP) server for interacting with MySQL databases. Provides tools for querying, inspecting, and modifying MySQL databases directly from Claude.
Installation
Via Claude Code (recommended)
claude mcp add --scope user mysql \
-e MYSQL_HOST=your-host \
-e MYSQL_PORT=3306 \
-e MYSQL_USER=your-user \
-e MYSQL_PASSWORD=your-password \
-e MYSQL_DATABASE=your-database \
-- npx -y @longlonga/mysqlVia claude_desktop_config.json
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": ["-y", "@longlonga/mysql"],
"env": {
"MYSQL_HOST": "your-host",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your-user",
"MYSQL_PASSWORD": "your-password",
"MYSQL_DATABASE": "your-database"
}
}
}
}Related MCP server: MCP MySQL App
Configuration
Environment Variable | Required | Default | Description |
| Yes | — | MySQL server hostname or IP |
| No |
| MySQL server port |
| Yes | — | MySQL username |
| Yes | — | MySQL password |
| No | — | Default database (can be overridden per tool call) |
Tools
Tool | Description |
| List all databases the user has access to |
| List all tables in a database |
| Get column definitions for a table |
| Get the full CREATE TABLE DDL statement |
| Execute a read-only SELECT/SHOW/EXPLAIN query |
| Execute a write SQL statement (INSERT/UPDATE/DELETE/DDL) |
| Get row count and size statistics for tables |
Usage Examples
Once connected, you can ask Claude things like:
"List all tables in my database"
"Describe the structure of the users table"
"Query the last 10 orders"
"How many rows are in each table?"
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/donald-ada/mysql'
If you have feedback or need assistance with the MCP directory API, please join our Discord server