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.
「データベース」の他のコンテンツ
MySQL MCP Server
designcomputerA Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
PostgreSQL Model Context Protocol (PG-MCP) Server
stuzeroMulti Database MCP Server
FreePeakA powerful multi-database server implementing the Model Context Protocol (MCP) to provide AI assistants with structured access to databases.
Snowflake MCP Server
isaacwassermanClickHouse MCP Server
ClickHouseConnect ClickHouse to your AI assistants.
コメント