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
query
: Executes read-only SQL queries like SELECT, SHOW, DESCRIBE.insert
: Executes INSERT statements.update
: Executes UPDATE statements.delete
: Executes DELETE statements.