Custom Fabric MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Custom Fabric MCP
An MCP (Model Context Protocol) server for AI-powered, governed access to Microsoft Fabric data assets. Enables AI agents to query Fabric Warehouses and Lakehouses with full governance, validation, and explainability.
Features
16 MCP tools — query, schema discovery, knowledge retrieval, export, admin
Governance-first — RBAC/ABAC, PII masking, rate limiting, SQL deny patterns
Validated SQL — schema-aware validation, query optimization (NOLOCK, TOP), cost estimation
Grounded responses — citations, confidence scoring, natural-language explanations
Knowledge retrieval — business glossary, KPI dictionary, knowledge graph, query history
Caching — Redis-backed query and result cache with semantic hashing
Export services — charts (matplotlib), Excel (openpyxl), PDF/Word, email with confirmation gate
Related MCP server: fabric-lakehouse-mcp
Quick Start
# Install dependencies
uv sync
# Install with dev tools (ruff, pytest, pyright)
uv sync --group dev
# Install with optional services (matplotlib, openpyxl)
uv sync --extra services
# Run in development mode (MCP Inspector)
uv run mcp dev src/server/main.py
# Run with MCP inspector
uv run mcp inspector src/server/main.py
# Run directly (stdio transport)
uv run python -m src.server.main
# Lint and format
uv run ruff check src/
uv run ruff format src/
# Run tests
uv run pytest tests/ -x --timeout=30
# Seed sample schema for local dev
uv run python scripts/seed-schema.pyConfiguration
Copy .env.example to .env and fill in your values:
cp .env.example .envRequired Configuration
Variable | Description |
| Fabric workspace SQL endpoint URL |
| Database name in Fabric |
| Azure AD tenant ID |
| App registration client ID |
| App registration client secret |
Optional Configuration
Variable | Default | Description |
|
| Transport: |
|
| Port for SSE transport |
|
| Log level |
|
| Log format: |
|
| Redis for caching |
|
| Cache TTL (1 hour) |
|
| Default row limit |
|
| Queries per minute |
|
| CU-second budget |
See .env.example for all available options.
Architecture
User → LLM → AgentPlanner → [Retrieval → Governance → Validation → Execution → Masking → Response]
↓ ↓ ↓ ↓ ↓ ↓
Glossary RBAC/PII Optimizer Fabric PiiMasker Assembler
KG/RAG RateLimit CostEstimate pyodbc (HMAC salt) Citations
History DenyPatterns Schema Pool(5) HideColumn ConfidencePipeline (9 steps in AgentPlanner)
Retrieve context — glossary, KG, history, RAG, session memory
Governance pre-check — RBAC, rate limits, deny patterns
Schema discovery — INFORMATION_SCHEMA (cached with TTL)
Validate + optimize — table/column existence, NOLOCK, TOP injection, cost estimate
Execute — parameterized query against Fabric SQL Endpoint
Post-query masking — PII redaction/partial mask/tokenize based on role × sensitivity
Assemble response — citations, confidence (weighted), explanation, warnings
Audit log — structured entry with user, tables, governance decisions, latency
Store — query history + session memory for future reuse
Deployment
Docker
docker build -t custom-fabric-mcp .
docker run -p 8080:8080 --env-file .env custom-fabric-mcpAzure Container Apps (Bicep)
# Deploy to dev environment
./scripts/deploy.sh dev latest
# Or use az CLI directly
az deployment group create \
--resource-group rg-fabric-mcp-dev \
--template-file infra/main.bicep \
--parameters infra/parameters.dev.jsonInfrastructure includes: VNET, Key Vault, Container Registry, Redis Cache, Container App with auto-scaling (1-3 replicas).
Project Structure
src/
├── common/ # Config, errors (6 types), logging (structlog)
├── server/ # MCP entry point (app factory pattern)
├── fabric/ # Auth, connection pool, query executor, schema
├── governance/ # RBAC, PII masking, policy engine, audit
├── validation/ # SQL validator, optimizer, cost estimator
├── retrieval/ # RAG, knowledge graph, glossary, history, memory
├── cache/ # Redis client, query cache, result cache
├── response/ # Citations, confidence, explainer, assembler
├── agents/ # Planner (pipeline), model router, workflow engine
├── tools/ # 16 MCP tools (the API surface)
└── services/ # Charts, Excel, documents, email, confirmationMCP Tools
Tool | Description |
| Server health and configuration status |
| Discover all available tools |
| Execute validated SQL against Fabric |
| Query revenue by year/region/grouping |
| Query specific KPI (total_revenue, customer_count, etc.) |
| Get complete database schema |
| List available tables |
| Get column details for a table |
| Search business term definitions |
| Get KPI calculation logic |
| Search business documentation (RAG) |
| Export results to .xlsx |
| Generate bar/line/pie chart (PNG) |
| Search past queries for reuse |
| Verify user access to tables |
| Check data refresh status |
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
MCP server for building and testing AI agents with multi-model experimentation and insights.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
The AI that understands raw data: Schema over your tables and databases, as MCP tools.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables natural language querying of Microsoft Fabric Data Warehouses with intelligent SQL generation, metadata exploration, and business-friendly result summarization. Features two-layer architecture with MCP-compliant server and agentic AI reasoning for production-ready enterprise data access.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for Microsoft Fabric that enables AI agents to query and analyze Lakehouse and Eventhouse data, and manage Eventstreams, using natural language through the MCP interface.MIT
- AlicenseBqualityDmaintenanceA powerful MCP server for Microsoft SQL Server that connects AI assistants directly to your SQL Server databases with enterprise-grade security controls.3850 npm3MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI assistants the ability to connect to, query, profile, and monitor data sources — turning any LLM into an interactive data engineering copilot.MIT