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).
@enemyrr
基本情報
概要はまだありません
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"mcp-mysql-server-enemyrr": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@enemyrr/mcp-mysql-server",
"--client",
"claude"
]
}
}
}ツール一覧はまだありません
この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。
上のボタンで一時的なサンドボックスでこのサーバーを実行し、ツール一覧を取得できます。
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.
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.
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).
All queries support prepared statements, and the server validates queries before execution, using parameterized inputs to prevent injection.
Tools include `create_table`, `add_column`, `alter_column`, `drop_column`, `drop_table`, and `truncate_table`. Destructive operations require a confirmation flag.
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.
Yes, both the `query` and `execute` tools accept a `params` array for parameterized SQL, ensuring safe and efficient query execution.

Model Context Protocol Servers
Universal MCP-Server for your Databases optimized for LLMs and AI-Agents.
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
An official Qdrant Model Context Protocol (MCP) server implementation
コメント