Skip to main content
Glama
Power BI Local MCP

Power BI Local MCP

by togrulh

Power BI Local MCP

Describe a dashboard in plain language. An MCP client uses this local server to bind existing measures and columns to Power BI visuals. The server creates a validated new project copy without opening Power BI Desktop or changing the source.

Quick start: Build a dashboard with Codex

These steps use Windows PowerShell. You need Git, Node.js 22 or newer, and the Codex CLI on your PATH. Power BI Desktop is only needed to open and interact with the finished report.

1. Install and create the sample project

git clone https://github.com/togrulh/powerbi-local-mcp.git
cd powerbi-local-mcp
npm.cmd ci
npm.cmd run demo

This creates workspace/RetailDemo/RetailDemo.pbip with embedded synthetic data. No database connection or credentials are required for the demo.

2. Connect the MCP server to Codex

Run this from the same repository folder:

$repo = (Get-Location).Path
codex mcp add powerbi-local --env "POWERBI_MCP_ROOT=$repo/workspace" -- node "$repo/src/server.mjs"
codex mcp list

When powerbi-local appears in the list, start a new Codex session so it loads the server. Codex starts the server when needed; there is no separate service to launch.

3. Ask Codex to build a dashboard

Use the powerbi-local MCP server to inspect RetailDemo. Create a new project called SalesReview with Revenue, Orders, and Average order value KPI cards, a monthly Revenue line chart, and a Channel slicer. Validate the result and give me the path to the new .pbip file.

Open workspace/SalesReview/SalesReview.pbip in Power BI Desktop. On the first open, select Home > Refresh to load the sample data. Try selecting Online in the Channel slicer. The original RetailDemo project stays unchanged.

Running the same prompt again? Choose a different output name. The server will not overwrite an existing project.

Related MCP server: powerbi-mcp-server

Try the retail demo

The retail dashboard fits on one page. Four KPIs sit above a monthly revenue trend, a donut chart showing the share of revenue by sales channel, and a quarterly revenue comparison. The dropdown in the header updates all three charts and all four KPIs.

Retail performance dashboard with all channels selected

View the Online-only screenshot. Selecting Online changes revenue to 114,312, orders to 2,622, and Q4 versus Q3 revenue growth to +22.2%. The donut shows the share of revenue within the selected channels.

Open RetailDemo.pbip in a recent Power BI Desktop. On the first open, choose Home > Refresh to load the embedded sample. No database, account, or credentials are needed. The 36 fictional rows cover 12 months and three sales channels. With all channels selected, the dashboard shows 399,426 revenue, 9,126 orders, 43.77 average order value, and +19.4% Q4 versus Q3 revenue growth.

Connect another MCP client

Configure a local stdio server in your MCP-capable client. For clients that use an mcpServers JSON file:

{
  "mcpServers": {
    "powerbi-local": {
      "command": "node",
      "args": ["C:/path/to/powerbi-local-mcp/src/server.mjs"],
      "env": { "POWERBI_MCP_ROOT": "C:/path/to/powerbi-local-mcp/workspace" }
    }
  }
}

Use absolute paths for both values. The server does not listen on a port. The client interprets plain language; the server runs the structured actions.

Use the same prompt as in the Codex quick start. The client calls inspect_project, then create_dashboard, and can call validate_report on the result. To adjust an existing layout, use edit_layout to change visual titles, sizes or positions in a separate copy.

Bring your own report

Put one project in a folder under the configured workspace, with its folder and .pbip sharing a name. This release requires the enhanced PBIR report format and a TMSL model.bim local semantic model. It does not inspect TMDL models or remotely bound semantic models. The first release creates new pages using three cards, a line or bar chart, and a slicer.

The server does not create measures, refresh a database, convert to PBIX, or deploy to Fabric. Power BI Desktop is needed for rendering and PBIX export. Report validation may fetch public Microsoft JSON schemas; it does not need your database or a Fabric account. External source paths are not rewritten in authored copies.

Data and safety

The repository demo is generated from scratch, contains no real business data, and has no external data source. The server rejects path traversal and project symlinks, does not overwrite projects, and omits local Power BI cache files when making copies. Keep only trusted projects in the configured folder. Power Query and DAX definitions in a source project are carried over unchanged; review a project's definitions before sharing it. Tool output includes field names and visual bindings that an MCP client may send to its model.

This is an independent project, not a Microsoft product. It uses Microsoft's Power BI report authoring toolkit for structural validation.

Available Tools

5 tools
create_dashboardB

Add three KPI cards, a chart and a slicer in a new validated copy. Use inspect_project first; the source is not changed.

Inputs: name (required), page (required), cards (required), chart (required), +4 more.

create_retail_demoA

Create a fully synthetic retail sales PBIP. No source connection or credentials needed.

Inputs: no named parameters.

edit_layoutB

Change the titles or positions of existing ungrouped visuals in a new validated copy. Keeps field bindings and filters.

Inputs: name (required), pageId (required), source (required), changes (required).

inspect_projectB
Read-only

List visible model fields and existing pages and visual bindings in a local PBIP with model.bim.

Inputs: name (required).

validate_reportB
Read-only

Run Microsoft PBIR structural validation on a local report. Does not evaluate report data.

Inputs: name (required).

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 5 tools

    Disambiguation4/5

    Each tool targets a distinct phase: scaffolding a demo project, inspecting, adding visuals, editing layout, and validating. The only mild overlap is between create_retail_demo and create_dashboard, since both 'create' report content, but the descriptions make clear one builds a whole synthetic PBIP and the other extends an existing one.

    Naming Consistency5/5

    All five tools follow a strict verb_noun snake_case pattern (create_retail_demo, inspect_project, create_dashboard, edit_layout, validate_report). No mixed conventions or vague one-word names.

    Tool Count5/5

    Five tools is a tight, well-scoped set for a local PBIP manipulation server, and each tool maps to a distinct step in the workflow (scaffold, inspect, build, edit, validate). Nothing feels redundant or padded.

    Completeness3/5

    The surface covers a reasonable lifecycle (inspect -> create -> edit -> validate), but there are notable gaps: no way to create a blank/non-retail project, no visual deletion or generic visual creation, and no page-level operations. Agents needing anything beyond layout tweaks or the canned KPI dashboard will hit a dead end.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      C
      maintenance
      Enables natural-language interaction with Power BI REST API through MCP tools, allowing GenAI applications to access approved business intelligence capabilities and analytics.
      8
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables an AI assistant to build Power BI projects end to end: data modeling (tables, DAX measures, relationships, calculation groups, roles, field parameters) against an open Power BI Desktop via TOM/XMLA, and reports (pages, visuals, formatting, bookmarks, themes) as PBIR files in a .pbip project. Every visual is cross-checked against the real model before being written, so generated dashboards don't break on open.
      MIT