SuperAPIAI Directory

power-bi-mcp

github.com · AI developer platforms

Power BI refresh with table-level polling and retry, refresh diagnostics, DAX queries with RLS simulation, PBIP source locating and refresh reports.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

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_auth complete 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 = "") -> str for refresh diagnostics; when refresh_id is empty, it reads the most recent 10 refresh records and selects the first record in API response order that has status == "Failed" and refreshType == "ViaEnhancedApi" . This tool returns a JSON-encoded string containing execution messages, objects, error classification, and PBIP source lookup results. location.SourceObject.Table the Error message will point out the initial candidate table for investigation and its partitions. 0xC1450012 corresponds to MashupDataAccessError, and the message matches EmptyColumnReference in the error catalog; subsequent cancellations may be cascading effects.root_cause_source.partition_source_m will contain the extracted TMDL partition body (including source =). The fictional local TMDL example in the source material shows Table.SelectColumns requested an empty column name, while the source defines only OrderId and SalesAmount, thereby corroborating the error pattern. The tool does not select the expected replacement column. fact_sales start by checking the M expression, and edit only after confirming the expected column and upstream schema; if the intent is to select SalesAmount, 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 use pbi_auth and 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.json and 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_id is 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 its requestId as refresh_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) and httpx ≥ 0.27.0。
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools