fabric-dw

io.github.sdebruynPublished by GitHub account sdebruynv2026.9.0Updated Oct 24, 2026

MCP server for Microsoft Fabric Data Warehouses and SQL Analytics Endpoints

The publisher's own server: Fabric

Overview

AI-generated overview

An MCP server for Microsoft Fabric Data Warehouses and SQL Analytics Endpoints, letting an assistant query, administer, optimize and secure them.

What you can do
Browse workspaces, warehouses, SQL endpoints, schemas, tables and views, and run or explain SQL queries against them, including estimated execution plans and point-in-time snapshots or exports to Parquet. Monitor query activity: list running, long-running or frequent queries and kill runaway sessions. Inspect and manage statistics, re-cluster tables, and handle restore points and audit data. Manage governance: grant or deny SQL permissions, column-level security and row-level security policies. Load local Parquet files into tables and scaffold dbt-fabric projects.
When to use it
Use it when an assistant should work directly with a Fabric data warehouse or SQL analytics endpoint: exploring schemas, running and tuning queries, checking performance, or applying permissions, without switching to SSMS or the portal.
Requirements
Runs locally over stdio, typically via uvx from the fabric-dw package or the published container image. Needs Azure credentials for Fabric, selected with FABRIC_AUTH (default credential chain, service principal with AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET, or interactive browser sign-in). Optionally set FABRIC_MCP_WORKSPACES to limit scope.
Before you install
The server can change data and permissions: mutating tools are available unless FABRIC_MCP_READONLY is set, and permanently destructive tools such as delete, clear_table and restore_warehouse_in_place stay off until FABRIC_MCP_ALLOW_DESTRUCTIVE is set. Unset FABRIC_MCP_WORKSPACES allows every workspace. Service principal secrets are passed as environment variables. The optional HTTP transport has no built-in authentication or TLS and should sit behind an authenticating reverse proxy.

Installation

In SourceWeft

  1. Open fabric-dw 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

[fabric-dw logo]

fabric-dw

[Documentation] [CI] [codecov] [PyPI version] [Python versions] [License]

Python CLI and MCP server for Microsoft Fabric Data Warehouses and SQL Analytics Endpoints: administer, query, optimize, and secure them from your terminal or your AI agent.

Full documentation: fdw.debruyn.dev

📣 Just announced! Read the story behind fabric-dw in the announcement blog post.

Description

fabric-dw provides two interfaces for managing Microsoft Fabric Data Warehouses and SQL Analytics Endpoints:

  • CLI: a command-line tool for common DW administration tasks.
  • MCP server: a Model Context Protocol server that exposes DW operations as tools for AI assistants.

Authentication is configured via the FABRIC_AUTH environment variable. The default (FABRIC_AUTH=default) uses azure-identity DefaultAzureCredential, which walks environment variables, Workload/Managed Identity, Azure CLI, Azure Developer CLI, Azure PowerShell, and interactive browser in order. Any of these will satisfy it. See the Authentication docs for the full chain, all supported sources, and debugging tips.

Installation

bash
pip install fabric-dw# or run without installing:uvx fabric-dw --help# or install persistently on PATH:uv tool install fabric-dw

After installation, the fdw command is a short alias for fabric-dw; both invoke the same entry point. See the Install docs for MCP server setup, upgrading, and prerelease builds.

Quick Start

CLI

The workspace is a global root option -w / --workspace placed before the command group. Set a default once with fdw config set workspace <NAME> and omit -w on every subsequent call. Workspace resolution order: (1) -w flag, (2) FABRIC_DW_DEFAULT_WORKSPACE env var, (3) configured default.

bash
# Run without installing; install to get the fdw aliasuvx fabric-dw --help
# Set a default workspace once; all subsequent commands pick it upfdw config set workspace SalesWS
bash
# -- Run and explain SQL --
# Execute a query against a warehousefdw sql exec SalesWH -q "SELECT TOP 10 * FROM dbo.orders ORDER BY order_date DESC"
# Capture an estimated execution plan as SVG -- no SSMS or Windows neededfdw sql plan SalesWH -f query.sql --format svg -o plan.svg
# -- Performance mission-control --
# See what is running right nowfdw queries running SalesWH
# Long-running queries from the past hourfdw queries long-running SalesWH --ago 1h
# Kill a runaway session by IDfdw queries kill SalesWH 55
# Most-repeated queries over the past 24 hoursfdw queries frequent SalesWH --ago 24h
# -- Optimize --
# Inspect a statistics histogram with inline terminal bar chartsfdw statistics show SalesWH dbo.orders st_order_date --histogram
# Re-cluster a table on a new key (transactional CTAS-swap, auto-rollback on failure)fdw tables cluster-by SalesWH dbo.orders --cluster-by customer_id
# -- Time travel + export --
# Browse the table as it looked 2 hours agofdw tables read SalesWH dbo.orders --ago 2h
# Export a point-in-time snapshot to Parquetfdw tables export SalesWH dbo.orders --output snapshot.parquet --ago 2h
# -- Governance --
# Grant SELECT on a specific tablefdw permissions sql grant SalesWH SELECT --to [email protected] --object dbo.orders
# Deny access to sensitive columns (column-level security)fdw permissions cls deny SalesWH SELECT --to [email protected] \    --object dbo.orders --columns salary,bonus
# Create a row-level security policy (filter rows by SalesRep)fdw permissions rls create SalesWH rls.SalesFilter \    --filter "rls.fn_sales_filter(SalesRep)" --on dbo.orders
# -- Load + scaffold --
# Load a local Parquet file and auto-create the table from its schemafdw tables load SalesWH dbo.orders --file orders.parquet --create
# Scaffold a full dbt-fabric project wired to the warehousefdw dbt init SalesWH ./my-dbt-project --project-name sales_dw --with-sources

