execute_query
Executes a read-only SQL query.
How to use it
execute_query is exposed by the Mysql MCP Server MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the execute_query tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Mysql MCP Server
$
npx -y @smithery/cli install @dpflucas/mysql-mcp-server --client claudeOther tools in Mysql MCP Server (6)
database
(optional): Database name (uses default if not specified)
describe_table
Shows the schema for a specific table.
list_databases
Lists all accessible databases on the MySQL server.
list_tables
Lists all tables in a specified database.
query
(required): SQL query (only SELECT, SHOW, DESCRIBE, and EXPLAIN statements are allowed)
table
(required): Table name