mcp-server-sql-analyzer

mcp-server-sql-analyzer

3.5

If you are the rightful owner of mcp-server-sql-analyzer and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server that provides SQL analysis, linting, and dialect conversion capabilities using SQLGlot.

The SQL Analyzer MCP server provides tools for analyzing and working with SQL queries. It helps with SQL syntax validation and linting, converting queries between different SQL dialects (e.g., MySQL to PostgreSQL), extracting and analyzing table references and dependencies, identifying column usage and relationships, and discovering supported SQL dialects. This server enhances the ability to work with SQL efficiently by offering query validation, dialect conversion, code analysis, and compatibility checking. It ensures the provision of correct and dialect-appropriate queries, accurate syntax conversion, and understanding of complex queries, making it easier to explain query structure and suggest optimizations. This toolset allows for more accurate and helpful SQL-related assistance while reducing the risk of syntax errors or dialect-specific issues.

Features

  • SQL syntax validation and linting
  • Converting queries between different SQL dialects
  • Extracting and analyzing table references and dependencies
  • Identifying column usage and relationships
  • Discovering supported SQL dialects

Tools

  1. lint_sql

    Validates SQL query syntax and returns any errors

  2. transpile_sql

    Converts SQL between different dialects

  3. get_all_table_references

    Extracts table and CTE references from SQL

  4. get_all_column_references

    Extracts column references with table context