Skip to main content

An open-source MCP server to perform operations on Microsoft Fabric

Project description

Fabric Admin MCP Server

An open-source MCP server to perform operations on Microsoft Fabric, like administration and management of Fabric capacities. At this moment, this repo has an initial set of tools to manage Capacities, but it will be expanded to further support additional tools and Fabric administration workloads.

✨ Features

  • Exposes Fabric admin operations as MCP tools;
  • Uses secure, yet flexible, authentication mechanisms for Azure and Fabric, like Service Principal and Managed Identities;
  • FastAPI + FastMCP for a modern, async, extensible backend;

🤖 Interacting with the MCP Server

You can use any MCP Client to interact with this MCP server. Below, is a sample showing how to interact with it using GitHub Copilot on VSCode as a MCP Client:

Sample interaction with the MCP Server

This example demonstrates how the MCP tools are exposed and can be accessed for managing Microsoft Fabric resources.

🗂️ Project Structure

  • server.py — Main entry point to start the MCP server
  • common.py — Shared utilities and logging
  • src/capacity/ — Logic to interact with Fabric and expose then as MCP tools
  • requirements.txt — Python dependencies

⚡ Quickstart

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Set up authentication:

    • The server uses DefaultAzureCredential for secure Azure API access.
    • You can authenticate using:
      • Azure CLI: Run az login in your terminal.
      • Managed Identity: If running in Azure, ensure the managed identity has the required permissions.
      • Service Principal: Create a .env file in the project root with applicable variables (see "Using a Service Principal for Authentication" section below for details).
  3. Run the MCP server locally:

    python server.py
    

Running the MCP Server in Docker (locally)

  1. Prepare your environment variables:

    • Copy env.example to .env and fill in your Azure credentials.
  2. Build the Docker image:

    docker build -t fabric-admin-mcp .
    
  3. Run the Docker container:

    docker run --env-file .env -p 8000:8000 fabric-admin-mcp
    
  4. Access the MCP server:

  5. Test with VS Code as a Client:

    • Open the Command Palette (Ctrl+Shift+P), search for "MCP: Connect to Server", and enter http://127.0.0.1:8000/mcp/ (change the address if running it remotely).
    • You can now use MCP tools exposed by this server directly from VS Code using Agent Mode.

📦 Requirements

  • Python 3.8+;
  • Azure credentials with proper access to the backend (Azure/Fabric admin)/

🔐 Using a Service Principal for Authentication

  1. Create a Service Principal (if you don't have one):

    az ad sp create-for-rbac --name <your-app-name> --role Contributor --scopes /subscriptions/<your-subscription-id>
    

    Note the appId (Client ID), tenant, and password (Client Secret) from the output.

  2. Create a .env file in the project root: Copy .env.example to .env and fill in your values:

    AZURE_CLIENT_ID=your-service-principal-client-id
    AZURE_TENANT_ID=your-tenant-id
    AZURE_CLIENT_SECRET=your-service-principal-client-secret
    
  3. Authorize the Service Principal: Ensure the Service Principal has appropriate permissions. For example, at least Contributor at subscription or Resource Group level to manage Fabric Capacities. Additional Admin API access will be required for additional tools yet to be developed.

  4. Run the server: The server will automatically use these credentials for authentication via DefaultAzureCredential.

🚀 Future Improvements

  • Add option to deploy as a Docker image.
  • Add option to deploy as an Azure Function.
  • Add tools for additional Fabric management operations, such as Workspace management and reviewing capacity settings.
  • Improve documentation and provide more usage examples.
  • Add automated tests and CI/CD pipeline for deployments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_microsoft_fabric_admin_mcp-0.1.0.tar.gz (203.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_microsoft_fabric_admin_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_microsoft_fabric_admin_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 203.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_microsoft_fabric_admin_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2f8edad039248387840895829b6f3eb8cb090dcd0aeed930ac9be7c7938a1c06
MD5 b727485bc0c1553d4a11d28094998201
BLAKE2b-256 b528feadc87dd204f471a9bab5d661181fbc0fc898c38e633fa38b53385b4806

See more details on using hashes here.

File details

Details for the file iflow_mcp_microsoft_fabric_admin_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_microsoft_fabric_admin_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_microsoft_fabric_admin_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff02abcdf6e25a146eb4a2492bde69f84c5c744e199cfecef6745fcb156a8797
MD5 317f8a9d3d53a1825a38019db1b7bc48
BLAKE2b-256 ca0139df69fe1854437c2ef85e23acda34a12cfd6ea16738a99a975eafc52a86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page