Labsco
MCP SERVER

SQLFluff Analyzer

by antoprince001

Lint, fix and parse a SQL query against the dialect you name, using SQLFluff.

Automated Testing & QA
Summary
SQLFluff's own verdict on a query, instead of a model's opinion of it.

The answers are deterministic: lint_sql returns SQLFluff's rule codes and positions, and fix_sql returns SQL that SQLFluff itself produced. Pass the dialect and the check matches the database you are actually writing for, rather than generic SQL.

What it is

A server that runs SQLFluff over SQL you pass in: linting with rule names and positions, an auto-fixed version, and the parse tree.

What you get
  • Syntax errors and rule violations with start and end position, error code, description, rule name and the fixes SQLFluff can apply (lint_sql)
  • Problems a parser alone misses, trailing commas among them
  • The corrected query returned as SQL you can paste back (fix_sql)
  • The parse tree for a query, for when the problem is structural (parse_sql)
  • A dialect argument on all three tools, plus a dialects://all resource listing every dialect supported
Requirements

Uvx or uv. The published config runs it straight from the Git repository, so there is nothing to install first.

Setup effort

One command — uvx --from git+https://github.com/antoprince001/mcp-server-sqlfluff.git mcp-server-sqlfluff