MCP Server for MySQL based on NodeJS
@shensiqi0701
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-MySQL-server-implementation": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"install",
"@benborla29/mcp-server-mysql",
"--client",
"claude"
]
}
}
}Tools
1Execute SQL queries against the connected database
Overview
What is MCP Server for MySQL based on NodeJS?
A Model Context Protocol server that provides access to MySQL databases, enabling LLMs to inspect database schemas and execute SQL queries. It’s designed for developers using AI assistants like Claude or Cursor to interact with MySQL databases.
How to use MCP Server for MySQL based on NodeJS?
Install via npx -y @benborla29/mcp-server-mysql, Smithery, MCP Get, npm/pnpm, or by cloning the repository. Configure environment variables like MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, and MYSQL_DB. Use the mysql_query tool to run SQL queries; write operations (INSERT/UPDATE/DELETE) are disabled by default and must be enabled via ALLOW_INSERT_OPERATION, ALLOW_UPDATE_OPERATION, ALLOW_DELETE_OPERATION.
Key features of MCP Server for MySQL based on NodeJS
- Execute SQL queries via the
mysql_querytool. - Enforce read-only operations by default.
- Optional INSERT, UPDATE, DELETE permissions.
- Automatic discovery of table schemas, indexes, constraints.
- Security features: prepared statements, rate limiting, query complexity analysis.
- Performance optimizations: connection pooling, caching, result streaming.
- Monitoring: comprehensive query logging and performance metrics.
Use cases of MCP Server for MySQL based on NodeJS
- Allow an LLM (e.g., Claude) to inspect MySQL database schemas.
- Let an LLM run SQL SELECT queries for data analysis.
- Enable an LLM to insert, update, or delete data when explicitly permitted.
- Integrate with Cursor IDE for database-aware coding assistance.
- Use via Smithery for one-click setup with any compliant client.
FAQ from MCP Server for MySQL based on NodeJS
What are the system requirements?
Node.js v18 or higher and MySQL 5.7 or higher (MySQL 8.0+ recommended). The MySQL user must have appropriate permissions for the operations needed.
Are write operations enabled by default?
No. INSERT, UPDATE, and DELETE operations are disabled by default for security. Set ALLOW_INSERT_OPERATION, ALLOW_UPDATE_OPERATION, or ALLOW_DELETE_OPERATION to "true" to enable them.
How do I install this server?
You can install via npx -y @benborla29/mcp-server-mysql, using Smithery (npx -y @smithery/cli@latest install @benborla29/mcp-server-mysql --client claude), MCP Get, npm/pnpm globally, or by cloning the GitHub repository and building from source.
Does the server support SSL/TLS for database connections?
Yes. Set MYSQL_SSL to "true" in the environment configuration to enable encrypted connections.
How does the server protect against SQL injection?
All queries use prepared statements to prevent SQL injection. Additional security measures include rate limiting, query complexity analysis, and optional query whitelisting/blacklisting.
Frequently asked questions
What are the system requirements?
Node.js v18 or higher and MySQL 5.7 or higher (MySQL 8.0+ recommended). The MySQL user must have appropriate permissions for the operations needed.
Are write operations enabled by default?
No. INSERT, UPDATE, and DELETE operations are disabled by default for security. Set `ALLOW_INSERT_OPERATION`, `ALLOW_UPDATE_OPERATION`, or `ALLOW_DELETE_OPERATION` to `"true"` to enable them.
How do I install this server?
You can install via `npx -y @benborla29/mcp-server-mysql`, using Smithery (`npx -y @smithery/cli@latest install @benborla29/mcp-server-mysql --client claude`), MCP Get, npm/pnpm globally, or by cloning the GitHub repository and building from source.
Does the server support SSL/TLS for database connections?
Yes. Set `MYSQL_SSL` to `"true"` in the environment configuration to enable encrypted connections.
How does the server protect against SQL injection?
All queries use prepared statements to prevent SQL injection. Additional security measures include rate limiting, query complexity analysis, and optional query whitelisting/blacklisting.
Basic information
More Databases MCP servers

nuzur
nuzur is a model-first database platform for MySQL and PostgreSQL. The MCP server lets any AI assistant or agent (Claude, Cursor, Gemini, or anything else that speaks MCP) design your schema, query your data, generate mi
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
ClickHouse MCP Server
ClickHouseConnect ClickHouse to your AI assistants.

PostgreSQL
modelcontextprotocolModel Context Protocol Servers
Xata MCP Server
The Xata MCP server lets AI assistants and agents interact with your Xata organizations, projects, and Postgres database branches.
Comments