MCP.so
ログイン

Production Safe Mysql MCP Server

@turkeryildirim

基本情報

カテゴリ

データベース

トランスポート

stdio

作者

turkeryildirim

投稿者

Türker YILDIRIM

Production Safe Mysql MCP Server について

概要はまだありません

Production Safe Mysql MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mysql": {
      "command": "node",
      "args": [
        "/absolute/path/to/mysql-mcp/dist/index.js"
      ],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "mcp_user",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "",
        "MAX_ROWS": "1000",
        "ALLOW_DESTRUCTIVE_DDL": "false"
      }
    }
  }
}

Production Safe Mysql MCP Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is Production Safe Mysql Mcp Server?

Production Safe Mysql Mcp Server is an Model Context Protocol (MCP) server that provides AI agents with direct, controlled access to MySQL databases. It supports data query and mutation, schema management, database administration, and introspection, with built-in safety restrictions to prevent destructive or system-level operations.

How to use Production Safe Mysql Mcp Server?

Install Node.js 20+, clone the repository, run npm install and npm run build, then copy .env.example to .env and configure MySQL credentials. Integrate with Claude Desktop via claude_desktop_config.json or with Claude CLI using .mcp.json or claude mcp add. All tools accept a database parameter for multi-database access within the same session.

Key features of Production Safe Mysql Mcp Server

  • execute_query – Run SELECT, INSERT, UPDATE, DELETE with parameterized queries
  • execute_transaction – Execute atomic batches with automatic rollback on failure
  • Schema management: create_table, alter_table, drop_table (with flag)
  • Database management: list_databases, create_database, drop_database (with flag)
  • Introspection tools: ping, show_columns, get_server_info
  • Multi-database support via database parameter on every tool
  • Security filter permanently blocks user/privilege/replication/file/plugin commands

Use cases of Production Safe Mysql Mcp Server

  • Query and view table structures in natural language
  • Insert, update, or delete rows with parameterized safety
  • Run multi‑statement operations as a single atomic transaction
  • Create or alter tables and databases through AI agent commands
  • Inspect server version, character set, and connection health

よくある質問

1

What operations are permanently blocked?

Commands in categories like MySQL settings (`SET GLOBAL`), user/privilege management (`CREATE USER`, `GRANT`), system commands (`FLUSH`, `KILL`), replication, file access (`SELECT INTO OUTFILE`), and plugins (`INSTALL PLUGIN`) are blocked and cannot be bypassed.

2

How do I enable `drop_table` or `drop_database`?

Set the environment variable `ALLOW_DESTRUCTIVE_DDL=true`. By default (`false`), these tools return an error. This flag can be disabled for production safety.

3

What is the maximum number of rows returned?

Query results are capped by the `MAX_ROWS` environment variable (default 1000). For large tables, add a `LIMIT` clause.

4

Can I execute multiple SQL statements in one call?

No. Multiple statements separated by semicolons are not allowed in a single tool call. Use `execute_transaction` to run multiple statements atomically.

5

Do I need a separate MySQL user?

Yes, it is recommended to create a dedicated user with only the necessary grants (`SELECT`, `INSERT`, `UPDATE`, `DELETE`, `CREATE`, `DROP`, `ALTER`, `INDEX`) and avoid granting `SUPER`, `FILE`, `RELOAD`, or `GRANT OPTION`.

コメント

「データベース」の他のコンテンツ