Sqlfmt Mcp

io.github.MukundaKattaPublished by GitHub account MukundaKattav0.1.0Updated Oct 24, 2026

Deterministic SQL formatting across 19 dialects (postgres, mysql, snowflake, bigquery, etc.).

VerifiedSTDIODesktop onlyDatabasesDeveloper Tools

Overview

AI-generated overview

A local MCP server that formats SQL deterministically across 19 dialects, giving assistants one canonical layout for queries.

What you can do
Format SQL text with a chosen dialect and options for keyword casing, tab width and tabs versus spaces, returning the formatted text and a line count. List the supported dialects so the assistant can confirm a name before formatting. Dialects include ANSI SQL, PostgreSQL, MySQL, Snowflake, BigQuery, SQLite, Spark, Trino and others.
When to use it
Useful when an assistant writes or reviews SQL and you want consistent indentation and keyword casing across turns, or when downstream tooling diffs SQL and needs one canonical form.
Requirements
Runs as a local process via npx from the npm package @mukundakatta/sqlfmt-mcp, so Node.js and network access for the package download are needed. No authentication, environment variables or headers are declared.
Before you install
Formatting only rewrites the SQL text passed to it; it does not execute queries. The package is fetched and run locally through npx, so review the package source if you need assurance about what runs on your machine.

Installation

In SourceWeft

  1. Open Sqlfmt Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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 (default sql for 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

json
{  "mcpServers": {    "sqlfmt": { "command": "npx", "args": ["-y", "@mukundakatta/sqlfmt-mcp"] }  }}

Same shape for Cursor / Cline / Windsurf / Zed.

License

MIT OR Apache-2.0.

Source: packages/sqlfmt-mcp/README.md at commit 6fad5bb

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts