MCP Server

MCP server exposing MySQL database functionalities as tools

Local serverstdioPython

What is the MCP MCP server?

If you already use MCP, the mcp mcp server is the piece that lets your assistant work with it directly. MCP server exposing MySQL database functionalities as tools.

What the server does

mcp-mysql-connector is a Model Context Protocol (MCP) server that provides MySQL database operations as tools for LLM agents. It allows AI assistants to interact with MySQL databases through a standardized protocol, enabling:

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • Configuration — The Configuration tool exposed by this server

Credentials and setup notes

Configuration is passed through the environment: MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Python 3.11+ - fastmcp >= 2.0.0 - pymysql >= 1.1.0 - sqlparse >= 0.4.0

Installation

Installation goes through your MCP client rather than a global install: point it at mcp-mysql-connector on PyPI and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Where it fits

Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. MCP's toolset — Configuration — is a fair guide to whether it matches your workflow. It is maintained by daedalus; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
ConfigurationThe Configuration tool exposed by this server.

How to install the MCP MCP server

{
  "mcpServers": {
    "mysql-connector": {
      "command": "uvx",
      "args": ["mcp-mysql-connector"],
      "env": {
        "MYSQL_HOST": "your-value",
        "MYSQL_PORT": "your-value",
        "MYSQL_USER": "your-value",
        "MYSQL_PASSWORD": "your-value",
        "MYSQL_DATABASE": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Python 3.11+ - fastmcp >= 2.0.0 - pymysql >= 1.1.0 - sqlparse >= 0.4.0
VariableDescriptionRequired
MYSQL_HOSTEndpoint or connection string the server talks to.Optional
MYSQL_PORTConfiguration value read at startup.Optional
MYSQL_USERConfiguration value read at startup.Optional
MYSQL_PASSWORDConfiguration value read at startup.Optional
MYSQL_DATABASEConfiguration value read at startup.Optional

Example prompts to try

  • Use MCP to Configuration.

Frequently asked questions

It connects MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (Configuration) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP directly.