
Sqlfmt Mcp
io.github.MukundaKatta由 GitHub 账号 MukundaKatta 发布v0.1.0更新于 Oct 24, 2026
Deterministic SQL formatting across 19 dialects (postgres, mysql, snowflake, bigquery, etc.).
概览
一个本地 MCP 服务器,可对 19 种方言的 SQL 做确定性格式化,让助手输出统一的查询排版。
- 可以做什么
- 按指定方言格式化 SQL 文本,可设置关键字大小写、制表宽度以及使用制表符还是空格,并返回格式化后的文本和行数。列出支持的方言,便于助手在格式化前确认名称。方言包括 ANSI SQL、PostgreSQL、MySQL、Snowflake、BigQuery、SQLite、Spark、Trino 等。
- 适用场景
- 适合助手编写或审查 SQL 时,希望多轮之间保持一致的缩进和关键字大小写;也适合下游工具对 SQL 做差异比较、需要统一规范格式的场景。
- 运行要求
- 通过 npx 从 npm 包 @mukundakatta/sqlfmt-mcp 作为本地进程运行,需要 Node.js 以及下载该包的网络访问。未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Sqlfmt Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@mukundakatta/sqlfmt-mcp
MCP server for deterministic SQL formatting across 19 dialects.
Tools
format_sql(sql, dialect?, keyword_case?, tab_width?, use_tabs?)— format with the named dialect (defaultsqlfor ANSI). Returns formatted text + line count.list_dialects()— return the list of supported dialects so an LLM can confirm before formatting.
Why this exists
LLMs format SQL inconsistently across turns: same query, different indentation, different keyword casing. Code-review agents and downstream tooling that diffs SQL want one canonical form. Wrapping the well-tested sql-formatter library here gives you that.
Supported dialects
sql, bigquery, db2, db2i, duckdb, hive, mariadb, mysql, n1ql, plsql, postgresql, redshift, singlestoredb, snowflake, spark, sqlite, tidb, transactsql, trino.
Install — Claude Desktop
Same shape for Cursor / Cline / Windsurf / Zed.
License
MIT OR Apache-2.0.
来源:packages/sqlfmt-mcp/README.md,提交 6fad5bb
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分