mcp-powerBI
This server bridges Power BI/Fabric for workspace and semantic model discovery, catalog retrieval, and DAX query execution via both the Power BI REST API and Microsoft's Modeling MCP (XMLA/TOM) integration.
Authentication
auth_status– Check which auth mode (access token, service principal, or delegated user) is active.start_device_login– Initiate a device-code OAuth flow for delegated user authentication.complete_device_login– Poll Microsoft to complete the device-code login and cache the token.
Workspace & Model Discovery
list_workspaces– List all visible Fabric/Power BI workspaces, optionally including "My workspace".list_semantic_models– List semantic models in a specific workspace by ID (or "My workspace" if no ID provided).get_catalog– Fetch a full catalog of all visible workspaces and their semantic models in one call — the preferred tool for open-ended discovery.get_known_workspace_catalog– List models from pre-configured known workspaces without requiring REST auth.list_semantic_models_in_workspace_via_modeling_mcp– Use XMLA/TOM authentication to enumerate semantic models in a known workspace by name, serving as a fallback when REST API auth is unavailable.
Querying
execute_dax_query– Execute a DAX query against a semantic model, enabling business questions to be answered by generating and running DAX.
Click on "Deploy 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., "@mcp-powerBI get the full catalog of workspaces and semantic models"
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.
mcp-powerBI
Claude-compatible MCP server for discovering Fabric/Power BI workspaces and semantic models.
This repo is intentionally based around Microsoft's official powerbi-modeling-mcp:
get_catalog,list_workspaces, andlist_semantic_modelsuse the Power BI REST API for tenant/workspace discovery.list_semantic_models_in_workspace_via_modeling_mcplaunches Microsoft@microsoft/powerbi-modeling-mcpand uses its XMLA/TOM auth path to enumerate semantic models inside a known workspace.
That split is necessary because Microsoft Power BI Modeling MCP can connect and model/query semantic models, but it does not expose a tenant-wide workspace discovery tool.
Tools
auth_statusstart_device_logincomplete_device_loginlist_workspaceslist_semantic_modelsget_cataloglist_semantic_models_in_workspace_via_modeling_mcpget_known_workspace_catalogexecute_dax_query
Related MCP server: Power BI MCP for Claude
Install
npm install
npm run setup
npm run buildnpm run setup asks for:
Azure app display name
Directory tenant ID/domain
Application client ID
Client secret value
Microsoft
powerbi-modeling-mcpcommand and argsKnown workspace names
Default CEO workspace
Optional default semantic model fallback
It writes a local .env file with mode 0600. The MCP server loads this file automatically on start.
Claude Desktop config
Use the built JS after npm run build.
For this machine, start from docs/claude-desktop-config.example.json. It points the wrapper to the already installed Microsoft native binary:
/Users/ducna/.codex/mcp/powerbi-modeling-mcp/node_modules/@microsoft/powerbi-modeling-mcp-darwin-arm64/dist/powerbi-modeling-mcpGeneric service-principal config:
{
"mcpServers": {
"mcp-powerbi": {
"command": "node",
"args": ["/absolute/path/to/mcp-powerBI/dist/server.js"],
"env": {
"POWERBI_TENANT": "vnu.edu.vn",
"POWERBI_CLIENT_ID": "<app-client-id>",
"POWERBI_CLIENT_SECRET": "<client-secret-value>",
"POWERBI_MODELING_MCP_COMMAND": "/absolute/path/to/powerbi-modeling-mcp",
"POWERBI_MODELING_MCP_ARGS": "--start"
}
}
}
}For local development:
{
"mcpServers": {
"mcp-powerbi": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/mcp-powerBI/src/server.ts"]
}
}
}Authentication
The server checks auth in this order:
POWERBI_ACCESS_TOKENservice principal:
POWERBI_TENANT,POWERBI_CLIENT_ID,POWERBI_CLIENT_SECRETcached delegated user token from
start_device_login/complete_device_login
For production Claude usage, service principal is the most reliable option.
Power BI tenant/admin requirements:
Enable Allow service principals to use Power BI APIs.
Add the service principal to the relevant workspaces, or to an allowed security group.
App/API permissions should allow workspace and dataset reads. In practice this normally means Power BI REST API application permissions such as
Workspace.Read.AllandDataset.Read.All, with admin consent where required.Power BI Remote MCP Preview is a separate tenant setting for Microsoft's hosted remote MCP endpoint. It is not the same as allowing service principals to call Power BI APIs.
Usage Examples
Ask Claude:
Use mcp-powerbi to get the full catalog of workspaces and semantic models.or:
Use mcp-powerbi to list semantic models in workspace test-mcp via Microsoft Modeling MCP.The second path works when the workspace name is already known and Microsoft powerbi-modeling-mcp can authenticate to XMLA.
If the workspace/model is not provided, Claude should call get_catalog first. If REST authentication is unavailable, Claude should ask the user for the workspace name instead of guessing.
For a CEO workflow, set:
POWERBI_KNOWN_WORKSPACES=test-mcp
POWERBI_DEFAULT_WORKSPACE=test-mcp
# Optional fallback only. Prefer letting Claude choose from workspace schema.
# POWERBI_DEFAULT_SEMANTIC_MODEL=hospitalThen Claude can use get_known_workspace_catalog to list models from configured workspaces without REST auth, choose the relevant semantic model from schema/context, and call execute_dax_query for follow-up business questions. The wrapper keeps the Microsoft Modeling MCP process alive, so repeated questions reuse the same process and should reduce repeated login prompts.
CEO Operating Mode
For the simplest CEO experience:
Keep Claude Desktop and this MCP server running during the working session.
Avoid restarting Claude between related questions.
Configure
POWERBI_DEFAULT_WORKSPACEandPOWERBI_DEFAULT_SEMANTIC_MODEL.Configure
POWERBI_KNOWN_WORKSPACESandPOWERBI_DEFAULT_WORKSPACE.Treat
POWERBI_DEFAULT_SEMANTIC_MODELas an optional fallback, not a required CEO input.Ask business questions in plain language; Claude should generate DAX and call
execute_dax_query.
The first query in a fresh session can still trigger Microsoft authentication. Follow-up queries in the same running MCP session reuse the existing Microsoft Modeling MCP process and connection.
Environment
Copy .env.example for local shell usage:
cp .env.example .envThen export values before running:
set -a
source .env
set +a
npm run devNotes
list_workspacesusesGET https://api.powerbi.com/v1.0/myorg/groups.list_semantic_modelsusesGET /datasetsfor My workspace orGET /groups/{groupId}/datasetsfor a workspace.The Microsoft Modeling MCP bridge uses
npx -y @microsoft/powerbi-modeling-mcp@latest --startby default. Override withPOWERBI_MODELING_MCP_COMMANDandPOWERBI_MODELING_MCP_ARGSif you have a signed local binary.Local verification notes are in
docs/verification.md.
Available Tools
7 toolsauth_statusPower BI auth statusA
Show which Power BI authentication mode is configured without exposing tokens.
Inputs: no named parameters.
complete_device_loginComplete Power BI device loginA
Poll Microsoft for the pending device-code login and cache the token when authorization is complete.
Inputs: no named parameters.
get_catalogGet workspace and semantic model catalogA
Return all visible workspaces and semantic models via Power BI REST API. This is the preferred tool for open-ended questions such as 'which model should I use?' or 'what workspaces can I access?'.
Inputs: includeMyWorkspace.
list_semantic_modelsList semantic modelsA
List semantic models in My workspace or in a specific workspace by id. Use list_workspaces first to resolve workspace ids. If workspace discovery is not authenticated and the user did not name a workspace, ask the user which workspace to use.
Inputs: workspaceId.
list_semantic_models_in_workspace_via_modeling_mcpList semantic models in known workspace via Microsoft Modeling MCPA
Use Microsoft powerbi-modeling-mcp/XMLA auth to list semantic models inside a known workspace name. This is a fallback when REST workspace discovery auth is unavailable. The workspace name must be explicit; if it is missing, ask the user instead of guessing.
Inputs: workspaceName (required).
list_workspacesList Power BI/Fabric workspacesA
List all Fabric/Power BI workspaces visible to the authenticated account through the Power BI REST API. Use this first when the user does not provide a workspace name or id.
Inputs: includeMyWorkspace.
start_device_loginStart Power BI device loginA
Start delegated user device-code login for Power BI REST API. Use only for one-time local setup; service principal is recommended for production.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have distinct purposes, but 'get_catalog' overlaps with 'list_workspaces' and 'list_semantic_models' by combining their functionality. The descriptions help differentiate, but some confusion is possible.
All names use snake_case and mostly follow a verb_noun pattern. Minor deviations include 'auth_status' (abbreviation) and the very long 'list_semantic_models_in_workspace_via_modeling_mcp', but overall consistent.
7 tools is a reasonable number for a Power BI discovery-focused server. Each tool serves a clear role without excessive redundancy.
The tool set covers authentication and read-only discovery well, but lacks any create, update, delete, or execute operations. For a full Power BI management surface, this is notably incomplete.
Maintenance
Related MCP Connectors
Governed BI MCP. Ask questions of live company data and list workspace sources via OAuth.
Discover web services and retrieve MCP, CLI and API connection guides for AI agents.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Forge designed Power BI projects (.pbip) from your agent, bound to your own semantic model.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables exploring Microsoft Fabric / Power BI workspaces and semantic models, and executing ad-hoc DAX queries.57MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Microsoft Power BI and Fabric, enabling Claude to discover workspaces, semantic models, generate and execute DAX queries, and retrieve report metadata via device-code authentication.14 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables discovery of Power BI workspaces and datasets, retrieval of semantic model definitions (TMDL), and execution of DAX queries through the Power BI and Microsoft Fabric REST APIs, using MSAL/WAM authentication for secure token caching.MIT
- AlicenseAqualityDmaintenanceEnables discovery of Fabric/Power BI workspaces and semantic models, execution of DAX queries, and generation of executive HTML reports with visualizations.11MIT