msfabric-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., "@msfabric-mcplist my Fabric workspaces and show items in the Sales 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.
msfabric-mcp
A Model Context Protocol server for Microsoft Fabric, over stdio, in Python.
It gives an agent one connection that reaches both halves of Fabric:
the control plane, through the public REST API at
api.fabric.microsoft.com/v1(workspaces, items, lakehouses, warehouses, notebooks, the job scheduler), andthe data plane, through the SQL analytics endpoint of a warehouse or lakehouse, behind an allowlist read-only guard.
Plus optional DAX against a Power BI semantic model.
Read-only by default. Writes are refused unless the operator sets
FABRIC_ALLOW_WRITES, and even then UPDATE and DELETE must carry a WHERE.
Package:
msfabric-mcpon PyPIRepository: https://github.com/NawafSheikh/fabric-mcp
MCP registry name:
io.github.nawafsheikh/msfabric-mcpLicense: MIT
Honest positioning
Fabric MCP is a crowded shelf as of 2026-08-22. Here is what already exists and where this one differs. Nothing below is a claim that the others are bad.
What | Shape | Covers |
Fabric Core MCP Server (Microsoft, preview) | remote, hosted by Microsoft, | ~30 control-plane tools: workspaces, items, folders, capacities, OneLake catalog search, item definitions, long-running operations. No T-SQL execution, no notebook job run, no DAX. (docs) |
Power BI remote MCP server (Microsoft, preview) | remote | report and semantic-model metadata, and DAX generation through Copilot (consumes Copilot capacity). (docs) |
microsoft/fabric-rti-mcp | local, open source | Real-Time Intelligence: Eventhouse and Azure Data Explorer, KQL. A different workload from lakehouse and warehouse T-SQL. (repo) |
| local, open source | overlapping ground, each with its own slice |
| unrelated | that is the other Fabric, the |
Where msfabric-mcp sits:
One server across both planes. Microsoft's Core MCP server is control plane only; you still need a second thing to run a query. Here,
list_itemsandrun_sqllive in the same process and the same credential.Local stdio, no preview enrollment. The Microsoft servers are remote and in preview. This runs on your machine against the generally available REST API, so it works in any tenant you can already sign in to.
The guard is the product.
run_sqlis an allowlist, not a blocklist: a statement runs only when it is positively classified as a read (or as a permitted write with writes enabled). Comments are stripped first, statement batches are refused, and procedure execution,OPENROWSET/OPENQUERY,GRANT/REVOKE,BACKUP/RESTOREandSHUTDOWNare refused in every mode.Bounded output. Every result set is capped in rows and in cell width, and says when it truncated, so a wide
SELECT *cannot flood a context window.
If you only need control-plane browsing inside a tenant that has the preview enabled, use Microsoft's Core MCP server; it is first-party and will always track the API faster. Use this one when you want SQL and jobs in the same server, locally, with a hard read-only default.
Related MCP server: Databricks MCP Server
Install
pip install msfabric-mcpSQL access needs a driver. Pick one:
pip install "msfabric-mcp[sql]" # pyodbc, plus ODBC Driver 18 for SQL Server
pip install "msfabric-mcp[mssql]" # mssql-python, no external ODBC managerpyodbc needs ODBC Driver 18 for SQL Server installed separately (17 also works). The Entra token is passed with the
SQL_COPT_SS_ACCESS_TOKENconnection attribute (1256).mssql-python is Microsoft's own driver, needs Python 3.10+, installs its connectivity layer with the wheel, and supports Fabric Data Warehouse and the Lakehouse SQL analytics endpoint.
The REST tools need neither driver. You can run the server with no SQL configuration at all and still browse workspaces, items and jobs.
Requires Python 3.11 or later.
Configure
Everything comes from environment variables. Nothing about a tenant, workspace,
warehouse or host is compiled into the package. See .env.example.
Authentication
Three modes, all built on azure-identity.
1. DefaultAzureCredential (the default). Set nothing. The credential chain
picks up an az login session, a VS Code sign-in, a managed identity, or the
standard AZURE_CLIENT_ID / AZURE_TENANT_ID / AZURE_CLIENT_SECRET
environment service principal.
az login2. Service principal. Set all three and the mode is inferred:
Variable | Meaning |
| directory (tenant) id |
| application (client) id |
| client secret |
The service principal must be added to the workspace with Admin, Member or Contributor, and the tenant setting Service principals can call Fabric public APIs must be on.
3. Device code, for a headless box or an SSH session:
FABRIC_AUTH_MODE=device_code
FABRIC_CLIENT_ID=<a public client app registration>Tokens are cached in memory per scope and refreshed two minutes before expiry. They are never written to disk, never logged, and never appear in any error message the server returns.
Scope and SQL
Variable | Default | Meaning |
| unset | default workspace, so tools need not repeat it. Optional: every tool also takes |
| unset | SQL analytics endpoint host only, no protocol. Found on the warehouse or lakehouse settings page. Optional: without it the SQL tools explain that they are not configured and the REST tools still work. |
| unset | default warehouse or lakehouse name |
|
|
|
Safety
Variable | Default | Meaning |
|
| off. While off, every write statement is refused with an explanation. Turn it on only for a workspace you are willing to change. |
|
| rows returned per result set, capped at 5000 |
|
| characters per cell, capped at 4000 |
No secret is ever printed. health reports whether a tenant id, client id and
secret are configured, never their values, and error messages carry an exception
class and a short service detail with the query string stripped.
Client configuration
Claude Desktop, Claude Code, or any stdio MCP client:
{
"mcpServers": {
"fabric": {
"command": "msfabric-mcp",
"env": {
"FABRIC_WORKSPACE_ID": "00000000-0000-0000-0000-000000000000",
"FABRIC_SQL_ENDPOINT": "your-endpoint.datawarehouse.fabric.microsoft.com",
"FABRIC_SQL_DATABASE": "your_warehouse"
}
}
}
}Do not put FABRIC_CLIENT_SECRET in a config file that lives in a repository.
Use az login, a managed identity, or a secret manager that injects the
variable into the server process.
Tools
Tool | Reaches | What it does |
| REST | workspaces visible to the identity |
| REST | items in a workspace, filtered by Fabric item type |
| REST | one item's metadata |
| REST | lakehouses |
| REST | warehouses |
| REST | notebooks |
| REST or SQL | lakehouse tables via the Tables API, or |
| SQL | columns, types, nullability, ordinal, from |
| SQL | one guarded statement |
| REST | starts a |
| REST | status, timings, failure reason |
| Power BI | a DAX |
| both | configuration summary and a reachability probe |
Notebook and lakehouse arguments accept either a display name or an id; a
name is resolved through list_items on the fly.
The SQL guard, precisely
run_sql accepts one statement per call, with comments stripped before any
decision is made. Then:
Starts with
SELECTorWITH, and contains noSELECT ... INTOorFOR UPDATE: classified read, always allowed.Starts with
INSERT,UPDATE,DELETE,MERGE,CREATE,ALTER,DROP,TRUNCATE, or is aSELECT ... INTO: classified write. Refused unlessFABRIC_ALLOW_WRITESis set.UPDATEandDELETEadditionally require aWHEREclause even when writes are enabled.Anything else: refused, because it matched neither shape.
EXEC/EXECUTE,sp_*,xp_*,OPENROWSET,OPENDATASOURCE,OPENQUERY,BULK INSERT,GRANT,REVOKE,DENY,BACKUP,RESTORE,SHUTDOWN,RECONFIGURE: refused in every mode.Multiple statements separated by
;: refused, so each one can be judged alone.
Table and schema names supplied to describe_table are validated as plain
identifiers and the lookup itself is parameterised, so a name cannot carry SQL.
This is a guard against an agent's mistakes, not a substitute for permissions. Grant the identity the least access it needs; the workspace role and the warehouse's own object permissions remain the real boundary.
Notes on execute_dax
Uses the JSON executeQueries
endpoint rather than the newer Arrow executeDaxQueries, because
executeQueries works on Pro, PPU and Premium/Fabric capacities and needs no
Arrow library. Its documented ceiling is 100,000 rows and 1,000,000 values per
query; FABRIC_MAX_ROWS applies on top of that. The tenant setting Dataset
Execute Queries REST API must be enabled, and the caller needs Build
permission on the semantic model. Only EVALUATE and DEFINE queries are
accepted.
What it touches
Outbound HTTPS to
api.fabric.microsoft.com,api.powerbi.com, and Microsoft Entra for tokens.Outbound TDS on 1433 to your SQL analytics endpoint, only when a SQL tool is called and
FABRIC_SQL_ENDPOINTis set.Encrypt=yes,TrustServerCertificate=no.No local filesystem writes. No telemetry. No third-party service.
Develop
git clone https://github.com/NawafSheikh/fabric-mcp
cd fabric-mcp
pip install -e ".[dev]"
pytest
python -m buildThe whole test suite runs with no network, no Fabric tenant, and no ODBC driver
installed: REST calls go through an httpx.MockTransport, and the SQL layer
takes an injectable connection factory that the tests fill with a fake DB-API
connection.
Contributing
Issues and pull requests welcome at https://github.com/NawafSheikh/fabric-mcp/issues.
Sources
Checked 2026-08-22.
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.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to access enterprise data from Unity Catalog (vector search, functions, Genie spaces) and perform developer actions in Databricks like managing notebooks and running jobs.
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Databricks workspaces programmatically, providing comprehensive tools for cluster management, notebook operations, job orchestration, Unity Catalog data governance, user management, permissions control, and FinOps cost analytics.263MIT
- AlicenseBqualityDmaintenanceEnables AI agents to interact with Microsoft Fabric by exposing tools for managing workspaces, notebooks, SQL queries, pipelines, and Livy Spark sessions. It provides a comprehensive set of operations for data engineering and analytics tasks using standard Azure authentication.374MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Microsoft Fabric and Power BI services through the Model Context Protocol. Users can manage workspaces, execute DAX queries, refresh datasets, and create Fabric notebooks using natural language.6142MIT
Related MCP Connectors
Shared, permission-aware company context for AI agents, with provenance, approvals and audit.
Debug, build, and manage Power Automate cloud flows with AI agents
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/NawafSheikh/fabric-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server