GoSQLX

SQL validation, formatting, parsing, metadata extraction, linting, and security analysis.

使うべきか

品質と安全性

A
説明の品質
100%
スキーマの完全性
100%
命名の品質
91%
ポイズニングのリスク
100%
権限の一致
100%
プロトコルへの準拠
100%

ツール定義とプロトコルへの準拠に関する自動分析に基づいています。

コンテキストコスト

~1,041トークン数(ツール定義)
~728 B一般的なレスポンスサイズ
注意への影響は中程度(128k コンテキストの 0.81%)

これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。

インストール

ワンクリックインストール

これを `claude_desktop_config.json` ファイルに追加してください:

{
  "mcpServers": {
    "gosqlx": {
      "url": "https://mcp.gosqlx.dev/mcp"
    }
  }
}

リモートエンドポイント

https://mcp.gosqlx.dev/mcpstreamable-http

できること

ツール一覧

ツール(7)

🟢 読み取り専用🟡 書き込み🔴 削除⚪ 不明
🟢analyze_sql(sql)

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.

入力スキーマ

{
  "type": "object",
  "properties": {
    "sql": {
      "description": "The SQL string to analyze",
      "type": "string"
    }
  },
  "required": [
    "sql"
  ]
}
🟢extract_metadata(sql)

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}.

入力スキーマ

{
  "type": "object",
  "properties": {
    "sql": {
      "description": "The SQL string to analyze",
      "type": "string"
    }
  },
  "required": [
    "sql"
  ]
}
🟢format_sql(add_semicolon, indent_size, sql, uppercase_keywords)

Use this when the user wants SQL pretty-printed or reformatted: one clause per line, optional upper-case keywords and trailing semicolon. Comments are not kept. Returns {formatted_sql, options}.

入力スキーマ

{
  "type": "object",
  "properties": {
    "add_semicolon": {
      "description": "Append a trailing semicolon (default: false)",
      "type": "boolean"
    },
    "indent_size": {
      "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)",
      "type": "number"
    },
    "sql": {
      "description": "The SQL string to format",
      "type": "string"
    },
    "uppercase_keywords": {
      "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. and, or) may keep their input case (default: false)",
      "type": "boolean"
    }
  },
  "required": [
    "sql"
  ]
}
🟢lint_sql(sql)

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}.

入力スキーマ

{
  "type": "object",
  "properties": {
    "sql": {
      "description": "The SQL string to lint",
      "type": "string"
    }
  },
  "required": [
    "sql"
  ]
}
🟢parse_sql(sql)

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.

入力スキーマ

{
  "type": "object",
  "properties": {
    "sql": {
      "description": "The SQL string to parse",
      "type": "string"
    }
  },
  "required": [
    "sql"
  ]
}
🟢security_scan(sql)

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.

入力スキーマ

{
  "type": "object",
  "properties": {
    "sql": {
      "description": "The SQL string to scan",
      "type": "string"
    }
  },
  "required": [
    "sql"
  ]
}
🟢validate_sql(dialect, sql)

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}.

入力スキーマ

{
  "type": "object",
  "properties": {
    "dialect": {
      "description": "SQL dialect: generic, postgresql, mysql, mariadb, sqlserver, oracle, sqlite, snowflake, bigquery, redshift, clickhouse",
      "enum": [
        "generic",
        "postgresql",
        "mysql",
        "mariadb",
        "sqlserver",
        "oracle",
        "sqlite",
        "snowflake",
        "bigquery",
        "redshift",
        "clickhouse"
      ],
      "type": "string"
    },
    "sql": {
      "description": "The SQL string to validate",
      "type": "string"
    }
  },
  "required": [
    "sql"
  ]
}

コミュニティ

このサーバーを評価する

エビデンス

最近の観測

検証済みバージョンは記録されていませんツール 7 件