Home / MCP / Power BI MCP Server

Power BI MCP Server

Enterprise-grade server enabling AI-assisted Power BI queries, PBIP editing, and secure model management across Desktop and Service.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "powerbi": {
            "command": "python",
            "args": [
                "C:/path/to/powerbi-mcp-v2/src/server.py"
            ],
            "env": {
                "PYTHONPATH": "C:/path/to/powerbi-mcp-v2/src"
            }
        }
    }
}

You will run a powerfully integrated Power BI MCP Server that bridges AI assistants with Power BI Desktop and Power BI Service. It supports semantic model querying, bulk model edits via PBIP, security controls, and RLS testing, all while keeping visuals intact during safe edits.

How to use

You interact with the server through an MCP client to connect to either Power BI Desktop or Power BI Service, and to perform model queries, DAX execution, and bulk edits. Use PBIP safe editing to rename tables, columns, and measures without breaking reports. Start by loading a PBIP project, then apply renames, and finally reopen Power BI to see updated visuals and model references.

How to use with the client

1. Connect to a local Power BI Desktop instance or a cloud Power BI Service endpoint.

2. Discover model structure: list tables, columns, and measures to understand current references.

3. Run DAX queries or perform bulk operations to rename elements, all while the PBIP layer keeps visuals and cultures in sync.

4. For bulk edits, use PBIP safe editing commands to load a project, apply renames, and reopen Power BI to validate visuals.

Example workflow: Safe bulk rename with PBIP

Close Power BI Desktop if it is open. Load your PBIP project, perform renames for tables and related entities, then reopen Power BI Desktop to verify that visuals and report bindings remain intact.

Short usage pattern

Typical commands you will use include discovering instances, connecting to a model, listing tables, and running DAX. You will also run PBIP rename operations to safely update model names across both the semantic model and the report visuals.

Available tools

desktop_discover_instances

Auto-discover running Power BI Desktop instances on the local machine.

desktop_connect

Connect to a specific Power BI Desktop instance with optional Row-Level Security (RLS) role for testing.

desktop_list_tables

List all tables in the connected Power BI model.

desktop_list_columns

List columns for a specific table in the connected model.

desktop_list_measures

List all measures and their DAX expressions in the current model.

desktop_execute_dax

Execute a DAX query against the connected model with security processing.

desktop_get_model_info

Retrieve comprehensive metadata about the Power BI model.

list_workspaces

List accessible Power BI Service workspaces.

list_datasets

List datasets within a Power BI Service workspace.

list_tables

List tables via XMLA endpoint for cloud datasets.

list_columns

List columns for a specific table in cloud datasets.

execute_dax

Execute DAX queries against cloud datasets.

get_model_info

Retrieve model information using INFO.VIEW-like queries against the cloud model.

security_status

View current security configuration, including PII masking settings.

security_audit_log

Query recent audit log entries for compliance and debugging.

desktop_list_rls_roles

List RLS roles defined in the local model for testing.

desktop_set_rls_role

Activate a specific RLS role for testing in the local model.

desktop_rls_status

Get the current RLS testing status.

pbip_load_project

Load a PBIP project for editing and safe operations.

pbip_get_project_info

Return project structure information and detect PBIR format.

pbip_rename_tables

Comprehensive rename across model and report layer with automatic quoting and visuals updates.

pbip_rename_columns

Rename columns across both model and report visuals.

pbip_rename_measures

Rename measures with model and report layer updates.

pbip_fix_broken_visuals

Repair visual references after renames performed outside PBIP.

pbip_fix_dax_quoting

Fix any remaining unquoted table names in DAX expressions.

pbip_scan_broken_refs

Scan project for broken references by comparing model against visuals.

pbip_validate

Validate TMDL syntax, identify quoting issues, and fix invalid references.