Custom Fabric MCP
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., "@Custom Fabric MCPquery the top 5 customers by total sales"
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.
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
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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vpsathish05/custom-fabric-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server