Force Fabric MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/tmdaidevs/Force-Fabric-MCP-Server.git
cd Force-Fabric-MCP-Server
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add force-fabric -- node "<FULL_PATH_TO_FORCE_FABRIC_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_FORCE_FABRIC_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

README.md

Detect issues. Auto-fix problems. Optimize your Fabric tenant.

Force Fabric MCP Server

Detect issues. Auto-fix problems. Optimize your Fabric tenant. An MCP server that scans Lakehouses, Warehouses, Eventhouses, and Semantic Models with 120 rules — and can auto-fix 45 of them.

Quick Start • Detect • Auto-Fix • Rules • Architecture


✨ Key Features

🔍 Detect — 120 Rules Across 4 Fabric Items

Item Rules What's Scanned
🏠 Lakehouse 29 SQL Endpoint + OneLake Delta Log (VACUUM history, file sizes, partitioning, retention)
🏗️ Warehouse 39 Schema, query performance, security (PII, RLS), database config
📊 Eventhouse 20/db Extent fragmentation, caching/retention/merge/encoding/partitioning policies, ingestion, query performance, materialized views, stored functions
📐 Semantic Model 32 DAX expression anti-patterns, model structure, COLUMNSTATISTICS BPA
120 total

🔧 Fix — 45 Auto-Fixable Issues

Item Auto-Fixes Method
🏗️ Warehouse 12 fixes SQL DDL executed directly
🏠 Lakehouse 14 fixes REST API (3) + Notebook Spark SQL (11)
📐 Semantic Model 12 fixes model.bim REST API (6) + Notebook sempy (6)
📊 Eventhouse 7 fixes KQL management commands (with dry-run preview)
45 total

📊 Unified Output

Every scan returns a clean results table — only issues shown, passed rules counted in summary:

29 rules — ✅ 18 passed | 🔴 1 failed | 🟡 10 warning

| Rule | Status | Finding | Recommendation |
|------|--------|---------|----------------|
| LH-007 Key Columns Are NOT NULL | 🔴 | 16 key column(s) allow NULL: table.finding_id, ... | Add NOT NULL constraints |
| LH-017 Regular VACUUM Executed | 🟡 | 4 table(s) need VACUUM: table1, table2, ... | Run VACUUM weekly |

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • Azure CLI with az login completed
  • Fabric capacity with items to scan

Install

git clone https://github.com/tmdaidevs/Force-Fabric-MCP-Server.git
cd Force-Fabric-MCP-Server
npm install
npm run build

Configure VS Code

Add to .vscode/mcp.json in your project:

{
  "servers": {
    "fabric-optimization": {
      "type": "stdio",
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/path/to/Force-Fabric-MCP-Server"
    }
  }
}

Use

1. "Login to Fabric with azure_cli"
2. "List all lakehouses in workspace <id>"
3. "Scan lakehouse <id> in workspace <id>"
4. "Fix warehouse <id> in workspace <id>"

🔍 Detect & Scan

Available Scan Tools

Tool What It Does
lakehouse_optimization_recommendations Scans SQL Endpoint + reads Delta Log files from OneLake
warehouse_optimization_recommendations Connects via SQL and runs 39 diagnostic queries
warehouse_analyze_query_patterns Focused analysis of slow/frequent/failed queries
eventhouse_optimization_recommendations Runs KQL diagnostics on each KQL database
semantic_model_optimization_recommendations Executes DAX + MDSCHEMA DMVs for BPA analysis

Data Sources Used

                          ┌─────────────────────────────────────┐
                          │         Fabric REST API             │
                          │  Workspaces, Items, Metadata        │
                          └──────────────┬──────────────────────┘
                                         │
          ┌──────────────┬───────────────┼───────────────┬──────────────┐
          ▼              ▼               ▼               ▼              ▼
   ┌─────────────┐ ┌──────────┐ ┌──────────────┐ ┌──────────┐ ┌──────────────┐
   │  SQL Client │ │ KQL REST │ │ OneLake ADLS │ │ DAX API  │ │ MDSCHEMA DMV │
   │  (tedious)  │ │   API    │ │  Gen2 API    │ │executeQry│ │  via REST    │
   └──────┬──────┘ └────┬─────┘ └──────┬───────┘ └────┬─────┘ └──────┬───────┘
          │              │              │              │              │
    Lakehouse SQL   Eventhouse    Delta Log JSON   Semantic     Semantic
    Warehouse SQL   KQL DBs       File Metadata    Model DAX    Model Meta

🔧 Auto-Fix

Warehouse Fixes (`warehouse_fix`)

Run all safe fixes or specify individual rule IDs:

Rule ID What It Fixes SQL Command
WH-001 Missing primary keys ALTER TABLE ADD CONSTRAINT PK NOT ENFORCED
WH-008 Stale statistics (>30 days) UPDATE STATISTICS [table]
WH-009 Disabled constraints ALTER TABLE WITH CHECK CHECK CONSTRAINT ALL
WH-016 Missing audit columns ALTER TABLE ADD created_at DATETIME2 DEFAULT GETDATE()
WH-018 Unmasked sensitive data `ALTER COLUM

Tools (6)

lakehouse_optimization_recommendationsScans SQL Endpoint and reads Delta Log files from OneLake for optimization.
warehouse_optimization_recommendationsConnects via SQL and runs 39 diagnostic queries on the warehouse.
warehouse_analyze_query_patternsFocused analysis of slow, frequent, or failed queries in the warehouse.
eventhouse_optimization_recommendationsRuns KQL diagnostics on each KQL database in the eventhouse.
semantic_model_optimization_recommendationsExecutes DAX and MDSCHEMA DMVs for BPA analysis of semantic models.
warehouse_fixApplies automated fixes for identified warehouse issues.

Configuration

claude_desktop_config.json
{"servers": {"fabric-optimization": {"type": "stdio", "command": "node", "args": ["dist/index.js"], "cwd": "/path/to/Force-Fabric-MCP-Server"}}}

Try it

List all lakehouses in workspace <id>.
Scan lakehouse <id> in workspace <id> for performance issues.
Fix warehouse <id> in workspace <id> using the available auto-fix tools.
Analyze query patterns for warehouse <id> to identify bottlenecks.
Run optimization recommendations for the semantic model in workspace <id>.

Frequently Asked Questions

What are the key features of Force Fabric MCP Server?

Scans 120 rules across Lakehouses, Warehouses, Eventhouses, and Semantic Models.. Provides 45 auto-fix capabilities for identified issues.. Generates unified results tables with status, findings, and recommendations.. Supports SQL, KQL, and DAX-based diagnostic analysis.. Integrates with Fabric REST API, OneLake, and MDSCHEMA DMVs..

What can I use Force Fabric MCP Server for?

Detecting performance bottlenecks in Fabric Lakehouses and Warehouses.. Identifying data quality issues and missing constraints in SQL endpoints.. Optimizing KQL database policies for Eventhouses.. Refactoring DAX expressions in Semantic Models to follow best practices.. Automating routine maintenance tasks like VACUUM and statistics updates..

How do I install Force Fabric MCP Server?

Install Force Fabric MCP Server by running: git clone https://github.com/tmdaidevs/Force-Fabric-MCP-Server.git && cd Force-Fabric-MCP-Server && npm install && npm run build

What MCP clients work with Force Fabric MCP Server?

Force Fabric MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Force Fabric MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare