
This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that enables AI models to interact with MySQL databases through tools, resources, and prompts.
MCP MySQL Server is cataloged as an MCP server attributed to enemyrr. A Model Context Protocol server that enables AI models to interact with MySQL databases through tools, resources, and prompts. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP MySQL Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It uses prepared statements to prevent SQL injection and validates queries before execution.
It supports connecting via a database URL, a workspace path, or direct credentials.
README.md · 8c9eec519756 · 采集于 2026-11-13 09:45:51 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A Model Context Protocol server that provides MySQL database operations. This server enables AI models to interact with MySQL databases through a standardized interface.
To install MySQL Database Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @enemyrr/mcp-mysql-server --client claude
git clone https://github.com/enemyrr/mcp-mysql-server.git
cd mcp-mysql-server
npm install
npm run build
mysqlcommandnode /absolute/path/to/mcp-mysql-server/build/index.jsNote: Replace
/absolute/path/to/with the actual path where you cloned and built the project.
You can configure the database connection in three ways:
DATABASE_URL=mysql://user:password@host:3306/database
DB_HOST=localhost
DB_USER=your_user
DB_PASSWORD=your_password
DB_DATABASE=your_database
use_mcp_tool({
server_name: "mysql",
tool_name: "connect_db",
arguments: {
url: "mysql://user:password@host:3306/database"
// OR
workspace: "/path/to/your/project" // Will use project's .env
// OR
host: "localhost",
user: "your_user",
password: "your_password",
database: "your_database"
}
});
Connect to MySQL database using URL, workspace path, or direct credentials.
Execute SELECT queries with optional prepared statement parameters.
use_mcp_tool({
server_name: "mysql",
tool_name: "query",
arguments: {
sql: "SELECT * FROM users WHERE id = ?",
params: [1]
}
});
Execute INSERT, UPDATE, or DELETE queries with optional prepared statement parameters.
use_mcp_tool({
server_name: "mysql",
tool_name: "execute",
arguments: {
sql: "INSERT INTO users (name, email) VALUES (?, ?)",
params: ["John Doe", "john@example.com"]
}
});
List all tables in the connected database.
use_mcp_tool({
server_name: "mysql",
tool_name: "list_tables"
});
Get the structure of a specific table.
use_mcp_tool({
server_name: "mysql",
tool_name: "describe_table",
arguments: {
table: "users"
}
});
Create a new table with specified fields and indexes.
use_mcp_tool({
server_name: "mysql",
tool_name: "create_table",
arguments: {
table: "users",
fields: [
{
name: "id",
type: "int",
autoIncrement: true,
primary: true
},
{
name: "email",
type: "varchar",
length: 255,
nullable: false
}
],
indexes: [
{
name: "email_idx",
columns: ["email"],
unique: true
}
]
}
});
Add a new column to an existing table.
use_mcp_tool({
server_name: "mysql",
tool_name: "add_column",
arguments: {
table: "users",
field: {
name: "phone",
type: "varchar",
length: 20,
nullable: true
}
}
});
Modify an existing column (type, nullable, default, or rename).
use_mcp_tool({
server_name: "mysql",
tool_name: "alter_column",
arguments: {
table: "users",
column: "phone",
type: "varchar",
length: 50,
nullable: false,
newName: "phone_number" // optional: rename column
}
});
Remove a column from a table.
use_mcp_tool({
server_name: "mysql",
tool_name: "drop_column",
arguments: {
table: "users",
column: "phone_number"
}
});
Delete a table (requires confirmation).
use_mcp_tool({
server_name: "mysql",
tool_name: "drop_table",
arguments: {
table: "old_table",
confirm: true
}
});
Remove all rows from a table (requires confirmation).
use_mcp_tool({
server_name: "mysql",
tool_name: "truncate_table",
arguments: {
table: "logs",
confirm: true
}
});
List all accessible databases on the server.
List all indexes on a table.
use_mcp_tool({
server_name: "mysql",
tool_name: "get_indexes",
arguments: {
table: "users"
}
});
List all foreign key relationships for a table.
use_mcp_tool({
server_name: "mysql",
tool_name: "get_foreign_keys",
arguments: {
table: "orders"
}
});
Browse database schema as resources:
| URI | Description |
|---|---|
mysql://schema | Database overview (table count, size) |
mysql://tables | List all tables with metadata |
mysql://tables/{name} | Table details (columns, indexes, FKs) |
mysql://tables/{name}/columns | Column definitions |
mysql://tables/{name}/indexes | Index definitions |
mysql://tables/{name}/sample | Sample 5 rows from table |
Pre-built prompts for common operations:
| Prompt | Description |
|---|---|
generate-select | Build SELECT query for a table |
generate-insert | Generate INSERT template |
generate-update | Generate UPDATE template |
explain-schema | Natural language schema explanation |
suggest-indexes | Index recommendations for a table |
The server provides detailed error messages for:
Contributions are welcome! Please feel free to submit a Pull Request to https://github.com/enemyrr/mcp-mysql-server
MIT
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP MySQL Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-mysql-server-enemyrr)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.