Mysql MCP Server logo

Mysql MCP Server

by designcomputer

Connects MCP clients to MySQL for SQL execution, schema inspection, and small table samples.

Install Mysql MCP Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "designcomputer-mysql-mcp-server": {
      "command": "uvx",
      "args": [
        "mysql_mcp_server"
      ],
      "env": {
        "MYSQL_HOST": "YOUR_VALUE_HERE",
        "MYSQL_USER": "YOUR_VALUE_HERE",
        "MYSQL_PASSWORD": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

uvx mysql_mcp_server

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1mo ago.

Overview

designcomputer/mysql_mcp_server MCP server connects AI clients to MySQL through SQL, schema, and table-sampling tools. It runs locally over STDIO or can use Streamable HTTP/SSE for remote or self-hosted deployments. Configuration is supplied through environment variables, with optional multi-database access and SSH tunneling. Reach for it when an agent needs to inspect MySQL structures, review representative data, or execute single SQL statements.

Use cases

  • Run SQL queries against a MySQL database
  • Inspect table schemas and column metadata
  • Sample up to 20 rows from a table
  • Explore multiple MySQL databases
  • Connect through an SSH jump host

Key features

  • SQL execution with error handling
  • Schema metadata inspection
  • Bounded table sampling
  • Optional multi-database mode
  • STDIO and SSE transports
  • Optional SSH tunneling

Tools3

What Mysql MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~42 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

29/29 checks healthy over the last 79d

Supply-chain signal

1 high-severity advisory on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage — this is a directional signal, not a security audit.

Critical 1High 0Medium 0Low 3

Scanned 8d ago via OSV.dev · mysql_mcp_server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1.4kStargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed3Callable tools this server registers over MCP.
Directory activity1 upvotesConfig copies, upvotes, and views on AllMCPs.

How Mysql MCP Server works

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. 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.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mysql MCP Server

Install the package with `pip install mysql-mcp-server`, or configure a client to run `uvx --from mysql-mcp-server mysql_mcp_server`.

Yes. The README includes a Claude Desktop configuration using the server's `mysql_mcp_server` entry point and database environment variables.

Yes. Omit `MYSQL_DATABASE` to enable multi-database mode, then use fully qualified names such as `database.table`. Only one SQL statement can be sent at a time.

It provides `execute_sql`, `get_schema_info`, and `get_table_sample`. It also exposes table resources and database exploration prompts.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMysql MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/designcomputer-mysql-mcp-server?style=directory)](https://allmcps.com/mcp/designcomputer-mysql-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/designcomputer-mysql-mcp-server"><img src="https://allmcps.com/api/badge/designcomputer-mysql-mcp-server?style=directory" alt="Mysql MCP Server on AllMCPs" /></a>