fabric-dw — Claude Code MCP server for Microsoft Fabric SQL
An MCP server and CLI for Microsoft Fabric Data Warehouses and SQL Analytics Endpoints: run queries, read plans, check permissions and statistics from your agent.
claude mcp add --env FABRIC_AUTH=<FABRIC_AUTH> --env FABRIC_MCP_READONLY=<FABRIC_MCP_READONLY> --env FABRIC_MCP_ALLOW_DESTRUCTIVE=<FABRIC_MCP_ALLOW_DESTRUCTIVE> --env FABRIC_MCP_WORKSPACES=<FABRIC_MCP_WORKSPACES> --env FABRIC_MCP_ALLOW_REMOTE=<FABRIC_MCP_ALLOW_REMOTE> --transport stdio fabric-dw -- docker run -i --rm -e FABRIC_AUTH -e FABRIC_MCP_READONLY -e FABRIC_MCP_ALLOW_DESTRUCTIVE -e FABRIC_MCP_WORKSPACES -e FABRIC_MCP_ALLOW_REMOTE ghcr.io/sdebruyn/fabric-dw:2026.9.0What fabric-dw does
fabric-dw ships two ways into Microsoft Fabric: the fdw command line tool and an MCP server that hands the same operations to an AI assistant as tools. Covered objects include workspaces, warehouses, SQL endpoints, schemas, tables, views, queries, snapshots, restore points, audit, statistics, permissions and SQL pools.
Auth runs through the FABRIC_AUTH variable. The default mode follows the DefaultAzureCredential chain from azure-identity: environment variables, workload or managed identity, Azure CLI, Azure Developer CLI, Azure PowerShell, then an interactive browser. Any one of them is enough — so on a box with no Azure credentials configured, the server has nothing to authenticate with.
Bundled Claude skills — query-optimizer, warehouse-performance and dbt-setup — arrive with the server through the plugin marketplace, one pair of commands for Claude and GitHub Copilot CLI. You can pin a workspace once with fdw config set workspace <NAME> and drop -w from later calls. A Docker image is published too: its default ENTRYPOINT is the MCP server, and you override it to fabric-dw when you want the CLI.
On the CLI side, fdw sql plan renders an estimated plan as SVG without SSMS or Windows, fdw queries running lists what is executing right now, fdw tables read shows a table as it looked at an earlier point, and fdw tables export writes a point-in-time snapshot to Parquet.
What it helps with
- run a SQL query against a Fabric warehouse from the terminal
- render an estimated query plan as SVG without SSMS
- find long-running queries from the past hour
- export a point-in-time table snapshot to Parquet
- grant or deny access at the column level
Example prompts for the agent
- Show me what is running right now in SalesWH
- Export dbo.orders as it looked two hours ago to Parquet
- Read the plan in
query.sqland tell me what to rewrite
How to install fabric-dw
Platform CLI
claude mcp add --env FABRIC_AUTH=<FABRIC_AUTH> --env FABRIC_MCP_READONLY=<FABRIC_MCP_READONLY> --env FABRIC_MCP_ALLOW_DESTRUCTIVE=<FABRIC_MCP_ALLOW_DESTRUCTIVE> --env FABRIC_MCP_WORKSPACES=<FABRIC_MCP_WORKSPACES> --env FABRIC_MCP_ALLOW_REMOTE=<FABRIC_MCP_ALLOW_REMOTE> --transport stdio fabric-dw -- docker run -i --rm -e FABRIC_AUTH -e FABRIC_MCP_READONLY -e FABRIC_MCP_ALLOW_DESTRUCTIVE -e FABRIC_MCP_WORKSPACES -e FABRIC_MCP_ALLOW_REMOTE ghcr.io/sdebruyn/fabric-dw:2026.9.0Replace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
codex mcp add fabric-dw --env FABRIC_AUTH=<FABRIC_AUTH> --env FABRIC_MCP_READONLY=<FABRIC_MCP_READONLY> --env FABRIC_MCP_ALLOW_DESTRUCTIVE=<FABRIC_MCP_ALLOW_DESTRUCTIVE> --env FABRIC_MCP_WORKSPACES=<FABRIC_MCP_WORKSPACES> --env FABRIC_MCP_ALLOW_REMOTE=<FABRIC_MCP_ALLOW_REMOTE> -- docker run -i --rm -e FABRIC_AUTH -e FABRIC_MCP_READONLY -e FABRIC_MCP_ALLOW_DESTRUCTIVE -e FABRIC_MCP_WORKSPACES -e FABRIC_MCP_ALLOW_REMOTE ghcr.io/sdebruyn/fabric-dw:2026.9.0Replace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"mcpServers": {
"fabric-dw": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"FABRIC_AUTH",
"-e",
"FABRIC_MCP_READONLY",
"-e",
"FABRIC_MCP_ALLOW_DESTRUCTIVE",
"-e",
"FABRIC_MCP_WORKSPACES",
"-e",
"FABRIC_MCP_ALLOW_REMOTE",
"ghcr.io/sdebruyn/fabric-dw:2026.9.0"
],
"env": {
"FABRIC_AUTH": "<FABRIC_AUTH>",
"FABRIC_MCP_READONLY": "<FABRIC_MCP_READONLY>",
"FABRIC_MCP_ALLOW_DESTRUCTIVE": "<FABRIC_MCP_ALLOW_DESTRUCTIVE>",
"FABRIC_MCP_WORKSPACES": "<FABRIC_MCP_WORKSPACES>",
"FABRIC_MCP_ALLOW_REMOTE": "<FABRIC_MCP_ALLOW_REMOTE>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"servers": {
"fabric-dw": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"FABRIC_AUTH",
"-e",
"FABRIC_MCP_READONLY",
"-e",
"FABRIC_MCP_ALLOW_DESTRUCTIVE",
"-e",
"FABRIC_MCP_WORKSPACES",
"-e",
"FABRIC_MCP_ALLOW_REMOTE",
"ghcr.io/sdebruyn/fabric-dw:2026.9.0"
],
"env": {
"FABRIC_AUTH": "<FABRIC_AUTH>",
"FABRIC_MCP_READONLY": "<FABRIC_MCP_READONLY>",
"FABRIC_MCP_ALLOW_DESTRUCTIVE": "<FABRIC_MCP_ALLOW_DESTRUCTIVE>",
"FABRIC_MCP_WORKSPACES": "<FABRIC_MCP_WORKSPACES>",
"FABRIC_MCP_ALLOW_REMOTE": "<FABRIC_MCP_ALLOW_REMOTE>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
gemini mcp add -e FABRIC_AUTH=<FABRIC_AUTH> -e FABRIC_MCP_READONLY=<FABRIC_MCP_READONLY> -e FABRIC_MCP_ALLOW_DESTRUCTIVE=<FABRIC_MCP_ALLOW_DESTRUCTIVE> -e FABRIC_MCP_WORKSPACES=<FABRIC_MCP_WORKSPACES> -e FABRIC_MCP_ALLOW_REMOTE=<FABRIC_MCP_ALLOW_REMOTE> fabric-dw docker run -i --rm -e FABRIC_AUTH -e FABRIC_MCP_READONLY -e FABRIC_MCP_ALLOW_DESTRUCTIVE -e FABRIC_MCP_WORKSPACES -e FABRIC_MCP_ALLOW_REMOTE ghcr.io/sdebruyn/fabric-dw:2026.9.0Replace <…> with your own values. 1 more environment variable is in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fabric-dw
How do I install fabric-dw in Claude Code?
Run `claude mcp add --env FABRIC_AUTH=<FABRIC_AUTH> --env FABRIC_MCP_READONLY=<FABRIC_MCP_READONLY> --env FABRIC_MCP_ALLOW_DESTRUCTIVE=<FABRIC_MCP_ALLOW_DESTRUCTIVE> --env FABRIC_MCP_WORKSPACES=<FABRIC_MCP_WORKSPACES> --env FABRIC_MCP_ALLOW_REMOTE=<FABRIC_MCP_ALLOW_REMOTE> --transport stdio fabric-dw -- docker run -i --rm -e FABRIC_AUTH -e FABRIC_MCP_READONLY -e FABRIC_MCP_ALLOW_DESTRUCTIVE -e FABRIC_MCP_WORKSPACES -e FABRIC_MCP_ALLOW_REMOTE ghcr.io/sdebruyn/fabric-dw:2026.9.0`.
What does fabric-dw do?
It exposes Microsoft Fabric Data Warehouse and SQL Analytics Endpoint operations to your agent: warehouses, tables, statistics, permissions, snapshots. The fdw CLI covers the same ground from a shell.
What do I need before running fabric-dw?
Working Azure credentials. The DefaultAzureCredential chain reads them from environment variables, managed identity, Azure CLI, Azure Developer CLI, Azure PowerShell or a browser sign-in, and FABRIC_AUTH switches the mode.