Mysql MCP Server

Enables AI assistants to interact with MySQL databases through a secure, controlled interface.

Local serverstdioPython★ 6

What is the Mysql MCP Server?

Enables AI assistants to interact with MySQL databases through a secure, controlled interface.

What it actually does

A lightweight Model Context Protocol (MCP) server that enables secure interaction with MySQL databases. This server allows AI assistants like Claude to list tables, read data, and execute SQL queries through a controlled interface.

  • List all MySQL tables in the database
  • Retrieve detailed schema information for all tables
  • Execute read-only SQL queries with proper error handling
  • Secure database access through environment variables
  • Simple configuration and deployment

Configuration

  • uv (recommended) - Python 3.12.2+ - MySQL server

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
query_dataExecute read-only SQL queries and return results

Configuration

  • uv (recommended) - Python 3.12.2+ - MySQL server
VariableDescriptionRequired
DB_HOSTEndpoint or connection string the server talks to.Optional
DB_PORTConfiguration value read at startup.Optional
DB_USERConfiguration value read at startup.Optional
DB_PASSWORDConfiguration value read at startup.Optional
DB_NAMEConfiguration value read at startup.Optional

Example prompts to try

  • “Use Mysql to query data.”

Frequently asked questions

Key features include listing MySQL tables, retrieving detailed schema information, executing read-only SQL queries with error handling, and securing database access using environment variables.