MySQL Database Server

MySQL MCP server for cursor

Installation

Installing for Claude Desktop

Option 1: One-Command Installation

npx mcpbar@latest install vitalyDV/mysql-mcp -c claude

This command will automatically install and configure the MySQL Database Server MCP server for your selected client.

Option 2: Manual Configuration

Run the command below to open your configuration file:

npx mcpbar@latest edit -c claude

After opening your configuration file, copy and paste this configuration:

View JSON configuration
{
  "mcpServers": {
    "MySQL Database Server": {
      "command": "npx",
      "args": [
        "-y",
        "mysql-mcp"
      ],
      "env": {
        "MYSQL_HOST": "${input:mysql_host}",
        "MYSQL_PORT": "${input:mysql_port}",
        "MYSQL_USER": "${input:mysql_user}",
        "MYSQL_PASS": "${input:mysql_pass}",
        "MYSQL_DB": "${input:mysql_db}"
      }
    }
  }
}

MySQL MCP Server

This project implements an MCP (Model Context Protocol) server for working with MySQL database.

Repository

This project is available on GitHub: https://github.com/vitalyDV/mysql-mcp

Clone the repository

git clone https://github.com/vitalyDV/mysql-mcp.git
cd mysql-mcp
npm install

add config to mcp.json

{
  "mcpServers": {
    "mysql_mcp_readonly": {
      "command": "node",
      "args": [
        "./mysql-mcp/index.js"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASS": "",
        "MYSQL_DB": "db",
      }
    }
  }
}

Environment Variables

  • MYSQL_HOST - MySQL server host
  • MYSQL_PORT - MySQL server port
  • MYSQL_USER - MySQL username
  • MYSQL_PASS - MySQL password
  • MYSQL_DB - MySQL database name

Available MCP tools

  • query - execute SQL queries (only SELECT, SHOW, EXPLAIN, DESCRIBE)
  • table-schema - get table structure
  • list-tables - get list of all tables in the database

Available MCP resources

  • table://{name} - get data from the specified table (up to 100 rows)
Share:
Details:
  • Stars


    2
  • Forks


    1
  • Last commit


    7 months ago
  • Repository age


    7 months
View Repository

Auto-fetched from GitHub .

MCP servers similar to MySQL Database Server:

 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit


MySQL Database Server: MCP Server – MCP.Bar