MySQL MCP Server

![Tests](https://github.com/youngsu5582/mcp-server-mysql/actions/workflows/test.yml/badge.svg) > This project is a Java conversion of a Python

Local serverstdioPython

What is the MySQL MCP Server?

!Tests > This project is a Java conversion of a Python codebase from > a

What you get

This project was created as a learning exercise to explore MCP (Model Context Protocol) concepts.

  • List available MySQL tables as resources
  • Read table contents
  • Execute SQL queries with proper error handling
  • Secure database access through environment variables
  • Comprehensive logging

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.

How to install the MySQL MCP Server

{
  "mcpServers": {
    "server-mysql-youngsu5582": {
      "command": "uvx",
      "args": ["mysql-mcp-server"],
      "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

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

Frequently asked questions

This project is a Java conversion of a Python codebase from [design-computer/mysql_mcp_server](https://github.com/designcomputer/mysql_mcp_server/tree/main), preserving the core functionality for Java environments.