mysql_mcp_server

MCP.Pizza Chef: designcomputer

Point this at a MySQL database and your assistant can list the tables, read what is inside them, pull a small sample so you can see the shape of the data, and run queries you describe in ordinary words. It handles several databases at once, connects through an SSH tunnel for servers you cannot reach directly, and ships guided walkthroughs for exploring a database. Setup is one install command plus your address, username, and password. A hosted option exists if you would rather not run it.

Coding
Data

Use This MCP server To

Ask how many orders came in last month See what tables and columns a database has Peek at sample rows to understand the data Reach a database sitting behind an SSH jump host Query two databases in the same conversation

README

Tests PyPI - Downloads AgentAudit Safe

MySQL MCP Server

A Model Context Protocol (MCP) implementation that enables secure interaction with MySQL databases. This server component facilitates communication between AI applications (hosts/clients) and MySQL databases, making database exploration and analysis safer and more structured through a controlled interface.

Note: MySQL MCP Server supports both standard input/output (STDIO) and Streamable HTTP (SSE) transport modes. The SSE mode is recommended for remote/self-hosted deployments.

Deployment options

  • Hosted — Fronteir AI runs the server for you; no local setup required.
  • Local — Smithery installs and runs the server on your own machine.

Features

  • List available MySQL tables as resources
  • Read table contents
  • Execute SQL queries with proper error handling
  • Multi-database mode (Optional MYSQL_DATABASE)
  • SSE/HTTP transport support (MCP_TRANSPORT=sse)
  • SSH Tunneling support
  • Comprehensive schema information
  • Table data sampling
  • Secure database access through environment variables
  • Comprehensive logging

Installation

Manual Installation

pip install mysql-mcp-server

mysql_mcp_server FAQ

Which databases does it work with?
MySQL only, including a multi-database mode when you leave the database name unset.
Which apps does it work in?
Claude Desktop, Claude Code, VS Code, and other MCP-capable apps, each with a one-line install command.
Do I need a paid key?
No, just your own MySQL address, username, and password.
Can I use this to answer a question without writing SQL?
Yes — describe what you want, and it writes the query, runs it, and explains the result.
Can it change or delete data?
It can run inserts, updates, and deletes, which are flagged as destructive. Give it a limited database user if that worries you.
How hard is the setup?
One install command, then your database details go into your app's settings rather than a local file, which is where most people trip up.
Can I reach a database on a remote server?
Yes, it supports SSH tunnelling, and there is a hosted version if you prefer not to run it yourself.