Skip to main content
Glama
easy-mysql-admin-mcp

easy-mysql-admin-mcp

by chenkumi

easy-mysql-admin-mcp

High-privilege MySQL admin MCP server for database and user/grant management.

Features

  • List, create, and inspect databases

  • List, create, and update users

  • Grant and revoke privileges at database scope

  • Protect destructive actions with short-lived confirmation tokens

Related MCP server: mysql-mcp-server

Available Tools

Tool

Description

mysql_list_databases

List databases in the current MySQL instance

mysql_create_database

Create a database

mysql_describe_database

Inspect database charset and collation settings

mysql_drop_database

Request database deletion and return a confirmation token

mysql_list_users

List MySQL users

mysql_create_user

Create a MySQL user

mysql_alter_user_password

Change a MySQL user password

mysql_grant_privileges

Grant database privileges to a user

mysql_revoke_privileges

Revoke database privileges from a user

mysql_show_grants

Show grants for a user

mysql_drop_user

Request user deletion and return a confirmation token

mysql_confirm_task

Confirm and execute a destructive action token

Safety

  • No raw SQL passthrough

  • No table, view, index, or trigger management

  • DROP DATABASE and DROP USER require mysql_confirm_task

  • Confirmation tokens are random, single-use, and expire quickly

Configuration

Use environment variables, matching the rest of the easy-*-mcp family.

Variable

Required

Default

Description

MYSQL_HOST

Yes

-

MySQL host name or IP address

MYSQL_PORT

No

3306

MySQL port

MYSQL_USER

Yes

-

MySQL user name

MYSQL_PASSWORD

Yes

-

MySQL password

MYSQL_DATABASE

Yes

-

Default database/schema used for the admin connection

MYSQL_CONNECTION_LIMIT

No

10

Maximum number of active pool connections

MYSQL_MAX_IDLE

No

10

Maximum number of idle pool connections

MYSQL_IDLE_TIMEOUT

No

60000

Idle connection timeout in milliseconds

MYSQL_QUEUE_LIMIT

No

0

Maximum queued connection requests

MYSQL_WAIT_FOR_CONNECTIONS

No

true

Whether the pool waits when all connections are busy

MYSQL_ENABLE_KEEP_ALIVE

No

true

Whether TCP keep-alive is enabled

MYSQL_KEEP_ALIVE_INITIAL_DELAY

No

0

Initial TCP keep-alive delay in milliseconds

MYSQL_ADMIN_TOKEN_TTL_SECONDS

No

120

Confirmation token lifetime in seconds

Example

MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=mysql
MYSQL_ADMIN_TOKEN_TTL_SECONDS=120

Claude Desktop Example

{
  "mcpServers": {
    "easy-mysql-admin-mcp": {
      "command": "npx",
      "args": ["-y", "easy-mysql-admin-mcp"],
      "env": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "mysql",
        "MYSQL_ADMIN_TOKEN_TTL_SECONDS": "120"
      }
    }
  }
}

Codex config.toml Example

[mcp_servers.easy-mysql-admin-mcp]
args = ["-y", "easy-mysql-admin-mcp"]
command = "npx"
enabled = true

[mcp_servers.easy-mysql-admin-mcp.env]
MYSQL_HOST = "localhost"
MYSQL_PORT = "3306"
MYSQL_USER = "root"
MYSQL_PASSWORD = "your_password"
MYSQL_DATABASE = "mysql"
MYSQL_ADMIN_TOKEN_TTL_SECONDS = "120"

OpenCode opencode.jsonc Example

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "easy-mysql-admin-mcp": {
      "type": "local",
      "command": ["npx", "-y", "easy-mysql-admin-mcp"],
      "enabled": true,
      "environment": {
        "MYSQL_HOST": "localhost",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "root",
        "MYSQL_PASSWORD": "your_password",
        "MYSQL_DATABASE": "mysql",
        "MYSQL_ADMIN_TOKEN_TTL_SECONDS": "120",
      },
    },
  },
}

Available Tools

12 tools
mysql_alter_user_passwordC

Change a MySQL user password.

Inputs: host (required), user (required), password (required).

mysql_confirm_taskC

Confirm and execute a previously issued destructive action token.

Inputs: token (required).

mysql_create_databaseC

Create a database.

Inputs: database (required).

mysql_create_userC

Create a MySQL user.

Inputs: host (required), user (required), password (required).

mysql_describe_databaseC

Inspect a database definition.

Inputs: database (required).

mysql_drop_databaseA

Request database deletion and return a short-lived confirmation token.

Inputs: database (required).

mysql_drop_userC

Request user deletion and return a short-lived confirmation token.

Inputs: host (required), user (required).

mysql_grant_privilegesC

Grant privileges on a database to a user.

Inputs: host (required), user (required), database (required), privileges (required), +1 more.

mysql_list_databasesA

List databases in the current MySQL instance.

Inputs: no named parameters.

mysql_list_usersA

List MySQL users.

Inputs: no named parameters.

mysql_revoke_privilegesB

Revoke privileges on a database from a user.

Inputs: host (required), user (required), database (required), privileges (required).

mysql_show_grantsC

Show grants for a user.

Inputs: host (required), user (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose—creating, listing, describing, deleting databases and users, managing privileges and passwords, and confirming destructive actions. No ambiguity.

    Naming Consistency5/5

    All tools follow a consistent 'mysql_verb_noun' pattern (e.g., mysql_create_database, mysql_revoke_privileges) using snake_case throughout.

    Tool Count5/5

    With 12 tools, the set is well-scoped for MySQL administration—covering database and user management, privileges, and password changes without being excessive.

    Completeness4/5

    Covers core lifecycle operations (create/read/delete) for databases and users, plus grant/revoke, password change, and a safety mechanism for drops. Missing update operations (e.g., rename database or user) but these are minor gaps.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A production-ready MCP server for MySQL database operations, providing secure HTTP endpoints for read-only queries, performance analysis, and server monitoring.
      22
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A generic MCP server for MySQL operations, enabling listing databases/tables, describing schemas, running read-only SQL, and optionally executing write SQL with logging.
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      A read-only MySQL MCP server supporting stdio, SSE, and Streamable HTTP transports, enabling secure querying and schema inspection of MySQL databases from MCP clients.
      3
      MIT