MCP Connector

Manage Microsoft Fabric with PySpark & LLMs

MCP server exposing Microsoft Fabric API tools for managing workspaces, lakehouses, warehouses, and PySpark notebooks with intelligent code generation and

Works with microsoft fabricpysparkvscode

Maintainer of this project? Claim this page to edit the listing.


90
Spark score
out of 100
Updated 5 months ago
Version 1.0.0
Models
universal

Add to Favorites

Why it matters

Streamline your Microsoft Fabric development and MLOps with this comprehensive Python MCP server. It integrates LLMs for intelligent notebook creation, code generation, and performance optimization.

Outcomes

What it gets done

01

Develop and optimize PySpark notebooks with LLM assistance.

02

Manage Fabric resources like workspaces, lakehouses, and warehouses.

03

Automate data loading, querying, and schema management.

04

Analyze and improve notebook performance with detailed recommendations.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-fabric-mcp | bash

Capabilities

Tools your agent gets

list_workspaces

Show all available Fabric workspaces

set_workspace

Set the current workspace context for the session

list_lakehouses

Show all lakehouses in the workspace

create_lakehouse

Create a new lakehouse

set_lakehouse

Set the current lakehouse context

list_warehouses

Show all warehouses in the workspace

create_warehouse

Create a new warehouse

set_warehouse

Set the current warehouse context

+7 tools

Overview

Fabric MCP Server

A Python-based MCP server that connects AI assistants to Microsoft Fabric APIs for workspace, lakehouse, warehouse, and table management. Provides tools for executing SQL queries, loading data, and creating PySpark notebooks with specialized templates and performance optimization features. Use when you need to automate Microsoft Fabric operations through an AI assistant, develop and optimize PySpark notebooks, or manage Fabric resources programmatically. Ideal for data engineers working with Fabric workspaces who want conversational access to API operations.

What it does

Big Job: Accelerate Microsoft Fabric data engineering workflows by giving AI assistants direct access to workspace management, SQL execution, and intelligent PySpark notebook development.

Small Job: Connect your AI client to Fabric APIs so you can ask "List all my Fabric workspaces" or "Create a PySpark notebook that reads sales data, cleans it, and optimizes performance" and get immediate results. Includes 6 specialized notebook templates (basic, ETL, analytics, ML, fabric_integration, streaming), performance scoring (0-100), and optimization recommendations.

Setup (STDIO):

{
    "mcp": {
        "servers": {
            "ms-fabric-mcp": {
                "type": "stdio",
                "command": "<FullPathToProjectFolder>\\.venv\\Scripts\\python.exe",
                "args": ["<FullPathToProjectFolder>\\fabric_mcp.py"]
            }
        }
    }
}

Supports both STDIO and HTTP modes. Requires Azure authentication (az login --scope https://api.fabric.microsoft.com/.default).

Source README

A comprehensive Python-based MCP server for working with Microsoft Fabric API, featuring advanced capabilities for developing, testing, and optimizing PySpark notebooks with LLM integration.

Installation

From Source

git clone https://github.com/your-repo/fabric-mcp.git
cd fabric-mcp
uv sync
pip install -r requirements.txt

MCP Inspector

uv run --with mcp mcp dev fabric_mcp.py

HTTP Server

uv run python .\fabric_mcp.py --port 8081

Configuration

VSCode STDIO Integration

{
    "mcp": {
        "servers": {
            "ms-fabric-mcp": {
                "type": "stdio",
                "command": "<FullPathToProjectFolder>\\.venv\\Scripts\\python.exe",
                "args": ["<FullPathToProjectFolder>\\fabric_mcp.py"]
            }
        }
    }
}

VSCode HTTP Integration

{
    "mcp": {
        "servers": {
            "ms-fabric-mcp": {
                "type": "http",
                "url": "http://<localhost or remote IP>:8081/mcp/",
                "headers": {
                    "Accept": "application/json,text/event-stream"
                }
            }
        }
    }
}

Available Tools

Tool Description
list_workspaces Show all available Fabric workspaces
set_workspace Set the current workspace context for the session
list_lakehouses Show all lakehouses in the workspace
create_lakehouse Create a new lakehouse
set_lakehouse Set the current lakehouse context
list_warehouses Show all warehouses in the workspace
create_warehouse Create a new warehouse
set_warehouse Set the current warehouse context
list_tables Show all tables in the lakehouse
get_lakehouse_table_schema Get the schema for a specific table
get_all_lakehouse_schemas Get schemas for all tables in the lakehouse
set_table Set the current table context
get_sql_endpoint Get the SQL endpoint for a lakehouse or warehouse
run_query Execute SQL queries
load_data_from_url Load data from a URL into tables

Capabilities

  • Manage workspaces, lakehouses, warehouses, and tables
  • Retrieve Delta table schemas and metadata
  • Execute SQL queries and load data
  • Perform operations on reports and semantic models
  • Intelligent notebook creation with 6 specialized templates
  • Smart code generation for common PySpark operations
  • Comprehensive validation with syntax checking and best practices
  • Fabric-specific optimizations and compatibility checks
  • Performance analysis with scoring and optimization recommendations
  • Real-time monitoring and execution analytics

Usage Examples

List all my Fabric workspaces
Create a PySpark notebook that reads sales data, cleans it, and optimizes performance
My PySpark notebook is slow. Help me optimize it.

Notes

Requires Azure authentication (az login --scope https://api.fabric.microsoft.com/.default). Includes 6 specialized PySpark templates: basic, etl, analytics, ml, fabric_integration, and streaming. Provides performance scoring (0-100) and detailed optimization recommendations. Supports both STDIO and HTTP communication modes.

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.