sqlfluff-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| lint_fileA | Lint a SQL file on disk, honoring any .sqlfluff / pyproject.toml config found by walking up from the file's directory. Args: path: Path to the SQL file to lint. config_path: Optional path to an extra config file to layer on top of whatever is discovered by walking the directory tree. |
| fix_fileA | Fix a SQL file on disk, honoring discovered .sqlfluff config. Args: path: Path to the SQL file to fix. write: If True, overwrite the file in place with the fixed SQL. If False (default), just return the fixed SQL without touching the file. config_path: Optional path to an extra config file to layer on top of whatever is discovered by walking the directory tree. |
| parse_fileA | Parse a SQL file on disk and return its parse tree, honoring discovered .sqlfluff config. Args: path: Path to the SQL file to parse. config_path: Optional path to an extra config file to layer on top of whatever is discovered by walking the directory tree. |
| lint_sqlA | Lint a raw SQL string using an explicitly specified dialect. Args: sql: The SQL text to lint. dialect: SQLFluff dialect name, e.g. "ansi", "bigquery", "snowflake", "postgres". See sqlfluff.list_dialects() for the full set. rules: Optional list of rule codes/names to restrict linting to. |
| fix_sqlA | Fix a raw SQL string using an explicitly specified dialect and return the fixed SQL text (does not touch any file). Args: sql: The SQL text to fix. dialect: SQLFluff dialect name, e.g. "ansi", "bigquery", "snowflake", "postgres". rules: Optional list of rule codes/names to restrict fixing to. |
| parse_sqlA | Parse a raw SQL string using an explicitly specified dialect and return its parse tree. Args: sql: The SQL text to parse. dialect: SQLFluff dialect name, e.g. "ansi", "bigquery", "snowflake", "postgres". |
| list_dialectsA | List the SQL dialects SQLFluff supports (for use with lint_sql / fix_sql / parse_sql). |
| clear_config_cacheA | Clear SQLFluff's internal config-file cache. SQLFluff caches the contents of .sqlfluff / pyproject.toml / setup.cfg / tox.ini files it reads while walking up a directory tree (keyed by file path, for the lifetime of this server process). If you edit a config file on disk while this server is running, the *_file tools may keep returning results based on the old contents until this cache is cleared. Call this tool after editing any SQLFluff config file to force the next lint_file / fix_file / parse_file call to re-read it from disk. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
Each tool has a clear, distinct purpose: the three file-based tools operate on paths, the three SQL-based tools operate on raw strings, and list_dialects/clear_config_cache serve separate helper roles. No two tools overlap in a way that would confuse an agent.
All tool names follow a consistent verb_noun pattern: lint/fix/parse paired with file/sql, plus list_dialects and clear_config_cache. The style is uniform (lowercase with underscores) with no mixed conventions.
Eight tools is well-scoped for a SQLFluff wrapper: it covers the core operations (lint, fix, parse) for both file and string inputs, plus a dialect listing and cache-clearing utility. No redundancy and no missing essential operation.
The tool surface covers the main SQLFluff functionality comprehensively—lint, fix, and parse for both files and raw SQL. A few advanced capabilities like rendering or rule-specific configuration are absent, but core workflows are fully supported.