Microsoft Fabric Analytics

by santhoshravindran7

Not rated
GitHub

About

An analytics server providing tools for interacting with the Microsoft Fabric data platform.

Details

Author
santhoshravindran7
Categories
Database, Other

Setup

Install Microsoft Fabric Analytics in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/santhoshravindran7/Fabric-Analytics-MCP

Follow the installation instructions in the repository README, then restart your MCP client.

An analytics server providing tools for interacting with the Microsoft Fabric data platform.

A comprehensive Model Context Protocol (MCP) server that provides analytics capabilities and tools for interacting with Microsoft Fabric data platform. This server enables AI assistants like Claude to seamlessly access, analyze, and monitor Microsoft Fabric resources through standardized MCP protocols, bringing the power of Microsoft Fabric directly to your AI conversations.

- 🌟 Key Features
-
πŸš€ Quick Start
-
πŸ› οΈ Tools & Capabilities
-
πŸ§ͺ Development & Testing
-
πŸ’¬ Example Queries
-
πŸ” Authentication
-
πŸ—οΈ Architecture
-
βš™οΈ Configuration
-
🀝 Contributing
-
πŸ”’ Security"Cancel the problematic Spark application"
-
πŸ“ž Support

- πŸ—οΈ Complete Workspace Management- Create, delete, and manage Fabric workspaces with capacity assignment
- πŸ”„ Enhanced CRUD Operations- Create, read, update, and delete all Fabric items (notebooks, lakehouses, datasets, reports)
- πŸ““ Advanced Notebook Management- Create, execute, and manage Fabric notebooks with 5 predefined templates
- ⚑ Livy API Integration- Full Spark session and batch job management with real-time monitoring
- πŸ“Š Comprehensive Spark Monitoring- Real-time monitoring across workspaces, items, and applications
- πŸ€– Multi-AI Assistant Support- Works with Claude Desktop, GitHub Copilot, and other MCP-compatible AI tools
- πŸ” Enhanced Azure CLI Authentication- Zero-config setup with automatic token management
- �️ Enterprise Authentication- Multiple auth methods (Bearer, Service Principal, Device Code, Interactive, Azure CLI)
- πŸ“ˆ Analytics & Insights- Generate comprehensive monitoring dashboards with real-time metrics
- πŸ§ͺ End-to-End Testing- Complete test suite with real workspace creation and job execution
- πŸ”„ Advanced Token Management- Automatic token validation, refresh, and expiration handling "List all Fabric capacities I can use" "Assign workspace 1234abcd-abcd-1234-abcd-123456789000 to capacity f9998888-7777-6666-5555-444433332222" "Show all workspaces in capacity f9998888-7777-6666-5555-444433332222" "Unassign workspace 1234abcd-abcd-1234-abcd-123456789000 from its capacity"

- ☸️ Enterprise Deployment - Full Kubernetes and Azure deployment support with auto-scaling - πŸ”„ Docker Support - Containerized deployment with health checks and monitoring - πŸ“Š Monitoring & Observability - Built-in Prometheus metrics and Grafana dashboards - πŸ”€ Synapse to Fabric Migration - Automated migration of Spark notebooks from Azure Synapse Analytics - 🎯 52 Total Tools - Comprehensive coverage of Fabric operations including migration (up from 48 tools) ## πŸ—οΈ New Workspace Management Features ### πŸ†• Latest Updates - Comprehensive Workspace Operations The MCP server now includes 21 new workspace management tools that enable complete workspace lifecycle management: ### 🌟 Core Workspace Operations - fabric_list_workspaces - List all accessible workspaces with detailed metadata - fabric_create_workspace - Create new workspaces with custom configuration - fabric_delete_workspace - Delete workspaces with confirmation and cleanup - fabric_update_workspace - Update workspace properties and settings - fabric_get_workspace - Get detailed workspace information and status ### ⚑ Capacity & Resource Management - fabric_list_capacities - List all available Fabric capacities - fabric_assign_workspace_to_capacity - Attach workspaces to dedicated capacity - fabric_unassign_workspace_from_capacity - Move workspaces to shared capacity - fabric_list_capacity_workspaces - List all workspaces in a capacity ### πŸ‘₯ Access Control & Security - fabric_get_workspace_role_assignments - View workspace permissions - fabric_add_workspace_role_assignment - Grant workspace access to users/groups - fabric_update_workspace_role_assignment - Modify user permissions - fabric_remove_workspace_role_assignment - Remove workspace access ### πŸ”„ Advanced Operations - fabric_get_workspace_git_status - Check Git integration status - fabric_connect_workspace_to_git - Enable Git integration for workspace - fabric_disconnect_workspace_from_git - Disable Git integration - fabric_update_workspace_git_connection - Modify Git repository settings ### πŸ› οΈ Environment & Pipeline Management - fabric_list_workspace_environments - List all environments in workspace - fabric_create_workspace_environment - Create new environments - fabric_delete_workspace_environment - Remove environments - fabric_list_workspace_data_pipelines - List data integration pipelines - fabric_create_workspace_data_pipeline - Create new data pipelines ### 🎯 Real-World Scenarios Enabled πŸš€ Automated Workspace Provisioning:

