← MCP-MySQL Server

MCP-MySQL Server 0.2.0

npm · mcp-mysql-server · current release

14
Tools
0
Resources
4
Templates
5
Prompts

Observation

Observed 2026-08-15T21:10:24.682Z using mcpSecurity-inventory. Status: succeeded. Negotiated protocol: 2025-06-18.

Server capabilities
{
  "tools": {},
  "resources": {},
  "prompts": {}
}

Tools 14

ToolCategoryAnnotationsRisk
add_columnAdd a new column to an existing table
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "field": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Column name"
        },
        "type": {
          "type": "string",
          "description": "MySQL column type"
        },
        "length": {
          "type": "number",
          "description": "Column length"
        },
        "nullable": {
          "type": "boolean",
          "description": "Allow NULL values"
        },
        "default": {
          "type": [
            "string",
            "number",
            "null"
          ],
          "description": "Default value"
        }
      },
      "required": [
        "name",
        "type"
      ],
      "description": "Column definition"
    }
  },
  "required": [
    "table",
    "field"
  ]
}
— · —
alter_columnModify an existing column (type, nullable, default, or rename)
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "column": {
      "type": "string",
      "description": "Column name to modify"
    },
    "type": {
      "type": "string",
      "description": "New column type"
    },
    "length": {
      "type": "number",
      "description": "New column length"
    },
    "nullable": {
      "type": "boolean",
      "description": "Allow NULL values"
    },
    "default": {
      "type": [
        "string",
        "number",
        "null"
      ],
      "description": "New default value"
    },
    "newName": {
      "type": "string",
      "description": "New column name (for renaming)"
    }
  },
  "required": [
    "table",
    "column"
  ]
}
— · —
connect_dbConnect to a MySQL database using URL, workspace config, or direct parameters
Input schema
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Database URL (mysql://user:pass@host:port/db)"
    },
    "workspace": {
      "type": "string",
      "description": "Project workspace path containing .env file"
    },
    "host": {
      "type": "string",
      "description": "Database host"
    },
    "port": {
      "type": "number",
      "description": "Database port (default: 3306)"
    },
    "user": {
      "type": "string",
      "description": "Database user"
    },
    "password": {
      "type": "string",
      "description": "Database password"
    },
    "database": {
      "type": "string",
      "description": "Database name"
    }
  }
}
— · —
create_tableCreate a new table with specified columns and indexes
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Column name"
          },
          "type": {
            "type": "string",
            "description": "MySQL column type"
          },
          "length": {
            "type": "number",
            "description": "Column length"
          },
          "nullable": {
            "type": "boolean",
            "description": "Allow NULL values"
          },
          "default": {
            "type": [
              "string",
              "number",
              "null"
            ],
            "description": "Default value"
          },
          "autoIncrement": {
            "type": "boolean",
            "description": "Auto-increment"
          },
          "primary": {
            "type": "boolean",
            "description": "Primary key"
          }
        },
        "required": [
          "name",
          "type"
        ]
      },
      "description": "Column definitions"
    },
    "indexes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Index name"
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Indexed columns"
          },
          "unique": {
            "type": "boolean",
            "description": "Unique index"
          }
        },
        "required": [
          "name",
          "columns"
        ]
      },
      "description": "Index definitions"
    }
  },
  "required": [
    "table",
    "fields"
  ]
}
— · —
describe_tableGet detailed structure of a table including columns, types, and constraints
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    }
  },
  "required": [
    "table"
  ]
}
— · —
drop_columnRemove a column from a table
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "column": {
      "type": "string",
      "description": "Column name to drop"
    }
  },
  "required": [
    "table",
    "column"
  ]
}
— · —
drop_tableDelete a table (requires confirmation)
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "confirm": {
      "type": "boolean",
      "description": "Set to true to confirm deletion"
    }
  },
  "required": [
    "table",
    "confirm"
  ]
}
— · —
executeExecute an INSERT, UPDATE, or DELETE query
Input schema
{
  "type": "object",
  "properties": {
    "sql": {
      "type": "string",
      "description": "The SQL query (INSERT, UPDATE, DELETE) to execute"
    },
    "params": {
      "type": "array",
      "items": {
        "type": [
          "string",
          "number",
          "boolean",
          "null"
        ]
      },
      "description": "Optional parameters to bind to query placeholders (?)"
    }
  },
  "required": [
    "sql"
  ]
}
— · —
get_foreign_keysList all foreign key relationships for a table
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    }
  },
  "required": [
    "table"
  ]
}
— · —
get_indexesList all indexes on a table
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    }
  },
  "required": [
    "table"
  ]
}
— · —
list_databasesList all accessible databases on the server
Input schema
{
  "type": "object",
  "properties": {}
}
— · —
list_tablesList all tables in the connected database
Input schema
{
  "type": "object",
  "properties": {}
}
— · —
queryExecute a SELECT query and return results
Input schema
{
  "type": "object",
  "properties": {
    "sql": {
      "type": "string",
      "description": "The SQL SELECT query to execute"
    },
    "params": {
      "type": "array",
      "items": {
        "type": [
          "string",
          "number",
          "boolean",
          "null"
        ]
      },
      "description": "Optional parameters to bind to query placeholders (?)"
    }
  },
  "required": [
    "sql"
  ]
}
— · —
truncate_tableRemove all rows from a table (requires confirmation)
Input schema
{
  "type": "object",
  "properties": {
    "table": {
      "type": "string",
      "description": "Table name"
    },
    "confirm": {
      "type": "boolean",
      "description": "Set to true to confirm truncation"
    }
  },
  "required": [
    "table",
    "confirm"
  ]
}
— · —

Resources 0

Resource templates 4

Prompts 5

Let’s talk about MCP security.

Share your details and our security team will contact you.