sqlfluff-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sqlfluff-mcp-serverLint this SQL: SELECT * FROM users WHERE id = 1;"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sqlfluff-mcp-server
An MCP server that exposes SQLFluff's linting, fixing, and parsing over the Model Context Protocol, so any MCP-aware client (Claude, other agents, IDE integrations) can lint and fix SQL directly.
This project is independent of the SQLFluff maintainers — it's a thin wrapper
around the public sqlfluff Python package.
Tools
Tool | Input | Config resolution |
| path on disk | walks up from the file for |
| path on disk (+ | same directory walk |
| path on disk | same directory walk |
| raw SQL text + | none — dialect supplied explicitly |
| raw SQL text + | none — dialect supplied explicitly |
| raw SQL text + | none — dialect supplied explicitly |
| — | lists supported dialect names |
The *_file tools honor project config the same way the sqlfluff CLI does
(via FluffConfig.from_path, which walks up the directory tree looking for
.sqlfluff, pyproject.toml, setup.cfg, or tox.ini). The *_sql tools
are for content that hasn't been written to disk (e.g. streamed from an
editor buffer) and require you to pass dialect explicitly since there's no
file location to resolve config from.
Related MCP server: sql-sop-mcp
Requirements
Python 3.10+
uv (recommended) or
pip
Install
git clone <this-repo-url>
cd sqlfluff-mcp-server
uv sync # or: pip install -e ".[dev]"Run
uv run sqlfluff-mcp-server # or: sqlfluff-mcp-server, if installed on PATHThis starts the server over stdio, the standard transport for MCP clients that launch servers as a subprocess (Claude Desktop, Claude Code, etc.).
Registering with an MCP client
Example Claude Desktop / Claude Code config entry:
{
"mcpServers": {
"sqlfluff": {
"command": "uv",
"args": ["--directory", "/path/to/sqlfluff-mcp-server", "run", "sqlfluff-mcp-server"]
}
}
}Development
uv sync --extra dev
uv run pytest
uv run ruff check .Notes on dependencies
mcpis pinned to<2.0.0. The SDK's 2.0 line restructured the high-level server API (no moremcp.server.fastmcp.FastMCP); this project hasn't been migrated yet.sqlfluffis left unpinned above3.0.0— SQLFluff releases fairly often and this server only depends on its stableLinter/FluffConfigAPI.
License
MIT — see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables integration of Semgrep in development environments via the MCP protocol, supporting static code analysis, rule management, and scan result operations.2MIT
- AlicenseAqualityFmaintenanceMCP server that integrates sql-sop SQL linter into LLM clients, enabling linting SQL queries and listing lint rules via chat tools.2MIT
- Alicense-qualityFmaintenanceRead-only MCP server for SQL databases (SQL Server, Postgres, SQLite) with multi-server support and three-layer safety using AST validation and linting.MIT
- Alicense-qualityDmaintenanceAn MCP server that wraps Spectral to lint OpenAPI specifications, enabling LLMs to validate and fix API definitions.1MIT
Related MCP Connectors
MCP server for interacting with the Supabase platform
MCP server for managing Prisma Postgres.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gswartwood/sqlfluff-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server