"Create a new workspace called 'Analytics-Q1-2025' and assign it to our premium capacity"

"List all workspaces in our tenant and show their capacity assignments"

"Add userjohn.doe@company.comas Admin to the Analytics workspace"

"Create a development environment in the Analytics workspace with Python and R libraries"

"Connect the Analytics workspace to our GitHub repository for version control"

### πŸ€– GitHub Copilot Integration Perfect for GitHub Copilot - The enhanced workspace management works seamlessly with GitHub Copilot's built-in terminal, making it ideal for: - πŸ”§ Azure CLI Authentication - Uses your existing az login session - πŸ’» Terminal-Based Operations - Natural workflow within your coding environment - ⚑ Rapid Prototyping - Quickly create test workspaces and environments - πŸ—οΈ Infrastructure as Code - Manage Fabric resources alongside your codebase - πŸ”„ CI/CD Integration - Automate workspace provisioning in deployment pipelines GitHub Copilot Example Commands: 
bash # Using Azure CLI auth, create a new workspace for our ML project # List all workspaces and their Git integration status # Set up a complete analytics environment with lakehouse and notebooks

The MCP server now includes4 specialized migration toolsthat automate the migration of Spark notebooks and pipelines from Azure Synapse Analytics to Microsoft Fabric:

- fabric_list_synapse_workspaces- List all Synapse workspaces in your Azure subscription
- fabric_discover_synapse_workspace- Inventory notebooks, pipelines, linked services, and Spark jobs from Synapse

- fabric_transform_notebooks- Transform Synapse notebooks to Fabric format (mssparkutils β†’ notebookutils)
- fabric_migrate_synapse_to_fabric- Complete end-to-end migration with discovery, transformation, and provisioning

-

Automatic Code Transformation- Converts Synapse-specific code to Fabric equivalents:

- mssparkutils→notebookutils
- Synapse magic commands β†’ Fabric magic commands
- ABFSS path rewriting to OneLake
- Spark pool configuration cleanup

Comprehensive Asset Discovery- Inventories all migrat assets:

- Jupyter notebooks (ipynb format)
- Data pipelines and workflows
- Linked services and connections
- Spark job definitions

Safe Testing with Dry Run- Preview all changes before applying:

- Test transformations without provisioning
- Validate transformed code
- Review change reports

End-to-End Automation- Complete migration pipeline:

- Discovery β†’ Transformation β†’ Provisioning β†’ Validation
- Automatic lakehouse creation
- OneLake shortcut provisioning
- Comprehensive migration reports


"List all my Synapse workspaces and show me what notebooks are in workspace 'analytics-synapse'"


"Discover assets from my Synapse workspace 'analytics-synapse' and show me how the code would be transformed (dry run)"


"Migrate all notebooks from Synapse workspace 'analytics-synapse' to Fabric workspace 'abcd-1234' and create a lakehouse called 'MigratedData'"

πŸ“Š Detailed Migration Guide:See
MIGRATION.mdfor comprehensive migration documentation including:

- Step-by-step workflows
- Transformation rule details
- Best practices and troubleshooting
- Complete examples

🎯 End-to-End Testing with Real Workspaces

The MCP server now includes comprehensive end-to-end testing that creates real workspaces, assigns them to capacities, and executes actual jobs to validate the complete workflow:


# One-command end-to-end test npm run test:e2e

- βœ…Workspace Creation- Creates real Fabric workspaces
- βœ…Capacity Assignment- Attaches workspaces to your Fabric capacity
- βœ…Item Creation- Creates notebooks, lakehouses, and other items
- βœ…Job Execution- Runs actual Spark jobs and monitors completion
- βœ…Resource Cleanup- Automatically removes all test resources


{ "mcpServers": { "fabric-analytics": { "command": "node", "args":
["C:\\path\\to\\your\\build\\index.js"], "cwd": "C:\\path\\to\\your\\project", "env": { "FABRIC_AUTH_METHOD": "bearer_token", "FABRIC_TOKEN": "your_bearer_token_here", "FABRIC_WORKSPACE_ID": "your_workspace_id", "ENABLE_HEALTH_SERVER": "false" } } } }

πŸ’‘Get Bearer Token:VisitPower BI Embed Setupto generate tokens

⚠️Important:Tokens expire after ~1 hour and need to be refreshed

If you experience 60-second timeouts during startup, this is due to interactive authentication flows blocking Claude Desktop's sandboxed environment.Solution:

- SetFABRIC_AUTH_METHOD: "bearer_token"in your config
- ProvideFABRIC_TOKENwith a valid bearer token
- This bypasses interactive authentication entirely

