Power BI MCP Server
This MCP server lets you inspect, audit, and safely edit Power BI PBIP semantic models and report layouts.
Discover, refresh, and summarize PBIP workspaces, including object counts and health summaries.
Inspect semantic models: list tables, get table schemas, search measures, extract partition SQL, and analyze cross-layer impact.
Inspect report layouts: list pages and visuals, and resolve visual field bindings by ID or title.
Safely mutate projects: update measure DAX, replace table SQL, add/remove visual fields, and rename measures with dry-run, preconditions, diffs, backups, and rollback.
Run analyst workflows: find unused objects, format DAX, generate measure documentation, and check BPA rules.
Validate TMDL syntax and PBIR JSON integrity across a workspace.
Use MCP resources/prompts for workspace summaries, BPA reports, guided audits, and measure-update workflows.
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 Rename the Sales table's Revenue measure to Total Revenue across the report."
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.
PBI MCP Server
Local-first MCP server for inspecting, auditing, and safely editing Power BI PBIP projects (.SemanticModel TMDL and .Report PBIR layouts).
Highlights
Consolidated
src/pbi_mcp_server/Architecture: Clean package hierarchy separating Workspace Discovery (workspace_registry,pbip_references), Semantic Model (engine_a), Report Layout (engine_b), Cross-Layer Lineage (lineage), Standardized Mutations (mutation), Partition SQL (tmdl_sql), Analyst Superpowers (analyst), and Agent Workflows (workflows).Compact 20-Tool Surface: Focused, high-leverage tools designed for LLM coding and analytics agents with optional pagination (
limit,offset) and precondition guards (expected_current_expression,expected_replacements).Cross-Layer Dependency Graph: Traces lineage from Partition SQL (
source_tables,sql_fields) $\rightarrow$ TMDL Tables & Columns (sourceColumn) $\rightarrow$ DAX Calculated Columns & Measures $\rightarrow$ PBIR Visual Field Bindings & Report Pages.Hardened Mutation Pipeline:
Ambiguity detection (
AMBIGUOUS_WORKSPACE,AMBIGUOUS_OBJECT) before any analysis or edit.Precondition verification (
PRECONDITION_FAILED) to prevent overwriting stale expressions.Unified diff previews (
MutationDiff) duringdry_run=True.Multi-file atomic backups and automatic rollback (
ROLLBACK_COMPLETED) if post-write TMDL or PBIR validation fails.
Expanded Power BI Analyst Toolkit:
find_unused_objects: Detects unreferenced measures, unused columns, and dead-branch (indirectly_referenced_only) objects.format_dax: Formats single-line and multi-lineVAR/RETURNDAX expressions to SQLBI conventions.generate_measure_docs: Synthesizes lineage-aware///TMDL documentation comments for measures.check_model_bpa: Audits both Semantic Model and Report Layout against 11 Best Practice Analyzer rules (bidirectional relationships, many-to-many relationships, broken relationship endpoints, unhidden foreign keys, missing format strings, missing descriptions, direct/division, floating-point columns, complex calculated columns, broken visual bindings, empty report pages, and duplicate visuals).
Related MCP server: Power BI Desktop Local MCP Server
MCP Tools (20 Total)
1. Workspace Discovery & Lifecycle (3 tools)
Tool | Description |
| List discovered PBIP workspaces with deterministic |
| Get workspace paths, validity status, object counts, scan diagnostics, and BPA |
| Re-scan configured workspace roots and refresh registry state. |
2. Semantic Model Inspection & Search (5 tools)
Tool | Description |
| List tables with |
| Retrieve complete table schema (columns, measures, relationships, partition metadata, and SQL source). |
| Search across measure names, qualified names, DAX formulas, and descriptions. |
| Extract partition SQL query with line numbers, M context, and parsed SQL metadata. |
| Cross-layer upstream (SQL, partitions, columns, measures) and downstream (measures, columns, relationships, visuals, pages) impact analysis. |
3. Report Layout & Visuals (3 tools)
Tool | Description |
| List report pages with |
| List visuals with |
| Resolve a visual unambiguously by ID or title and inspect its role-grouped field bindings. |
4. Safe Mutations (4 tools)
Tool | Description |
| Update an existing measure's DAX or create a new measure ( |
| Surgically replace lines or blocks inside a table's |
| Add or remove measures/columns on visual roles without altering visual layout or styling. |
| Atomically rename a measure across TMDL declarations, DAX formulas, and report visuals. |
5. Power BI Analyst Toolkit (4 tools)
Tool | Description |
| Identify unused measures, unused columns, and dead-branch ( |
| Standardize DAX formatting standalone or in-place in TMDL. |
| Generate and write lineage-aware |
| Audit the Semantic Model and Report Layout against 11 Best Practice Analyzer rules. |
6. Validation (1 tool)
Tool | Description |
| Validate TMDL syntax, balanced fences, measure expressions, and PBIR JSON integrity. |
MCP Resources & Prompts (Zero Tool-Surface Overhead)
In addition to the 20 tools above, the server exposes MCP Resources (for instant context attachment) and MCP Prompts (for slash-command workflows in Claude Desktop, Cursor, or Antigravity):
MCP Resources
pbip://workspaces: Live JSON list of all discovered PBIP workspaces and theirworkspace_ids.pbip://workspace/{workspace}/summary: Object counts (tables, columns, measures, relationships, partitions, calculation groups, RLS roles, pages, visuals) and BPAhealth_summary.pbip://workspace/{workspace}/bpa: Full Best Practice Analyzer report for the workspace.
MCP Prompts
workflow_model_audit(workspace?): Guided 4-step Semantic Model & Report Layout audit prompt.workflow_measure_update(measure_name, new_dax, workspace?): Guided 5-stage prompt for resolving, impact-analyzing, dry-running, applying, and validating a measure update or creation.
Configuration & Environment Variables
Variable | Default | Description |
| (None) | Default single |
|
| Create |
|
| Logging verbosity ( |
|
| Set to |
|
| Redact sensitive user/OneDrive home directory segments in log output. |
Running Locally
# Run full test suite
.venv/bin/pytest
# Start server for a single PBIP project
.venv/bin/pbi-mcp-server --workspace ./sample_project.pbip
# Start server across one or more workspace root directories
.venv/bin/pbi-mcp-server --workspace-root "/path/to/pbip-projects"Domain & Architecture Documentation
GLOSSARY.md: Ubiquitous domain language for PBIP workspaces, TMDL, PBIR, lineage, and mutations.docs/agent-workflows.md: Canonical multi-step agent workflow recipes and precondition guidelines.docs/adr/: Architecture Decision Records (0001through0005).docs/agents/: Engineering skill configurations for issue tracking and domain docs.
Available Tools
20 toolsanalyze_impactA
Analyze where a measure or column is referenced across TMDL formulas and report visuals.
Inputs: term (required), workspace. Returns: object
check_model_bpaB
Run Best Practice Analyzer rules against the semantic model (keys, relationships, types, DAX).
Inputs: workspace. Returns: object
find_unused_objectsB
Scan the semantic model and report layout to identify unused measures and unreferenced columns.
Inputs: workspace. Returns: object
format_daxB
Standardize DAX formatting (uppercase functions, clean operator spacing) standalone or in TMDL.
Inputs: table, dry_run, workspace, measure_name, +1 more. Returns: object
generate_measure_docsC
Generate and write a /// TMDL documentation docstring for a measure.
Inputs: measure_name (required), table, dry_run, workspace, +1 more. Returns: object
get_tableA
Retrieve complete table schema including columns, measures, relationships, and SQL source.
Inputs: table_name (required), workspace. Returns: result
get_table_sqlB
Extract the partition SQL query (with line numbers and M context) for a table.
Inputs: partition, workspace, table_name. Returns: object
get_visualA
Get a visual's details and current role-grouped field bindings by ID or title.
Inputs: visual_id_or_title (required), page, workspace. Returns: result
get_workspaceB
Get metadata and object counts for a PBIP workspace.
Inputs: workspace. Returns: object
list_report_pagesA
List all report pages with their display names and visual counts.
Inputs: workspace. Returns: result
list_tablesB
List all tables in the semantic model with column/measure counts and native SQL status.
Inputs: workspace. Returns: result
list_visualsB
List visuals in the report with their titles, types, and field bindings.
Inputs: page, query, workspace. Returns: result
list_workspacesA
List discovered PBIP workspaces, optionally filtered by query.
Inputs: query. Returns: result
refresh_workspacesB
Re-scan configured workspace roots and refresh discovered PBIP projects.
Inputs: no named parameters. Returns: result
rename_measureB
Atomically rename a measure across TMDL declarations, DAX formulas, and report visuals.
Inputs: new_name (required), old_name (required), dry_run, workspace. Returns: object
search_measuresB
Find measures across the semantic model and return their table, name, DAX expression, and description.
Inputs: query, table, workspace. Returns: result
update_measure_daxA
Update a measure's DAX expression in TMDL while preserving surrounding formatting.
Inputs: expression (required), measure_name (required), table, dry_run, +1 more. Returns: object
update_table_sqlC
Surgically replace a line or block inside a table's Value.NativeQuery SQL expression.
Inputs: new_text (required), old_text (required), dry_run, partition, +3 more. Returns: object
update_visual_fieldsA
Add or remove measures and columns on a visual without modifying visual styling or layout.
Inputs: visual_id_or_title (required), page, dry_run, workspace, +2 more. Returns: object
validate_workspaceB
Run structural and syntax validation across TMDL and PBIR report JSON.
Inputs: workspace. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Most tools target distinct resources and actions (workspace, table, measure, visual, SQL, DAX, validation). There is some overlap between analyze_impact and find_unused_objects, and between list/get pairs, but descriptions make the intended boundaries mostly clear.
All tools use a consistent snake_case verb_noun pattern (e.g. list_workspaces, get_table, update_measure_dax, validate_workspace). Minor abbreviations like bpa are readable and do not break the convention.
At 20 tools, the surface is on the heavy side for a single MCP server, though the breadth of workspace/model/report operations explains much of it. The count is borderline rather than clearly well-scoped.
Read and edit coverage is strong across workspaces, tables, measures, visuals, SQL, and validation. However, there are notable lifecycle gaps: no create/delete measure or table, no visual/page creation, and no relationship editing, which limits end-to-end modeling workflows.
Maintenance
Related MCP Connectors
Forge designed Power BI projects (.pbip) from your agent, bound to your own semantic model.
Manage SysML2 projects; check, evaluate, verify, query, document and diagram models.
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
The Buildkite MCP server exposes Buildkite product data (pipelines, builds, jobs, and test data) to AI tools, editors, and agents through the Model Context Protocol. It provides capabilities including pipeline creation and management, build monitoring with specialized tools like 'wait_for_build', efficient log querying using Apache Parquet conversion and caching, and OAuth-based authentication for both read-write and read-only access to Buildkite's REST API.
Related MCP Servers
- FlicenseCqualityDmaintenanceCreates, inspects, validates, and modifies Power BI Project (.pbip) folders, generating PBIR-style reports and TMDL semantic models from structured inputs.52-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to discover and interact with local Power BI Desktop instances, including inspecting table/column schema and executing DAX queries.2-
- AlicenseAqualityBmaintenanceEnables local Power BI project (.pbip) automation, including model (TMDL) and report (PBIR) layer manipulation, without cloud dependencies. Provides 56 tools for building, editing, and validating reports and measures through natural language prompts.13MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying open Power BI Desktop models locally, including discovering instances, listing tables and measures, and running DAX queries without cloud login or publishing.MIT