MCP Server for MySQL based on NodeJS
@zhaoxin34
About MCP Server for MySQL based on NodeJS
No overview available yet
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-server-mysql-zhaoxin34": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"install",
"@benborla29/mcp-server-mysql",
"--client",
"claude"
]
}
}
}Tools
1Execute read-only SQL queries against the connected database
Overview
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 designed for developers and AI applications that need safe, structured database interaction.
How to use MCP Server for MySQL based on NodeJS?
Install via Smithery (npx -y @smithery/cli@latest install @benborla29/mcp-server-mysql), MCP Get, or manually with npm/pnpm (npm install -g @benborla29/mcp-server-mysql). Configure using environment variables (e.g., MYSQL_HOST, MYSQL_PORT) and invoke the mysql_query tool with a read-only SQL string.
Key features of MCP Server for MySQL based on NodeJS
- Execute read-only SQL queries with prepared statements
- Automatically discover table schemas, indexes, and foreign keys
- SQL injection prevention and rate limiting
- Query result caching and configurable timeouts
- Comprehensive query logging and performance metrics
Use cases of MCP Server for MySQL based on NodeJS
- Let an LLM generate and run analytical SELECT queries against your MySQL database
- Provide safe read-only database access for AI assistants without risking data modifications
- Automatically document database schemas by inspecting tables, columns, and relationships
- Enable conversational data analysis by letting an LLM answer natural‑language questions with live SQL queries
FAQ from MCP Server for MySQL based on NodeJS
How does read‑only access work?
All queries are executed inside a READ ONLY transaction. The server enforces read‑only semantics and supports prepared statements for parameterised queries.
What are the runtime dependencies?
You need Node.js and a MySQL server (supports caching_sha2_password and mysql_native_password). The server can be installed globally via npm or run via npx.
What environment variables must I set?
At minimum: MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, and optionally MYSQL_DB. Advanced options for pooling, timeouts, caching, rate limiting, SSL, and logging are also available.
Does the server support SSL/TLS?
Yes. Set MYSQL_SSL to true to enable encrypted connections.
How do I troubleshoot connection issues?
Verify MySQL is running, check credentials and permissions, and ensure the correct authentication plugin is used. For MySQL 8.0+ you may need a user created with mysql_native_password. Use Smithery diagnostics (smithery diagnose) or manual log checking.
Frequently asked questions
How does read‑only access work?
All queries are executed inside a READ ONLY transaction. The server enforces read‑only semantics and supports prepared statements for parameterised queries.
What are the runtime dependencies?
You need Node.js and a MySQL server (supports `caching_sha2_password` and `mysql_native_password`). The server can be installed globally via npm or run via npx.
What environment variables must I set?
At minimum: `MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_USER`, `MYSQL_PASS`, and optionally `MYSQL_DB`. Advanced options for pooling, timeouts, caching, rate limiting, SSL, and logging are also available.
Does the server support SSL/TLS?
Yes. Set `MYSQL_SSL` to `true` to enable encrypted connections.
How do I troubleshoot connection issues?
Verify MySQL is running, check credentials and permissions, and ensure the correct authentication plugin is used. For MySQL 8.0+ you may need a user created with `mysql_native_password`. Use Smithery diagnostics (`smithery diagnose`) or manual log checking.
Basic information
More Databases MCP servers

Redis
modelcontextprotocolModel Context Protocol Servers
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
Redis MCP Server
redisThe official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Neon MCP Server
neondatabase-labsMCP server for interacting with Neon Management API and databases
Comments