This MCP server provides comprehensive access to Microsoft Fabric operations through 56+ tools, enabling AI agents to automate workspace management, data processing, and analytics. Note: This is development-focused and includes destructive operations.
Core Capabilities:
Workspace & Item Management: List workspaces, browse/filter/create/rename/move/delete items (notebooks, lakehouses, pipelines), and organize folders
Lakehouse Operations: Create lakehouses, upload/list/delete files, and attach lakehouses to notebooks
Notebook Development: Import local
.ipynbfiles, get/update content, execute as jobs, retrieve execution history and driver logs for debuggingInteractive Spark Sessions (Livy): Create/manage sessions (PySpark, Scala, SparkR), execute code interactively, monitor status, cancel statements, and retrieve logs
Data Pipeline Orchestration: Create pipelines, add activities (Copy, Notebook, Dataflow, custom JSON), manage dependencies, delete activities, and retrieve definitions/run history
Semantic Model & Power BI: Create models, add tables/columns/measures/relationships, refresh models, execute DAX queries, and get metadata (TMSL/TMDL formats)
Dataflow Management: Create dataflows, retrieve definitions, and execute as jobs
Job Monitoring: Run on-demand jobs for any Fabric item, check status, and retrieve results from async operations
SQL Querying (optional with pyodbc): Get SQL endpoints and execute queries/statements
Key Features:
Authentication: Uses Azure DefaultAzureCredential (environment, managed identity, Azure CLI, VS Code, PowerShell)
Integration: Supports VS Code, Claude Desktop, Codex, and programmatic library mode
Debugging: Configurable logging levels and detailed error tracebacks
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ms-fabric-mcp-serverList all the notebooks in my 'Sales Analytics' workspace"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ms-fabric-mcp-server
A Model Context Protocol (MCP) server for Microsoft Fabric. Exposes Fabric operations (workspaces, notebooks, SQL, Livy, pipelines, jobs) as MCP tools that AI agents can invoke.
⚠️ Warning: This package is intended for development environments only and should not be used in production. It includes tools that can perform destructive operations (e.g.,
delete_item,delete_lakehouse_file,delete_activity_from_pipeline) and execute arbitrary code via Livy Spark sessions. Always review AI-generated tool calls before execution.
Quick Start
The fastest way to use this MCP server is with uvx:
uvx ms-fabric-mcp-serverInstallation
# Using uv (recommended)
uv pip install ms-fabric-mcp-server
# Using pip
pip install ms-fabric-mcp-server
# With SQL support (requires pyodbc)
pip install ms-fabric-mcp-server[sql]
# With OpenTelemetry tracing
pip install ms-fabric-mcp-server[sql,telemetry]Authentication
Uses DefaultAzureCredential from azure-identity - no explicit credential configuration needed. This automatically tries multiple authentication methods:
Environment credentials (
AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_CLIENT_SECRET)Managed Identity (when running on Azure)
Azure CLI credentials (
az login)VS Code credentials
Azure PowerShell credentials
No Fabric-specific auth environment variables are needed - it just works if you're authenticated via any of the above methods.
Usage
VS Code Integration
Add to your VS Code MCP settings (.vscode/mcp.json or User settings):
{
"servers": {
"MS Fabric MCP Server": {
"type": "stdio",
"command": "uvx",
"args": ["ms-fabric-mcp-server"]
}
}
}Claude Desktop Integration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"fabric": {
"command": "uvx",
"args": ["ms-fabric-mcp-server"]
}
}
}Codex Integration
Add to your Codex config.toml:
[mcp_servers.ms_fabric_mcp]
command = "uvx"
args = ["ms-fabric-mcp-server"]Running Standalone
# Using uvx (no installation needed)
uvx ms-fabric-mcp-server
# Direct execution (if installed)
ms-fabric-mcp-server
# Via Python module
python -m ms_fabric_mcp_server
# With MCP Inspector (development)
npx @modelcontextprotocol/inspector uvx ms-fabric-mcp-serverLogging & Debugging (optional)
MCP stdio servers must keep protocol traffic on stdout, so redirect stderr to capture logs.
Giving the agent read access to the log file is a powerful way to debug failures.
You can also set AZURE_LOG_LEVEL (Azure SDK) and MCP_LOG_LEVEL (server) to control verbosity.
VS Code (Bash):
{
"servers": {
"MS Fabric MCP Server": {
"type": "stdio",
"command": "bash",
"args": [
"-lc",
"LOG_DIR=\"$HOME/mcp_logs\"; LOG_FILE=\"$LOG_DIR/ms-fabric-mcp-$(date +%Y%m%d_%H%M%S).log\"; uvx ms-fabric-mcp-server 2> \"$LOG_FILE\""
],
"env": {
"AZURE_LOG_LEVEL": "info",
"MCP_LOG_LEVEL": "INFO"
}
}
}
}VS Code (PowerShell):
{
"servers": {
"MS Fabric MCP Server": {
"type": "stdio",
"command": "powershell",
"args": [
"-NoProfile",
"-Command",
"$logDir=\"$env:USERPROFILE\\mcp_logs\"; New-Item -ItemType Directory -Force -Path $logDir | Out-Null; $ts=Get-Date -Format yyyyMMdd_HHmmss; $logFile=\"$logDir\\ms-fabric-mcp-$ts.log\"; uvx ms-fabric-mcp-server 2> $logFile"
],
"env": {
"AZURE_LOG_LEVEL": "info",
"MCP_LOG_LEVEL": "INFO"
}
}
}
}Programmatic Usage (Library Mode)
from fastmcp import FastMCP
from ms_fabric_mcp_server import register_fabric_tools
# Create your own server
mcp = FastMCP("my-custom-server")
# Register all Fabric tools
register_fabric_tools(mcp)
# Add your own customizations...
mcp.run()Configuration
Environment variables (all optional with sensible defaults):
Variable | Default | Description |
|
| Fabric API base URL |
|
| OAuth scopes |
|
| API timeout (seconds) |
|
| Max retry attempts |
|
| Backoff factor |
|
| Livy timeout (seconds) |
|
| Livy polling interval |
|
| Livy statement wait timeout |
|
| Livy session wait timeout |
|
| Server name for MCP |
|
| Logging level |
|
| Azure SDK logging level |
Copy .env.example to .env and customize as needed.
Available Tools
The server provides 57 core tools, with 3 additional SQL tools when installed with [sql] extras (60 total).
Tool Group | Count | Tools |
Workspace | 1 |
|
Item | 9 |
|
Lakehouse | 4 |
|
Notebook | 6 |
|
Job | 4 |
|
Livy | 8 |
|
Pipeline | 11 |
|
Dataflow | 3 |
|
Semantic Model | 9 |
|
Power BI | 2 |
|
SQL (optional) | 3 |
|
SQL Tools (Optional)
SQL tools require pyodbc and the Microsoft ODBC Driver for SQL Server:
# Install with SQL support
pip install ms-fabric-mcp-server[sql]
# On Ubuntu/Debian, install the ODBC driver first:
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18If pyodbc is not available, the server starts with 57 tools (SQL tools disabled).
Development
# Clone and install with dev dependencies
git clone https://github.com/your-org/ms-fabric-mcp-server.git
cd ms-fabric-mcp-server
pip install -e ".[dev,sql,telemetry]"
# Run tests
pytest
# Run with coverage
pytest --cov
# Format code
black src tests
isort src tests
# Type checking
mypy srcIntegration tests
Integration tests run against live Fabric resources and are opt-in.
To get started locally, copy the example env file:
cp .env.integration.example .env.integrationRequired environment variables:
FABRIC_INTEGRATION_TESTS=1FABRIC_TEST_WORKSPACE_NAMEFABRIC_TEST_LAKEHOUSE_NAMEFABRIC_TEST_SQL_DATABASE
Optional pipeline copy inputs:
FABRIC_TEST_SOURCE_CONNECTION_IDFABRIC_TEST_SOURCE_TYPEFABRIC_TEST_SOURCE_SCHEMAFABRIC_TEST_SOURCE_TABLEFABRIC_TEST_DEST_CONNECTION_IDFABRIC_TEST_DEST_TABLE_NAME(optional override; defaults to source table name)
Run integration tests:
FABRIC_INTEGRATION_TESTS=1 pytestNotes:
SQL tests require
pyodbcand a SQL Server ODBC driver.Tests may skip when optional dependencies or environment variables are missing.
These tests use live Fabric resources and may incur costs or side effects.
License
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.