sql-query-mcp
v0.4.1Read-only SQL MCP server for PostgreSQL and MySQL.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_connections
List configured SQL connections by connection_id.
list_schemas
List visible schemas for a PostgreSQL connection.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string |
list_databases
List visible databases for a MySQL or Hive connection.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string |
list_tables
List tables and views for a resolved schema or database.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
database | ||
schema |
describe_table
Describe columns, keys, and indexes for a table.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
table_name * | string | |
database | ||
schema |
run_select
Run a read-only SELECT or CTE query.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
sql * | string | |
limit |
explain_query
Run EXPLAIN on a read-only SELECT or CTE query.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
sql * | string | |
analyze | boolean |
get_table_sample
Fetch a small sample from a table for schema discovery.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
table_name * | string | |
database | ||
limit | ||
schema |
export_query_file
Export a read-only query result to a local CSV or XLSX file.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
output_path * | string | |
sql * | string | |
export_all | boolean | |
file_name | ||
format | string | |
limit | ||
overwrite | boolean |
start_query
Start an asynchronous read-only SELECT or CTE query.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
sql * | string | |
limit |
get_query
Get asynchronous query status and paginated results when complete.
| Parameter | Type | Description |
|---|---|---|
query_id * | string | |
limit | ||
offset | integer |
cancel_query
Cancel a running asynchronous query.
| Parameter | Type | Description |
|---|---|---|
query_id * | string |
import_table_file
Import a local CSV or XLSX file into an existing table.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
file_path * | string | |
table_name * | string | |
database | ||
schema | ||
sheet_name |