GoSQLX is an MCP server published by io.github.ajitpratap0, hosted at mcp.gosqlx.dev. When last checked on 2026-11-22 it was working: it answers and lists its tools. It declares 7 tools, including analyze_sql, extract_metadata, format_sql, lint_sql, parse_sql.
SQL validation, formatting, parsing, metadata extraction, linting, and security analysis.
630 connections through 5 shared values. Tap any node.
Inferred from the host name and headers: what a server runs on, not who runs it.
Use this when the user wants a complete review of a SQL query. Runs validate, parse, metadata, security, lint, and format concurrently and returns one composite report; hosts that support MCP Apps render it as an interactive report.
| Parameter | Type | Description |
|---|---|---|
| sql * | string | The SQL string to analyze |
{
"name": "analyze_sql",
"description": "Use this when the user wants a complete review of a SQL query. Runs validate, parse, metadata, security, lint, and format concurrently and returns one composite report; hosts that support MCP Apps render it as an interactive report.",
"inputSchema": {
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"description": "The SQL string to analyze"
}
}
},
"annotations": {
"title": "Analyze SQL",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}None yet. Changes appear after a server's second daily check.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Use this when the user wants the tables, columns, and functions a SQL query references (e.g. for lineage or impact analysis). Returns {tables, columns, functions}.
| Parameter | Type | Description |
|---|---|---|
| sql * | string | The SQL string to analyze |
{
"name": "extract_metadata",
"description": "Use this when the user wants the tables, columns, and functions a SQL query references (e.g. for lineage or impact analysis). Returns {tables, columns, functions}.",
"inputSchema": {
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"description": "The SQL string to analyze"
}
}
},
"annotations": {
"title": "Extract SQL metadata",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use this when the user wants SQL pretty-printed or reformatted: one clause per line, optional upper-case keywords and trailing semicolon. Comments are preserved; unplaceable optimizer hints are refused. Returns {formatted_sql, options}.
| Parameter | Type | Description |
|---|---|---|
| sql * | string | The SQL string to format |
| indent_size | number | Spaces per indent level for nested blocks such as CREATE TABLE columns; clauses always start at column 0. 0 puts each statement on one line (default: 2) |
| add_semicolon | boolean | Append a trailing semicolon (default: false) |
| uppercase_keywords | boolean | true upper-cases all SQL keywords (AND, IN, CASE, ...), but not data type names. false keeps the formatter's casing: clause keywords (SELECT, FROM, WHERE, ...) upper-case, other keywords (e.g. like) may keep their input case (default: false) |
{
"name": "format_sql",
"description": "Use this when the user wants SQL pretty-printed or reformatted: one clause per line, optional upper-case keywords and trailing semicolon. Comments are preserved; unplaceable optimizer hints are refused. Returns {formatted_sql, options}.",
"inputSchema": {
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"description": "The SQL string to format"
},
"indent_size": {
"type": "number",
"description": "Spaces per indent level for nested blocks such as CREATE TABLE columns; clauses always start at column 0. 0 puts each statement on one line (default: 2)"
},
"add_semicolon": {
"type": "boolean",
"description": "Append a trailing semicolon (default: false)"
},
"uppercase_keywords": {
"type": "boolean",
"description": "true upper-cases all SQL keywords (AND, IN, CASE, ...), but not data type names. false keeps the formatter's casing: clause keywords (SELECT, FROM, WHERE, ...) upper-case, other keywords (e.g. like) may keep their input case (default: false)"
}
}
},
"annotations": {
"title": "Format SQL",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use this when the user wants SQL style feedback. Applies the same 10 rules as `gosqlx lint`: L001 trailing whitespace, L002 mixed indentation, L003 consecutive blank lines, L004 indentation depth, L005 line length (>100), L006 column alignment, L007 keyword case (upper), L008 comma placement (trailing), L009 aliasing consistency, L010 redundant whitespace. Returns {violation_count, violations}.
| Parameter | Type | Description |
|---|---|---|
| sql * | string | The SQL string to lint |
{
"name": "lint_sql",
"description": "Use this when the user wants SQL style feedback. Applies the same 10 rules as `gosqlx lint`: L001 trailing whitespace, L002 mixed indentation, L003 consecutive blank lines, L004 indentation depth, L005 line length (>100), L006 column alignment, L007 keyword case (upper), L008 comma placement (trailing), L009 aliasing consistency, L010 redundant whitespace. Returns {violation_count, violations}.",
"inputSchema": {
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"description": "The SQL string to lint"
}
}
},
"annotations": {
"title": "Lint SQL",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use this when the user wants to know how SQL parses: returns an AST summary with the statement count and the type of each statement, optionally for a specific dialect. GO batch separators are excluded from the count.
| Parameter | Type | Description |
|---|---|---|
| sql * | string | The SQL string to parse |
| dialect | string | SQL dialect: generic, postgresql, mysql, mariadb, sqlserver, oracle, sqlite, snowflake, bigquery, redshift, clickhouse |
{
"name": "parse_sql",
"description": "Use this when the user wants to know how SQL parses: returns an AST summary with the statement count and the type of each statement, optionally for a specific dialect. GO batch separators are excluded from the count.",
"inputSchema": {
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"description": "The SQL string to parse"
},
"dialect": {
"enum": [
"generic",
"postgresql",
"mysql",
"mariadb",
"sqlserver",
"oracle",
"sqlite",
"snowflake",
"bigquery",
"redshift",
"clickhouse"
],
"type": "string",
"description": "SQL dialect: generic, postgresql, mysql, mariadb, sqlserver, oracle, sqlite, snowflake, bigquery, redshift, clickhouse"
}
}
},
"annotations": {
"title": "Parse SQL",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use this when the user wants SQL checked for injection patterns: tautologies, UNION attacks, stacked queries, comment bypasses, and more. Returns findings with severity counts.
| Parameter | Type | Description |
|---|---|---|
| sql * | string | The SQL string to scan |
{
"name": "security_scan",
"description": "Use this when the user wants SQL checked for injection patterns: tautologies, UNION attacks, stacked queries, comment bypasses, and more. Returns findings with severity counts.",
"inputSchema": {
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"description": "The SQL string to scan"
}
}
},
"annotations": {
"title": "Scan SQL for injection",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use this when the user wants to know whether a SQL statement is syntactically valid, optionally for a specific dialect. Returns {valid: bool, error?: string, dialect?: string}.
| Parameter | Type | Description |
|---|---|---|
| sql * | string | The SQL string to validate |
| dialect | string | SQL dialect: generic, postgresql, mysql, mariadb, sqlserver, oracle, sqlite, snowflake, bigquery, redshift, clickhouse |
{
"name": "validate_sql",
"description": "Use this when the user wants to know whether a SQL statement is syntactically valid, optionally for a specific dialect. Returns {valid: bool, error?: string, dialect?: string}.",
"inputSchema": {
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"description": "The SQL string to validate"
},
"dialect": {
"enum": [
"generic",
"postgresql",
"mysql",
"mariadb",
"sqlserver",
"oracle",
"sqlite",
"snowflake",
"bigquery",
"redshift",
"clickhouse"
],
"type": "string",
"description": "SQL dialect: generic, postgresql, mysql, mariadb, sqlserver, oracle, sqlite, snowflake, bigquery, redshift, clickhouse"
}
}
},
"annotations": {
"title": "Validate SQL",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}GoSQLX parses, validates, formats, lints, and security-scans SQL locally. All tools are read-only, deterministic, and never connect to a database or execute SQL. Pick the narrowest tool for the request: - analyze_sql: one-shot review of a query (validity, statement types, tables/columns/functions, security findings, lint violations, formatted SQL). Prefer it when the user asks to "review", "check", or "analyze" SQL; hosts that support MCP Apps render it as an interactive report. - validate_sql: is the SQL syntactically valid, optionally for a specific dialect (postgresql, mysql, mariadb, sqlserver, oracle, sqlite, snowflake, clickhouse). - format_sql: pretty-print SQL, one clause per line. Options: uppercase_keywords=true upper-cases all keywords, but not data type names (default false: clause keywords upper-case, other keywords such as like may keep their input case); indent_size=0 puts each statement on one line, larger values only indent nested blocks such as CREATE TABLE columns; add_semicolon appends ";". - parse_sql: statement count and AST statement types. - extract_metadata: tables, columns, and functions referenced. - security_scan: SQL-injection pattern detection (tautologies, UNION-based, stacked queries, comment bypass, ...), with severities. - lint_sql: style rules L001-L010 (whitespace, indentation, line length, alignment, keyword case, comma placement, aliasing). Pass the SQL text exactly as the user wrote it. Results are JSON; summarise them for the user rather than repeating them verbatim.
Names, descriptions and schemas were written by the server and are shown as data.
Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators.