drio
Open app

mcp-server-mysql

Source

MCP Server for MySQL databases

Catalog onlyCatalog onlySTDIO

Overview

MCP Server for MySQL is a Model Context Protocol server developed in NodeJS that allows read-only access to MySQL databases, enabling large language models (LLMs) to inspect database schemas and execute read-only queries.

To use the server, integrate it with the Claude Desktop application by configuring the claude_desktop_config.json file with the appropriate MySQL connection details.

  • Provides read-only SQL query execution against MySQL databases - Automatically discovers table schemas and provides JSON schema information - Simple integration with application configurations
  1. Allowing LLMs to access and query databases without modification risk
  2. Enabling database schema inspection for data analysis tasks
  3. Facilitating read operations in a secure and controlled environment

Add to your AI client

Use these steps to connect mcp-server-mysql 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-server-mysql-yuru-sha": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-mysql-yuru-sha"
      ]
    }
  }
}

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-server-mysql-yuru-sha": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-mysql-yuru-sha"
      ]
    }
  }
}

Claude Code

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

.mcp.json (project root)

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

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-server-mysql-yuru-sha": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-mysql-yuru-sha"
      ]
    }
  }
}

Windsurf

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

~/.codeium/windsurf/mcp_config.json

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

Cline

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

Cline MCP Settings (via UI)

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

FAQ

Can I write data to the database using this server?

No, MCP Server for MySQL only provides read-only access to ensure data integrity.

How do I troubleshoot connection issues?

Ensure that your MySQL service is running and verify the connection parameters in your configuration.

Is there any license for using MCP Server for MySQL?

Yes, this server is licensed under the MIT License, allowing free usage, modification, and distribution.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":239,"uuid":"dda9c60d-d5a1-4247-8a6f-687d0332c4ec","name":"mcp-server-mysql","title":"mcp-server-mysql","description":"MCP Server for MySQL databases","avatar_url":"https://avatars.githubusercontent.com/u/10279443?v=4","created_at":"2024-12-13T10:39:11.814Z","updated_at":"2024-12-13T12:28:11.511Z","status":"created","author_name":"yuru-sha","author_avatar_url":"https://avatars.githubusercontent.com/u/10279443?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/yuru-sha/mcp-server-mysql","target":"_self","content":"$29","summary":"$2a","img_url":"https://github.com/yuru-sha/mcp-server-mysql/actions/workflows/ci.yml/badge.svg","type":null,"metadata":"{\"star\":\"6\",\"license\":\"MIT license\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-05-07 17:08:49\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]