Skip to main content
Glama
Power BI MCP Server

Power BI MCP Server

by mbmccormick

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 EVALUATE statements and get structured results

  • Refresh 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)

--authentication interactive

Opens a browser for OAuth login

Azure CLI

--authentication azcli

Uses your az login session

Environment

--authentication env

Uses DefaultAzureCredential (service principal env vars, managed identity, etc.)

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-server

Configure 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 build

Available 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 DAX EVALUATE statement

  • workspaceId (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

  1. List workspaces to find your workspace ID

  2. List datasets in that workspace to find your semantic model

  3. Discover model to understand the schema (tables, columns, measures)

  4. 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 inspect

Available Tools

8 tools
discover_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

    A3.6/5.0

    Scored across 8 tools

    Disambiguation4/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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.
      127
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables 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.
      6
      9 npm
      2
      MIT