drio
Open app

MySQL MCP Server

Source

MCP server that provides direct access to MySQL databases

Catalog onlyCatalog onlySTDIO

Overview

MySQL MCP Server is a powerful server that provides direct access to MySQL databases, enabling AI agents to interact with databases, execute SQL queries, and manage content through a simple interface.

To use MySQL MCP Server, clone the repository, install dependencies, set up your MySQL connection details in a .env file, and build the server. You can then integrate it with applications like Claude or Cline.

  • Direct access to MySQL databases for AI agents - Execute custom SQL queries - Create and manage notes stored in the database - List, count, and search database tables
  1. Automating database interactions for AI applications.
  2. Managing and retrieving notes stored in a MySQL database.
  3. Executing SQL queries through conversational interfaces.

Add to your AI client

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

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

Claude Code

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

.mcp.json (project root)

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

VS Code (Copilot)

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

.vscode/mcp.json

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

Windsurf

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

~/.codeium/windsurf/mcp_config.json

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

Cline

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

Cline MCP Settings (via UI)

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

FAQ

What are the prerequisites for using MySQL MCP Server?

You need Node.js 18 or higher and a running MySQL server with appropriate permissions.

How do I install MySQL MCP Server?

Clone the repository, install dependencies, and configure your MySQL connection in a `.env` file.

Can I use MySQL MCP Server with other applications?

Yes, it can be integrated with applications like Claude and Cline for enhanced functionality.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2272,"uuid":"a8245dec-d10c-4890-920c-7965800f3f23","name":"mysql-mcp","title":"MySQL MCP Server","description":"MCP server that provides direct access to MySQL databases","avatar_url":"https://avatars.githubusercontent.com/u/7979704?v=4","created_at":"2025-03-09T07:18:17.809Z","updated_at":"2025-03-12T10:21:15.865Z","status":"created","author_name":"LeonMelamud","author_avatar_url":"https://avatars.githubusercontent.com/u/7979704?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/LeonMelamud/mysql-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"3\",\"license\":\"\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-06 20:50:56\"}","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"}]]}]