MCP Server for MySQL based on NodeJS
@MCP-Mirror
关于 MCP Server for MySQL based on NodeJS
Mirror of
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"zhaoxin34_mcp-server-mysql": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"install",
"@benborla29/mcp-server-mysql",
"--client",
"claude"
]
}
}
}工具
1Execute read-only SQL queries against the connected database
概览
What is MCP Server for MySQL based on NodeJS?
A Model Context Protocol server that provides read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read‑only queries. It is built on Node.js and is intended for developers who want their AI assistants to query MySQL safely.
How to use MCP Server for MySQL based on NodeJS?
Install via Smithery, MCP Get, or npm/pnpm globally, then configure your LLM application with the required environment variables (e.g., MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, MYSQL_DB). For Claude Desktop, add the server entry to claude_desktop_config.json with the command npx -y @benborla29/mcp-server-mysql and the env block. Once configured, the server exposes a mysql_query tool for read‑only queries and provides table schema resources.
Key features of MCP Server for MySQL based on NodeJS
- Read‑only SQL execution via the
mysql_querytool - Automatic discovery of table schemas, columns, indexes, and foreign keys
- SQL injection prevention with prepared statements
- Configurable rate limiting, query complexity analysis, and SSL encryption
- Connection pooling, result caching, and streaming
- Query logging, performance metrics, and health check endpoints
Use cases of MCP Server for MySQL based on NodeJS
- LLMs answering questions by querying a MySQL database in a read‑only manner
- Inspecting database schemas to help write accurate SQL queries
- Generating reports or summaries from existing database content
- Debugging or exploring unknown database structures via natural language
FAQ from MCP Server for MySQL based on NodeJS
What does this MCP server do?
It gives LLMs read‑only access to MySQL databases, allowing them to inspect schemas and run SELECT queries safely. All queries are executed within a READ ONLY transaction.
How do I install the server?
You can install it via Smithery (npx -y @smithery/cli@latest install @benborla29/mcp-server-mysql), MCP Get, or globally with npm (npm install -g @benborla29/mcp-server-mysql). After manual installation, configure your LLM app with environment variables.
What environment variables are required?
At minimum: MYSQL_HOST (default 127.0.0.1), MYSQL_PORT (default 3306), MYSQL_USER (default root), MYSQL_PASS, and MYSQL_DB. Optional variables control pool size, query timeout, cache TTL, rate limit, SSL, logging, and metrics.
Is the access really read‑only?
Yes. The server enforces read‑only transactions, uses prepared statements, and includes rate limiting and query complexity analysis to prevent dangerous operations.
How can I troubleshoot connection issues?
Verify that MySQL is running and accessible, check credentials and the caching_sha2_password plugin (MySQL 8.0+), ensure SSL/TLS settings are correct, and set the PATH environment variable if you get “Could not connect” errors.
数据库 分类下的更多 MCP 服务器
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
MySQL MCP Server
designcomputerA Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB
评论