MySQL MCP Server

MySQL MCP Server

By vitalyDV GitHub

MySQL MCP server for cursor

mysql mcp
Overview

what is MySQL MCP Server?

MySQL MCP Server is an implementation of a Model Context Protocol (MCP) server designed for interacting with MySQL databases.

how to use MySQL MCP Server?

To use the MySQL MCP Server, clone the repository from GitHub, install the necessary dependencies, and configure the mcp.json file with your MySQL database credentials.

key features of MySQL MCP Server?

  • Execute SQL queries (only SELECT, SHOW, EXPLAIN, DESCRIBE)
  • Retrieve table structures and list all tables in the database
  • Access data from specified tables (up to 100 rows)

use cases of MySQL MCP Server?

  1. Simplifying database interactions for applications using MySQL.
  2. Providing a structured way to execute queries and retrieve data.
  3. Facilitating database management tasks through MCP tools.

FAQ from MySQL MCP Server?

  • What is the purpose of the MySQL MCP Server?

It serves as a protocol server to facilitate interactions with MySQL databases using the Model Context Protocol.

  • How do I configure the server?

You need to add your MySQL connection details in the mcp.json configuration file.

  • What types of queries can I execute?

You can execute SELECT, SHOW, EXPLAIN, and DESCRIBE queries.

Content

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)
No tools information available.
School MCP
School MCP by 54yyyu

A Model Context Protocol (MCP) server for academic tools, integrating with Canvas and Gradescope platforms.

canvas mcp
View Details
repo-template
repo-template by loonghao

A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions.

-

google-calendar mcp
View Details
strava-mcp
strava-mcp by jeremysilva1098

MCP server for strava

strava mcp
View Details

Model Context Protocol (MCP) server implementation for Rhinoceros/Grasshopper integration, enabling AI models to interact with parametric design tools

grasshopper mcp
View Details

MCP configuration to connect AI agent to a Linux machine.

security mcp
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details