powerbi-mcp-server
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., "@powerbi-mcp-server List all Power BI workspaces I have access to."
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.
powerbi-mcp
An MCP server that connects Claude (and any MCP-compatible client) to Microsoft Power BI via the Power BI REST API using a Service Principal.
Tools exposed
Tool | Description |
| List all workspaces the SP has access to |
| List datasets in a workspace (or all) |
| Run a DAX query against a dataset and get results |
| Trigger an on-demand dataset refresh |
| List reports in a workspace (or all) |
| Get all pages in a report |
| Get all visuals on a report page |
Related MCP server: Power BI MCP for Claude
Prerequisites
Azure App Registration with these Power BI API permissions (Application, not Delegated):
Dataset.Read.AllDataset.ReadWrite.All(for refresh)Report.Read.AllWorkspace.Read.All
In Power BI Admin Portal → Tenant settings, enable:
Allow service principals to use Power BI APIs
Add the security group containing your App Registration
Add the service principal as a Member or Admin to the workspaces you want to access.
Setup
# Clone and install
git clone <this-repo>
cd powerbi-mcp-server
pip install -e .
# Copy and fill in credentials
cp .env.example .env
# Edit .env with your tenant ID, client ID, client secretConfigure in Claude Code / Claude Desktop
Add this to your MCP configuration (~/.claude/claude_desktop_config.json for Desktop, or claude mcp add for Claude Code):
{
"mcpServers": {
"powerbi": {
"command": "python",
"args": ["-m", "powerbi_mcp"],
"env": {
"POWERBI_TENANT_ID": "your-tenant-id",
"POWERBI_CLIENT_ID": "your-client-id",
"POWERBI_CLIENT_SECRET": "your-client-secret"
}
}
}
}Or using uv (no install needed):
{
"mcpServers": {
"powerbi": {
"command": "uvx",
"args": ["--from", "/path/to/powerbi-mcp-server", "powerbi-mcp"],
"env": {
"POWERBI_TENANT_ID": "...",
"POWERBI_CLIENT_ID": "...",
"POWERBI_CLIENT_SECRET": "..."
}
}
}
}Claude Code CLI
claude mcp add powerbi \
--command python \
--args "-m powerbi_mcp" \
-e POWERBI_TENANT_ID=your-tenant-id \
-e POWERBI_CLIENT_ID=your-client-id \
-e POWERBI_CLIENT_SECRET=your-client-secretExample prompts
Once connected, you can ask Claude:
"List all Power BI workspaces I have access to."
"Run this DAX query on dataset abc-123: EVALUATE SUMMARIZE(Sales, Sales[Region], "Total", SUM(Sales[Amount]))"
"Refresh the dataset named 'Monthly Sales' in the Finance workspace."
"Show me all the pages and visuals in the Executive Dashboard report."
Development
pip install -e ".[dev]"
python -m powerbi_mcp # runs the MCP server via stdioAvailable Tools
7 toolsexecute_dax_queryB
Execute a DAX query against a Power BI dataset and return results.
Args: dataset_id: The dataset ID to query. dax_query: A valid DAX query string, e.g. "EVALUATE SUMMARIZE(Sales, Sales[Region])". workspace_id: Optional workspace ID that contains the dataset.
Inputs: dax_query (required), dataset_id (required), workspace_id.
get_report_pagesB
Get all pages in a Power BI report.
Args: report_id: The report ID. workspace_id: Optional workspace ID that contains the report.
Inputs: report_id (required), workspace_id. Returns: result
get_report_visualsA
Get all visuals on a specific page of a Power BI report.
Args: report_id: The report ID. page_name: The page name (from get_report_pages). workspace_id: Optional workspace ID that contains the report.
Inputs: page_name (required), report_id (required), workspace_id. Returns: result
list_datasetsA
List datasets in a workspace or across all workspaces.
Args: workspace_id: Optional workspace (group) ID. Omit for the default workspace.
Inputs: workspace_id. Returns: result
list_reportsA
List reports in a workspace or across all workspaces.
Args: workspace_id: Optional workspace ID. Omit for the default workspace.
Inputs: workspace_id. Returns: result
list_workspacesA
List all Power BI workspaces (groups) the service principal has access to.
Inputs: no named parameters. Returns: result
refresh_datasetB
Trigger an on-demand refresh of a Power BI dataset.
Args: dataset_id: The dataset ID to refresh. workspace_id: Optional workspace ID that contains the dataset.
Inputs: dataset_id (required), workspace_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: querying, listing, getting details, or refreshing. No overlap in functionality.
All tool names follow a consistent verb_noun pattern in snake_case, using verbs like execute, get, list, and refresh.
7 tools is well-scoped for a Power BI server covering listing, querying, and refreshing resources without being excessive or too thin.
The tool set covers core read, query, and refresh operations, but lacks create/update/delete capabilities for datasets and reports, which are minor gaps.
Maintenance
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with Microsoft PowerBI REST API, providing tools for data cleaning, transformation, analysis, and visualization within PowerBI.4MIT
- AlicenseNot gradedqualityCmaintenanceMCP 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.21 npm1MIT
- AlicenseAqualityCmaintenanceAn MCP (Model Context Protocol) server that lets AI agents manage Power BI workspaces, datasets, and refreshes via natural language.112MIT
- AlicenseNot gradedqualityDmaintenanceA self-hosted MCP server that proxies MCP clients to Power BI, using your own Entra tenant and Azure subscription. It enables DAX queries, workspace listing, and dataset management while preserving user-specific row-level security.2MIT