# designcomputer/mysql_mcp_server [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/designcomputer/mysql_mcp_server  
**GitHub Stars:** 1384  
**npm Downloads (last month):** 1797  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 1  
**Directory Page:** https://allmcps.com/mcp/designcomputer-mysql-mcp-server

## Description
MySQL database integration with configurable access controls, schema inspection, and comprehensive security guidelines

## Tools
Capabilities this server exposes over MCP:

- **execute_sql** — Executes any standard SQL query.
- **get_schema_info** — Provides detailed metadata about database structures.
- **get_table_sample** — Fetches a representative sample of data.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mysql-mcp-server": {
    "command": "npx",
    "args": ["-y","@smithery/cli"],
    "env": {
      "MYSQL_HOST": "",
      "MYSQL_USER": "",
      "MYSQL_PASSWORD": ""
    }
  }
}
```

**Requires environment variables:** `MYSQL_HOST`, `MYSQL_USER`, `MYSQL_PASSWORD` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What designcomputer/mysql_mcp_server MCP server does

designcomputer/mysql_mcp_server MCP server provides an MCP interface for interacting with MySQL databases. It exposes three tools: one for running SQL, one for reading table metadata, and one for retrieving a limited sample of rows. The server also publishes available MySQL tables as resources.

The SQL tool accepts standard statements, including `SELECT`, `SHOW`, `DESCRIBE`, `INSERT`, `UPDATE`, and `DELETE`. Write operations are marked with a destructive hint, but the material does not describe an approval layer or a read-only mode. Queries are restricted to one SQL statement at a time.

Schema inspection returns column names, data types, nullability, defaults, and comments. Sampling accepts a table name and an optional limit capped at 20 rows, making it suitable for quickly examining data shape without requesting a large result set.

## How it works

The server reads connection and transport settings from environment variables, then communicates with an MCP host using either STDIO or SSE. STDIO is intended for local client configurations; SSE is available when the process is hosted or accessed remotely. SSH tunneling can be enabled when the database is reachable through a jump host.

When `MYSQL_DATABASE` is set, bare table names refer to that database. If it is omitted, the server enters multi-database mode, filters system databases from resource listing, and supports fully qualified names such as `analytics.orders`. Qualified names can also be used when a default database is configured. Multi-database queries still must contain only one SQL statement; commands such as `USE db; SELECT ...` are not supported.

The project also includes two MCP prompts. `explore_database` coordinates table discovery, schema inspection, and sampling. `analyze_table` performs a similar inspection for one specified table and accepts a qualified database-and-table name.

## Setup and configuration

Install the Python package with `pip install mysql-mcp-server`, or configure a client to run `uvx --from mysql-mcp-server mysql_mcp_server`. The README provides a Claude Desktop configuration using a local project directory and a Visual Studio Code configuration using `uvx`.

At minimum, provide `MYSQL_HOST`, `MYSQL_USER`, and `MYSQL_PASSWORD`. `MYSQL_PORT` defaults to 3306, while `MYSQL_DATABASE` is optional. Additional settings control SSL behavior, connection timeout, SQL mode, character set, collation, authentication plugin, connector behavior, and warning handling.

A `.env` file is loaded from the process working directory or its parents. Client-launched processes may use a different working directory, so the README advises placing database values directly in the MCP client's environment configuration in that situation.

## Tools and capabilities

- `execute_sql`: Runs one SQL statement and reports database errors.
- `get_schema_info`: Returns metadata for a specified table or the configured database context.
- `get_table_sample`: Returns a bounded sample from a table, with a maximum limit of 20.
- Resource listing: Enumerates user databases in multi-database mode and exposes available tables.
- Transport options: Supports STDIO and SSE through `MCP_TRANSPORT`.
- Network access: Can connect through an optional SSH tunnel.

The designcomputer/mysql_mcp_server MCP server validates table identifiers for schema and sampling operations. Names may contain letters, numbers, underscores, and `$`; a dot is allowed to separate a database from a table.

## Limitations and notes

Only single SQL statements are supported. Large result handling, transaction management, query allowlists, and authorization policies are not described in the provided material. Database credentials and connection settings must be supplied by the operator. SSE deployments require appropriate host and port configuration, including allowed host headers when needed.

The documented automatic installation path is available for Claude Desktop through Smithery, while the project also documents manual package installation and local client configuration. The material does not identify a software license or list clients beyond Claude Desktop and Visual Studio Code examples.

_Full upstream README: https://allmcps.com/mcp/designcomputer-mysql-mcp-server/readme_

