0.2.0npm · mcp-mysql-server · current release
Observed 2026-08-15T21:10:24.682Z using mcpSecurity-inventory. Status: succeeded. Negotiated protocol: 2025-06-18.
{
"tools": {},
"resources": {},
"prompts": {}
}| Tool | Category | Annotations | Risk |
|---|---|---|---|
add_columnAdd a new column to an existing tableInput 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 parametersInput 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 indexesInput 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 constraintsInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
}
},
"required": [
"table"
]
} | — | — · — | — |
drop_columnRemove a column from a tableInput 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 queryInput 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 tableInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
}
},
"required": [
"table"
]
} | — | — · — | — |
get_indexesList all indexes on a tableInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
}
},
"required": [
"table"
]
} | — | — · — | — |
list_databasesList all accessible databases on the serverInput schema{
"type": "object",
"properties": {}
} | — | — · — | — |
list_tablesList all tables in the connected databaseInput schema{
"type": "object",
"properties": {}
} | — | — · — | — |
queryExecute a SELECT query and return resultsInput 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"
]
} | — | — · — | — |
Get column definitions for a specific table
{
"template_key": "mysql://tables/{table}/columns",
"uri_template": "mysql://tables/{table}/columns",
"name": "Table Columns",
"description": "Get column definitions for a specific table",
"mime_type": "application/json",
"annotations": null,
"metadata_hash": "a93b21a5f5b74b855f08d2cb30a0ad0bd7aa57bd53aac2c67f75cc550f9ff16c"
}Get detailed information about a specific table
{
"template_key": "mysql://tables/{table}",
"uri_template": "mysql://tables/{table}",
"name": "Table Details",
"description": "Get detailed information about a specific table",
"mime_type": "application/json",
"annotations": null,
"metadata_hash": "9d11b0cf058dc373d5cb5356d4503aba51a6c682606fbabcc6a28bd042688078"
}Get index information for a specific table
{
"template_key": "mysql://tables/{table}/indexes",
"uri_template": "mysql://tables/{table}/indexes",
"name": "Table Indexes",
"description": "Get index information for a specific table",
"mime_type": "application/json",
"annotations": null,
"metadata_hash": "8ac5788c7e0bc0f53951f8e28fe5952260ecd5b38846aa763c0ecab367b93244"
}Get sample rows from a specific table (limit 5)
{
"template_key": "mysql://tables/{table}/sample",
"uri_template": "mysql://tables/{table}/sample",
"name": "Table Sample Data",
"description": "Get sample rows from a specific table (limit 5)",
"mime_type": "application/json",
"annotations": null,
"metadata_hash": "aefa2279755d9c6b774aaa07e8981856b6908674f4e4737069691a8cdb02579c"
}Get a natural language explanation of a table structure
{
"prompt_key": "explain-schema",
"name": "explain-schema",
"description": "Get a natural language explanation of a table structure",
"arguments": [
{
"name": "table",
"description": "The table name to explain",
"required": true
}
],
"metadata_hash": "acdff5a6348179acbe4790a8352a5d7680f5a3fd7604ca0a5be52cbb261d3875"
}Generate an INSERT statement template for a table
{
"prompt_key": "generate-insert",
"name": "generate-insert",
"description": "Generate an INSERT statement template for a table",
"arguments": [
{
"name": "table",
"description": "The table name to insert into",
"required": true
}
],
"metadata_hash": "740e599fb80c0a7bad479cbb48d4b10d23d86588261fd8f49533ddfc6ffde23f"
}Generate a SELECT query for a table with optional filters
{
"prompt_key": "generate-select",
"name": "generate-select",
"description": "Generate a SELECT query for a table with optional filters",
"arguments": [
{
"name": "table",
"description": "The table name to query",
"required": true
},
{
"name": "columns",
"description": "Comma-separated list of columns (default: all)",
"required": false
},
{
"name": "where",
"description": "WHERE clause conditions (e.g., \"status = active\")",
"required": false
},
{
"name": "orderBy",
"description": "ORDER BY column(s)",
"required": false
},
{
"name": "limit",
"description": "Maximum number of rows to return",
"required": false
}
],
"metadata_hash": "f3f6fceefb1b2b6f9d6540fc7d1059ab12ad18aaae0400e0fadce81c5ef5246e"
}Generate an UPDATE statement template for a table
{
"prompt_key": "generate-update",
"name": "generate-update",
"description": "Generate an UPDATE statement template for a table",
"arguments": [
{
"name": "table",
"description": "The table name to update",
"required": true
},
{
"name": "where",
"description": "WHERE clause to identify rows to update",
"required": true
}
],
"metadata_hash": "13853e7ffae750d7df8abeeb218b2971c5319664a444e38433fe6196bee1fc5d"
}Analyze a table and suggest potential indexes for optimization
{
"prompt_key": "suggest-indexes",
"name": "suggest-indexes",
"description": "Analyze a table and suggest potential indexes for optimization",
"arguments": [
{
"name": "table",
"description": "The table name to analyze",
"required": true
}
],
"metadata_hash": "a51dd05a6564c80d07d08b7635332d7b5d3aea079bc03f6f53cb6d204872c4d0"
}