When using the MySQL MCP server, the list_tables and describe_table tools return incorrect results, even though the underlying database connection works correctly.
Environment
- Package: @executeautomation/database-server (latest via npx -y)
- Database: MySQL 8.0 (AWS RDS)
- Claude Code: 2.0.54
Steps to Reproduce
- Configure the MCP server with valid MySQL credentials
- Verify connection works with
read_query:
SELECT 1 AS test; -- Returns: [{"test": 1}] ✓
- Call
list_tables tool
- Call
describe_table with a valid table name (e.g., user)
Expected Behavior
list_tables should return an array of table names
describe_table should return column definitions for existing tables
Actual Behavior
list_tables:
Returns an array of null values matching the table count (748 tables → 748 nulls):
[null, null, null, null, ...]
describe_table:
Returns error for tables that definitely exist:
{"error": "Error describing table: Table 'user' does not exist"}
Workaround
Direct SQL queries against information_schema work correctly:
-- list_tables workaround
SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE();
-- describe_table workaround
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_KEY
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'user';
Suspected Cause
list_tables: Result row parsing issue - possibly accessing wrong property from SHOW TABLES result format
describe_table: Missing database qualification or incorrect empty result check
When using the MySQL MCP server, the list_tables and describe_table tools return incorrect results, even though the underlying database connection works correctly.
Environment
Steps to Reproduce
read_query:list_tablestooldescribe_tablewith a valid table name (e.g., user)Expected Behavior
list_tablesshould return an array of table namesdescribe_tableshould return column definitions for existing tablesActual Behavior
list_tables:Returns an array of null values matching the table count (748 tables → 748 nulls):
[null, null, null, null, ...]
describe_table:Returns error for tables that definitely exist:
{"error": "Error describing table: Table 'user' does not exist"}
Workaround
Direct SQL queries against information_schema work correctly:
--
list_tablesworkaround--
describe_tableworkaroundSuspected Cause
list_tables: Result row parsing issue - possibly accessing wrong property fromSHOW TABLESresult formatdescribe_table: Missing database qualification or incorrect empty result check