The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Power Bi MCP listing page.
An MCP (Model Context Protocol) server that lets AI agents manage Power BI workspaces, datasets, and refreshes via natural language.
| Tool | Description |
|---|---|
pbi_auth | Authenticate via Azure AD device code flow (with token caching & auto-refresh) |
pbi_list_workspaces | List accessible workspaces (with optional name filter) |
pbi_list_datasets | List datasets in a workspace |
| Tool | Description |
|---|---|
pbi_dataset_info | Aggregate dataset metadata + datasources + gateways + refresh schedule + impacted reports + PBIP locate (single call) |
pbi_refresh_dataset | Trigger an Enhanced refresh (supports table-level, polling, retry, timeout) |
pbi_refresh_manage | Refresh lifecycle: view history (status), get execution details (details), or cancel (cancel) |
| Tool | Description |
|---|---|
pbi_diagnose | One-shot diagnostic report for refresh failures — root cause classification, error catalog, next actions, PBIP source hints |
pbi_locate_pbip | Locate PBIP source code for a dataset (fuzzy folder match + optional table TMDL & M source extraction) |
| Tool | Description |
|---|---|
pbi_execute_query | Execute DAX queries against a dataset (supports RLS impersonation) |
pbi_scheduled_refresh_report | Generate a daily scheduled-refresh status report across all datasets in a workspace (JSON or Markdown table) |
Add to your MCP client configuration:
Cursor / Windsurf / Antigravity IDE (mcp.json):
Just use the MCP! On first use, the agent will call pbi_auth and show you a message like:
That's it. Tokens are cached to ~/.powerbi-mcp/token.json and auto-refreshed — you won't need to do this again unless you revoke access.
The server works out of the box with a built-in public client_id. Create a config.json in the project root to customize:
| Key | Default | Description |
|---|---|---|
client_id | Built-in public app | Azure AD App Registration client ID |
token_cache_dir | ~/.powerbi-mcp | Directory for cached OAuth tokens |
pbip_root | (none) | Local PBIP repo root — enables pbi_locate_pbip and pbi_diagnose source-level hints |
A setup.ps1 script is included to automate App Registration creation via Azure CLI. See Advanced Setup below.
AADSTS7000218: The request body must contain ... client_assertionYour organization may block public client flows. Ask your Azure AD admin to either:
setup.ps1)AADSTS65001: The user or administrator has not consentedFirst-time users in a new Azure AD tenant need to consent to Power BI permissions. If your tenant requires admin consent:
setup.ps1 to create your own App Registration where you are the ownerAADSTS50076: MFA required or AADSTS50079Multi-factor authentication is required by your organization. The device code flow supports MFA — complete the MFA challenge in your browser when prompted.
Not authenticated. Call pbi_auth first.Token has expired and could not be refreshed. The agent should automatically re-trigger pbi_auth. If it doesn't, ask the agent to call pbi_auth again.
By default, tokens are cached at ~/.powerbi-mcp/token.json. Make sure:
A 403 on pbi_refresh_manage action=details typically indicates insufficient permissions or the refresh record has expired.
For organizations that require their own App Registration:
This creates an Azure AD App Registration with the correct configuration:
| Setting | Value |
|---|---|
| Sign-in audience | Multi-tenant (any Azure AD directory) |
| Public client flows | Enabled |
| Redirect URI | https://login.microsoftonline.com/common/oauth2/nativeclient |
| API Permissions | Power BI Service: Dataset.ReadWrite.All, Workspace.Read.All (Delegated) |
mcp[cli] ≥ 1.6.0) — MCP server framework, stdio transportMIT