drio
Open app

@f4ww4z/mcp-mysql-server

Source

A Model Context Protocol server for MySQL database operations

Catalog onlyCatalog onlySTDIO

Overview

MCP MySQL Server is a Model Context Protocol server designed to facilitate interaction between AI models and MySQL databases through a standardized interface.

To use the MCP MySQL Server, install it via the command line using the command: npx @f4ww4z/mcp-mysql-server and configure it with necessary environment variables in your MCP settings.

  • Secure connection handling with automatic cleanup - Prepared statement support for SQL queries - Comprehensive error handling and validation - TypeScript support for easy integration - Automatic management of database connections
  1. Connecting AI models to MySQL for data storage and retrieval
  2. Executing dynamic queries based on user inputs through AI
  3. Automating database operations within AI systems

Add to your AI client

Use these steps to connect @f4ww4z/mcp-mysql-server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-mysql-server-f4ww4z": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-mysql-server-f4ww4z"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-mysql-server-f4ww4z": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-mysql-server-f4ww4z"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-mysql-server-f4ww4z": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-mysql-server-f4ww4z"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-mysql-server-f4ww4z": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-mysql-server-f4ww4z"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-mysql-server-f4ww4z": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-mysql-server-f4ww4z"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-mysql-server-f4ww4z": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-mysql-server-f4ww4z"
      ]
    }
  }
}

FAQ

Is MCP MySQL Server easy to install?

Yes! Installation is straightforward using npm.

What security measures does MCP MySQL Server use?

It employs prepared statements to prevent SQL injection and manages secure password handling through environment variables.

Can I contribute to the MCP MySQL Server?

Absolutely! Contributions are welcome on GitHub.