MCP Server

Add to your MCP client configuration (e.g. Claude Desktop, VS Code):

json
{  "mcpServers": {    "fabric-dw": {      "command": "uvx",      "args": ["--from", "fabric-dw", "fabric-dw-mcp"]    }  }}

The MCP server exposes all CLI operations as MCP tools (workspaces, warehouses, SQL endpoints, schemas, tables, views, queries, snapshots, restore points, audit, statistics, permissions, sql-pools). Bundled Claude Code agent skills (query-optimizer, warehouse-performance, dbt-setup) are included for deeper AI-assisted analysis. Set FABRIC_AUTH in the environment if you need a non-default auth mode.

Both the skills and the MCP server install in one command via the fabric-dw plugin marketplace, for Claude Code and GitHub Copilot CLI alike: /plugin marketplace add sdebruyn/fabric-dw-mcp-cli then /plugin install fabric-dw@fabric-dw. See the Agent Skills docs for details.

Run in Docker

The Docker image's default ENTRYPOINT is the MCP server (fabric-dw-mcp). Use it as-is with your MCP client, or override the entrypoint to run the CLI instead.

bash
docker pull ghcr.io/sdebruyn/fabric-dw:latest
# Run the MCP server (default entrypoint, connect via stdio from your MCP client):docker run --rm -i \  -e AZURE_CLIENT_ID=… \  -e AZURE_TENANT_ID=… \  -e AZURE_CLIENT_SECRET=… \  -e FABRIC_AUTH=sp \  ghcr.io/sdebruyn/fabric-dw
# Run the CLI instead (override the entrypoint):docker run --rm \  --entrypoint fabric-dw \  -e AZURE_CLIENT_ID=… \  -e AZURE_TENANT_ID=… \  -e AZURE_CLIENT_SECRET=… \  -e FABRIC_AUTH=sp \  ghcr.io/sdebruyn/fabric-dw --help

Dev images (built from every main merge): ghcr.io/sdebruyn/fabric-dw:main or :<version>.dev<N>.

Package page: ghcr.io/sdebruyn/fabric-dw

Security environment variables
VariableDefaultDescription
FABRIC_MCP_READONLYunsetSet to 1 to restrict execute_sql to SELECT/WITH and block all mutating tools.
FABRIC_MCP_ALLOW_DESTRUCTIVEunsetSet to 1 to enable permanently-destructive tools (delete_*, clear_table, restore_warehouse_in_place). Disabled by default.
FABRIC_MCP_WORKSPACESunsetComma-separated workspace names or GUIDs the server may touch. Unset = all workspaces allowed.
FABRIC_MCP_ALLOW_REMOTEunsetSet to 1 to allow the HTTP transport (--transport http) to bind on a non-loopback address. A warning is logged; ensure an authenticating reverse proxy with TLS fronts the endpoint, and pass --allowed-host so Host validation stays on. See Hosting the MCP server.
HTTP transport

The MCP server can be started in HTTP mode for remote clients:

bash
fabric-dw-mcp --transport http [--host 127.0.0.1] [--port 8000]

It binds to loopback by default, where Host and Origin validation is handled for you. Binding anywhere else requires FABRIC_MCP_ALLOW_REMOTE=1 and --allowed-host, and the endpoint has no built-in authentication or TLS, so always front it with an authenticating reverse proxy. See Hosting the MCP server for that setup.

Develop in a container

Open the repo in GitHub Codespaces or VS Code's Remote-Containers extension. The devcontainer pre-installs Python 3.14, uv, Azure CLI, and the GitHub CLI.

[Open in GitHub Codespaces]

Contributing

See CONTRIBUTING.md for dev setup, branch flow, and how to run tests locally.

📖 Docs: fdw.debruyn.dev (or run uv run --only-group docs zensical serve locally).

Security

Please report vulnerabilities privately. See SECURITY.md.

Code of Conduct

This project follows the Contributor Covenant 2.1.

License

MIT. Copyright (c) 2026 Sam Debruyn

Source: README.md at commit a85c04c

Tools

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

Version history

1
  1. v2026.9.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

Other Fabric integrations