mcp-mysql-server

mcp-mysql-server

0

The MySQL MCP Server is designed to facilitate interactions with a MySQL database via the Model Context Protocol. It enables both read and write operations, provided the necessary configurations are set, making it a robust tool for database interactions.

MySQL MCP Server

Version: 0.1.0

A Model Context Protocol (MCP) server for interacting with a MySQL database. This server allows MCP clients to query and modify data in a configured MySQL database.

Features

  • Connects to a MySQL database
  • Provides MCP tools for SQL queries
  • Supports read-only queries
  • Supports write operations if enabled

Configuration

Requires setting environment variables such as MYSQL_HOST, MYSQL_USER, MYSQL_PORT, etc.

Usage

Run using npm run build and execute mysql-server globally or node build/index.js locally. Listens for MCP requests over stdio.

Available Tools

  1. query: Executes read-only SQL queries like SELECT, SHOW, DESCRIBE.
  2. insert: Executes INSERT statements.
  3. update: Executes UPDATE statements.
  4. delete: Executes DELETE statements.