mysql-mcp-server
1
The MySQL MCP Server is designed to facilitate the execution of SQL queries by large language models on local MySQL or MariaDB databases. It enhances integration by employing the Model Context Protocol and supports simple profile management for database connections.
Overview of MySQL MCP Server
- Description: Connects to a local MySQL database, enabling large language models (LLMs) to execute SQL queries.
- Requirements: Node.js 20.0.0+, MySQL 5.7+/MariaDB.
- Features:
- Execute MySQL queries from LLM
- Retrieve database information like lists and structures
- MCP-compliant for easy LLM integration
- Uses stdio communication, avoiding port binding
- Manage multiple connection profiles
- Save and reuse DB connection info locally
Installation & Usage
- Run Temporarily via NPX:
- Example command without actual snippet provided.
- Includes options like
--host
,--port
,--user
, and more.
- Persistent Connection Management: Saves connection info in
.mysql-mcp-connections.json
for reuse. - Communication: Operates in
stdio
mode, avoiding port issues and improving security. - Provided MCP Tools: Database connection and profile management tools, SQL query execution, and more.
Developer Info
- Development Setup: Clone repo, install dependencies, and run in dev mode.
- Build: Command with no snippet.