@enemyrr/mcp-mysql-server
@enemyrr
About @enemyrr/mcp-mysql-server
No overview available yet
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-mysql-server-enemyrr": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@enemyrr/mcp-mysql-server",
"--client",
"claude"
]
}
}
}Tools
No tools detected
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Overview
What is @enemyrr/mcp-mysql-server?
A Model Context Protocol (MCP) server that enables AI models to interact with MySQL databases through a standardized interface. This server provides SQL query execution, schema management, and database exploration, all controllable via MCP tools.
How to use @enemyrr/mcp-mysql-server?
Install via Smithery (npx -y @smithery/cli install @enemyrr/mcp-mysql-server --client claude) or clone and build manually. Configure database connection using a DATABASE_URL in .env, individual environment variables, or pass credentials directly via the connect_db tool. After connecting, use available tools such as query, execute, list_tables, and describe_table.
Key features of @enemyrr/mcp-mysql-server
- 14 database tools for queries and schema management
- MCP Resources for browsing database schema
- MCP Prompts for generating SQL queries
- Multiple connection methods (URL, workspace, direct)
- Secure prepared statements to prevent SQL injection
- Automatic connection cleanup after use
Use cases of @enemyrr/mcp-mysql-server
- AI assistants executing SQL SELECT queries and returning results
- Automated schema management: create, alter, or drop tables and columns
- Database exploration: list tables, describe structures, view indexes and foreign keys
- Generating SQL templates for common operations (SELECT, INSERT, UPDATE)
- Obtaining natural language explanations of database schema
FAQ from @enemyrr/mcp-mysql-server
How do I connect to a MySQL database?
You can connect via a database URL in .env, individual host/user/password environment variables, or directly through the connect_db tool’s arguments (URL, workspace path, or credentials).
How does the server prevent SQL injection?
All queries support prepared statements, and the server validates queries before execution, using parameterized inputs to prevent injection.
What tools are available for schema changes?
Tools include create_table, add_column, alter_column, drop_column, drop_table, and truncate_table. Destructive operations require a confirmation flag.
What MCP resources are exposed?
Resources are provided under URIs like mysql://schema (database overview), mysql://tables (list tables), mysql://tables/{name} (table details), and mysql://tables/{name}/columns, indexes, sample for column definitions, indexes, and sample rows.
Does the server support prepared statement parameters?
Yes, both the query and execute tools accept a params array for parameterized SQL, ensuring safe and efficient query execution.
Frequently asked questions
How do I connect to a MySQL database?
You can connect via a database URL in `.env`, individual host/user/password environment variables, or directly through the `connect_db` tool’s arguments (URL, workspace path, or credentials).
How does the server prevent SQL injection?
All queries support prepared statements, and the server validates queries before execution, using parameterized inputs to prevent injection.
What tools are available for schema changes?
Tools include `create_table`, `add_column`, `alter_column`, `drop_column`, `drop_table`, and `truncate_table`. Destructive operations require a confirmation flag.
What MCP resources are exposed?
Resources are provided under URIs like `mysql://schema` (database overview), `mysql://tables` (list tables), `mysql://tables/{name}` (table details), and `mysql://tables/{name}/columns`, `indexes`, `sample` for column definitions, indexes, and sample rows.
Does the server support prepared statement parameters?
Yes, both the `query` and `execute` tools accept a `params` array for parameterized SQL, ensuring safe and efficient query execution.
Basic information
More Databases MCP servers
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Elasticsearch MCP Server
elastic
Local YDB MCP
astandrikSafety-first stdio MCP server with 38 tools for operating Docker-based local-ydb environments locally or over SSH.
Comments