Purpose
Power BI MCP Server is an MCP (Model Context Protocol) server designed to let AI agents use natural language to manage Power BI workspaces, datasets, and refresh operations. For refresh failure scenarios, the server brings together dataset context, execution errors, same-workspace report dependencies, and optional local PBIP source clues into an evidence package for the agent to suggest next troubleshooting steps, while repair and operational decisions remain the operator's responsibility.
Main Capabilities
According to the source material, the server provides the following capability sections:
- Authentication & Discovery: via
pbi_authcomplete a single authentication, after which the agent can discover workspaces and datasets and use the returned IDs.pbi_diagnose(workspace_id: str, dataset_id: str, refresh_id: str = "") -> strfor refresh diagnostics; whenrefresh_idis empty, it reads the most recent 10 refresh records and selects the first record in API response order that hasstatus == "Failed"andrefreshType == "ViaEnhancedApi". This tool returns a JSON-encoded string containing execution messages, objects, error classification, and PBIP source lookup results.location.SourceObject.TabletheErrormessage will point out the initial candidate table for investigation and its partitions.0xC1450012corresponds toMashupDataAccessError, and the message matchesEmptyColumnReferencein the error catalog; subsequent cancellations may be cascading effects.root_cause_source.partition_source_mwill contain the extracted TMDL partition body (includingsource =). The fictional local TMDL example in the source material showsTable.SelectColumnsrequested an empty column name, while the source defines onlyOrderIdandSalesAmount, thereby corroborating the error pattern. The tool does not select the expected replacement column.fact_salesstart by checking the M expression, and edit only after confirming the expected column and upstream schema; if the intent is to selectSalesAmount, after checking replace{""}with{"SalesAmount"}; validate the changes in Power Query/Power BI Desktop, confirm the local PBIP version is consistent with the deployed model, then publish and retry according to the normal approval process, and finally check the next refresh result to verify recovery.mcp.jsonCursor / Windsurf / Antigravity IDE usepbi_authand display a prompt; the actions include: open the link in a browser, enter the displayed code, sign in with a Microsoft work account, and approve permissions. The token is cached to~/.powerbi-mcp/token.jsonand refreshes automatically; unless access is revoked, there is no need to repeat.
Built into the server and public by default client_id, ready to use out of the box; you can create config.json in the project root for customization. The materials also mention that it includes setup.ps1 script for automating the creation of an app registration via Azure CLI.
Applicable Scenarios
- Refresh troubleshooting: gather execution errors, report dependencies within the same workspace, and local PBIP source clues into an evidence package to help operators locate candidate tables and reports that may still be showing stale data.
- Dataset and refresh management: manage workspaces, datasets, and refresh tasks through natural language.
- Queries and reporting: execute DAX queries (including RLS simulation) and generate refresh reports.
Limitations
- The materials emphasize that the diagnostic examples are simulated demonstrations, not real Power BI executions; all names, IDs, paths, service responses, source code, and agent conclusions are fictitious and do not represent production incidents, successful fixes, or measured time savings.
- When
refresh_idis empty, the first matching failed record in API response order is selected, which may differ from the most recent scheduled or on-demand failure; to investigate a known incident, you should pass itsrequestIdasrefresh_id. - The tool does not select the intended replacement column; repair and operational decisions are the operator's responsibility.
- The materials mention troubleshooting scenarios: an organization may block public client flow (AADSTS7000218), require admin consent (AADSTS65001), require MFA (AADSTS50076/50079), an expired token requires calling
pbi_authagain, and refresh details returning 403 usually indicates insufficient permissions or that the refresh record has expired. - The server is based on FastMCP (
mcp[cli] ≥ 1.6.0) andhttpx ≥ 0.27.0。