trackmcp
Back to directory
antoprince001

mcp-server-sqlfluff

View on GitHub

SQLFluff Analyzer

0 stars PythonOthers Updated Jun 18, 2025

Documentation

mcp-server-sql-analyzer

A Model Context Protocol (MCP) server that provides SQL analysis, linting, and fixing capabilities using SQLFluff.

Overview

The sqlfluff MCP server provides tools for analyzing and working with SQL queries. It helps with:

  • Lint SQL query and return syntax errors
  • Fix SQL query and return the fixed version.
  • Parse SQL query and return the parsed tree.

Tools

1. lint_sql

    2. fix_sql

      3. parse_sql

        Resources

        SQL Dialect Discovery

        code
        dialects://all

        Returns a list of all supported SQL dialects for use in all tools.

        Configuration

        Using uvx

        Add this to your your MCP client config file:

        json
        {
          "mcpServers": {
              "mcp-server-sqlfluff": {
                  "command": "uvx",
                  "args": [
                      "--from",
                      "git+https://github.com/antoprince001/mcp-server-sqlfluff.git",
                      "mcp-server-sqlfluff"
                  ]
              }
          }
        }

        Using uv

        After cloning this repo, add this to your MCP client config file:

        json
        {
          "mcpServers": {
              "mcp-server-sqlfluff": {
                  "command": "uv",
                  "args": [
                      "--directory",
                      "/path/to/mcp-server-sqlfluff",
                      "run",
                      "mcp-server-sqlfluff"
                  ]
              }
          }
        }

        Development

        To run the server in development mode:

        bash
        # Clone the repository
        git clone git@github.com:antoprince001/mcp-server-sqlfluff.git
        
        # Run the server
        npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-server-sqlfluff run mcp-server-sqlfluff

        To run unit tests:

        bash
        uv run pytest .

        License

        Released under the MIT License. See the LICENSE file for details.

        Frequently asked questions

        What is mcp-server-sqlfluff?

        mcp-server-sqlfluff is SQLFluff Analyzer

        How do I install mcp-server-sqlfluff?

        Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

        Is mcp-server-sqlfluff open source?

        Yes — it is hosted on GitHub at https://github.com/antoprince001/mcp-server-sqlfluff.

        Related MCP tools

        Run your own MCP server? See who uses it and what to fix.

        Measure it with TrackMCP