# MySQL Database Server

Enable AI models to interact with MySQL databases through a standardized interface. Perform database operations such as querying, executing statements, listing tables, and describing table structures…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add huangfeng19820712/mcp-mysql-server

# Browse available tools
npx -y @smithery/cli@latest tool list huangfeng19820712/mcp-mysql-server

# Get full schema for a tool
npx -y @smithery/cli@latest tool get huangfeng19820712/mcp-mysql-server connect_db

# Call a tool
npx -y @smithery/cli@latest tool call huangfeng19820712/mcp-mysql-server connect_db '{}'
```

## Tools (7)

- `connect_db` — Connect to MySQL database
- `query` — Execute a SELECT query,can not get table structure,use describe_table tool to get table structure
- `execute` — Execute an INSERT, UPDATE, or DELETE query
- `list_tables` — List all tables in the database
- `describe_table` — Get table structure
- `show_statement` — Execute a SHOW statement (e.g., SHOW STATUS, SHOW VARIABLES)
- `explain` — Analyze SQL query performance using EXPLAIN

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get huangfeng19820712/mcp-mysql-server <tool-name>
```

---

Source: https://github.com/huangfeng19820712/mcp-mysql-server | License: MIT
