Power BI 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., "@Power BI MCP Server Show me total sales by region for 2024"
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.
Power BI MCP Server
An MCP (Model Context Protocol) server that connects to Power BI semantic models, enabling natural language queries via DAX through AI assistants like Claude.
Features
List workspaces — Browse all Power BI workspaces you have access to
List datasets — See semantic models in any workspace
Discover model schema — Inspect tables, columns, measures, and data types via DMV queries
Execute DAX queries — Run DAX
EVALUATEstatements and get structured resultsRefresh datasets — Trigger and monitor dataset refreshes
Get dataset details — View metadata for any semantic model
Related MCP server: Microsoft Fabric MCP Server
Authentication
Authenticates with Microsoft Entra ID, following the same patterns as the Azure MCP and Azure DevOps MCP servers. Three modes are supported:
Mode | Flag | Description |
Interactive (default) |
| Opens a browser for OAuth login |
Azure CLI |
| Uses your |
Environment |
| Uses |
You can optionally pass --tenant <tenant-id> for single-tenant or B2B scenarios.
Setup
Prerequisites
Node.js 18+
An Azure/Microsoft Entra ID account with access to Power BI
Install from npm
npm install -g powerbi-mcp-serverConfigure in Claude Code
Add to your Claude Code MCP settings (~/.claude/settings.json or project .claude/settings.json):
{
"mcpServers": {
"powerbi": {
"command": "npx",
"args": ["-y", "powerbi-mcp-server", "--authentication", "interactive"]
}
}
}For Azure CLI authentication (if you're already logged in via az login):
{
"mcpServers": {
"powerbi": {
"command": "npx",
"args": ["-y", "powerbi-mcp-server", "--authentication", "azcli"]
}
}
}With a specific tenant:
{
"mcpServers": {
"powerbi": {
"command": "npx",
"args": ["-y", "powerbi-mcp-server", "--authentication", "interactive", "--tenant", "your-tenant-id"]
}
}
}Build from source
git clone https://github.com/mbmccormick/powerbi-mcp-server.git
cd powerbi-mcp-server
npm install
npm run buildAvailable Tools
list_workspaces
List all Power BI workspaces the authenticated user has access to.
list_datasets
List datasets (semantic models) in a workspace.
workspaceId(optional) — omit for "My Workspace"
get_dataset
Get detailed information about a specific dataset.
datasetId(required)workspaceId(optional)
get_tables
List tables in a dataset via the REST API.
datasetId(required)workspaceId(optional)
discover_model
Discover the full schema of a semantic model (tables, columns, measures) using DMV queries. This is the best tool to call first before writing DAX queries.
datasetId(required)workspaceId(optional)
execute_dax_query
Execute a DAX query against a semantic model.
datasetId(required)query(required) — a valid DAXEVALUATEstatementworkspaceId(optional)
refresh_dataset
Trigger a dataset refresh.
datasetId(required)workspaceId(optional)
get_refresh_history
Get refresh history for a dataset.
datasetId(required)workspaceId(optional)top(optional) — number of entries, defaults to 10
Example Workflow
List workspaces to find your workspace ID
List datasets in that workspace to find your semantic model
Discover model to understand the schema (tables, columns, measures)
Execute DAX queries to answer questions about your data
"Show me total sales by region for 2024"
→ discover_model → execute_dax_query with:
EVALUATE SUMMARIZECOLUMNS('Geography'[Region], 'Date'[Year], "Total Sales", SUM('Sales'[Amount]))Debugging
Set LOG_LEVEL=debug for verbose logging:
{
"mcpServers": {
"powerbi": {
"command": "npx",
"args": ["-y", "powerbi-mcp-server", "--authentication", "interactive"],
"env": {
"LOG_LEVEL": "debug"
}
}
}
}Use the MCP Inspector for interactive testing:
npm run inspectAvailable Tools
8 toolsdiscover_modelA
Discover the schema of a Power BI semantic model using INFO.VIEW DAX functions. Returns tables, columns, measures, and relationships to help you understand the data model before writing DAX queries. Always call this tool first before writing DAX queries against a model.
Inputs: datasetId (required), workspaceId, includeRelationships.
execute_dax_queryA
Execute a DAX query against a Power BI dataset (semantic model) and return the results.
Use this tool to query data from Power BI semantic models using DAX (Data Analysis Expressions). The query must be a valid EVALUATE statement.
Examples:
EVALUATE SUMMARIZECOLUMNS('Date'[Year], "Total Sales", SUM('Sales'[Amount]))
EVALUATE TOPN(10, 'Products', 'Products'[Revenue], DESC)
EVALUATE ROW("Total", CALCULATE(SUM('Sales'[Amount])))
Inputs: query (required), datasetId (required), workspaceId.
get_datasetB
Get detailed information about a specific Power BI dataset (semantic model).
Inputs: datasetId (required), workspaceId.
get_refresh_historyB
Get the refresh history for a Power BI dataset (semantic model).
Inputs: datasetId (required), top, workspaceId.
get_tablesA
List tables in a Power BI push dataset via the REST API. NOTE: This only works for push datasets. For regular semantic models, use the discover_model tool instead.
Inputs: datasetId (required), workspaceId.
list_datasetsA
List Power BI datasets (semantic models) in a workspace, or in 'My Workspace' if no workspace is specified.
Inputs: workspaceId.
list_workspacesA
List all Power BI workspaces the authenticated user has access to.
Inputs: no named parameters.
refresh_datasetC
Trigger a refresh of a Power BI dataset (semantic model).
Inputs: datasetId (required), workspaceId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools are clearly distinct by resource and action: workspace/dataset listing, dataset detail, DAX query, refresh, and refresh history. The only notable overlap is get_tables versus discover_model, but the description explicitly separates push datasets from semantic models.
All tools use a consistent snake_case verb-noun pattern: get_, list_, execute_, refresh_, and discover_. The variation between get_tables and list_datasets is semantically reasonable rather than inconsistent.
Eight tools is well-scoped for a Power BI MCP server focused on discovery, querying, and refresh. Each tool covers a meaningful operation without obvious redundancy.
The surface covers the core semantic-model workflow: list workspaces/datasets, inspect schemas, run DAX, refresh, and inspect refresh history. Minor gaps remain around reports/dashboards, workspace administration, and refresh lifecycle controls such as cancellation or schedules.
Maintenance
Related MCP Connectors
Governed BI MCP. Ask questions of live company data and list workspace sources via OAuth.
Forge designed Power BI projects (.pbip) from your agent, bound to your own semantic model.
Connect AI assistants to Preset to explore data, charts, and dashboards in authorized workspaces.
Connect assistants to your workspace knowledge, skills, and work tools.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Power BI datasets through natural language, allowing users to query data, generate DAX, and get insights without leaving their AI assistant.127MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Microsoft Fabric and Power BI services through the Model Context Protocol. Users can manage workspaces, execute DAX queries, refresh datasets, and create Fabric notebooks using natural language.69 npm2MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to query PowerBI workspaces, datasets, and execute DAX queries through the PowerBI REST API.7MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI applications to discover and connect to Power BI Desktop semantic models, inspect tables, columns, and measures, and validate or execute DAX queries through MCP.-