- Provide token directly in tool calls:bearerToken: "your_token_here"
- Or use simulation mode:bearerToken: "simulation"

- Server now has 10-second timeout protection to prevent hanging
- Falls back to simulation mode if authentication fails
- Enhanced error messages provide clear guidance

🎯Quick Fix: The server automatically prioritizesFABRIC_TOKENenvironment variable over interactive authentication flows, preventing Claude Desktop timeouts.


# Clone and run locally git clone https://github.com/santhoshravindran7/Fabric-Analytics-MCP.git cd Fabric-Analytics-MCP npm install && npm run build && npm start


# Using Docker Compose docker-compose up -d # Or standalone Docker docker build -t fabric-analytics-mcp . docker run -p 3000:3000 -e FABRIC_CLIENT_ID=xxx fabric-analytics-mcp


# One-command enterprise deployment export ACR_NAME="your-registry" FABRIC_CLIENT_ID="xxx" FABRIC_CLIENT_SECRET="yyy" FABRIC_TENANT_ID="zzz" ./scripts/setup-azure-resources.sh && ./scripts/build-and-push.sh && ./scripts/deploy-to-aks.sh


# Serverless deployment on Azure az mcp server create --name "fabric-analytics-mcp" --repository "santhoshravindran7/Fabric-Analytics-MCP"
``

- 🐳 Docker & Compose Setup
-
☸️ AKS Deployment Guide
-
🌐 Azure MCP Server Guide
-
πŸ”§ Configuration Examples
-
βœ… Deployment Validation

Description: List items in a Microsoft Fabric workspace (Lakehouses, Notebooks, etc.)

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
itemType: Filter by item type (optional)

Description: Create new items in Microsoft Fabric workspace

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
itemType: Type of item (Lakehouse, Notebook, Dataset, Report, Dashboard)
-
displayName: Display name for the new item
-
description: Optional description

Description: Get detailed information about a specific Microsoft Fabric item

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
itemId: ID of the item to retrieve

Description: Update existing items in Microsoft Fabric workspace

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
itemId: ID of the item to update
-
displayName: New display name (optional)
-
description: New description (optional)

Description: Delete items from Microsoft Fabric workspace

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
itemId: ID of the item to delete

- Tool:query-fabric-dataset
- Description: Execute SQL or KQL queries against Microsoft Fabric datasets
- Parameters:

- bearerToken: Microsoft Fabric bearer token (optional - uses simulation if not provided)
-
workspaceId: Microsoft Fabric workspace ID
-
datasetName: Name of the dataset to query
-
query: SQL or KQL query to execute

- Tool:execute-fabric-notebook
- Description: Execute a notebook in Microsoft Fabric workspace
- Parameters:

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
notebookId: ID of the notebook to execute
-
parameters: Optional parameters to pass to the notebook

- Tool:get-fabric-metrics
- Description: Retrieve performance and usage metrics for Microsoft Fabric items
- Parameters:

- workspaceId: Microsoft Fabric workspace ID
-
itemId: Item ID (dataset, report, etc.)
-
timeRange: Time range for metrics (1h, 24h, 7d, 30d)
-
metrics: List of metrics to analyze

- Tool:analyze-fabric-model
- Description: Analyze a Microsoft Fabric data model and get optimization recommendations
- Parameters:

- workspaceId: Microsoft Fabric workspace ID
-
itemId: Item ID to analyze

- Tool:generate-fabric-report
- Description: Generate comprehensive analytics reports for Microsoft Fabric workspaces
- Parameters:

- workspaceId: Microsoft Fabric workspace ID
-
reportType: Type of report (performance, usage, health, summary)

πŸš€ Livy API Integration (Sessions & Batch Jobs)

Description: Create a new Livy session for interactive Spark/SQL execution

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID
-
sessionConfig: Optional session configuration

Description: Get details of a Livy session

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID
-
sessionId: Livy session ID

Description: List all Livy sessions in a lakehouse

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID
-
sessionId: Livy session ID

Description: Execute SQL or Spark statements in a Livy session

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID
-
sessionId: Livy session ID
-
code: SQL or Spark code to execute
-
kind: Statement type (sql, spark, etc.)

Description: Get status and results of a Livy statement

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID
-
sessionId: Livy session ID
-
statementId: Statement ID

Description: Create a new Livy batch job for long-running operations

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID
-
batchConfig: Batch job configuration

Description: Get details of a Livy batch job

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID
-
batchId: Batch job ID

Description: List all Livy batch jobs in a lakehouse

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
lakehouseId: Microsoft Fabric lakehouse ID
-
batchId: Batch job ID

- Tool:get-workspace-spark-applications
- Description: Get all Spark applications in a Microsoft Fabric workspace
- Parameters:

- bearerToken: Microsoft Fabric bearer token
-
workspaceId: Microsoft Fabric workspace ID
-
continuationToken`: Optional token for pagination

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.