pbip-mcp

crazy-treyn/pbip-mcp

3.2

If you are the rightful owner of pbip-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The pbip-mcp server is designed to facilitate interaction with Power BI Projects and standalone Semantic Models, enhancing productivity in semantic model development tasks.

Tools
5
Resources
0
Prompts
0

pbip-mcp (Power BI Project MCP Server)

Purpose

An easy and simple way to interact with Power BI Projects and standalone Semantic Models via MCP Clients to improve productivity of typical semantic model development tasks.

Supports both:

  • 📁 PBIP Projects: Directories containing a .pbip file with associated .SemanticModel folders
  • 📂 Standalone Semantic Models: Individual .SemanticModel directories

Installation

Prerequisites:

  • uv
  • Power BI Project (directory with .pbip file) OR Standalone Semantic Model (.SemanticModel folder) using .TMDL format (will not work with .TMSL)
  • MCP Client like VS Code or Claude Desktop

Install MCP server

git clone https://github.com/crazy-treyn/pbip-mcp.git
cd pbip-mcp
uv sync # initialize virtual environment and install dependencies

Add MCP server to MCP Client

{
  "mcpServers": {
    "pbip-mcp": {
      "command": "C:\\{YOUR_GIT_REPO_HERE}\\.venv\\Scripts\\python.exe",
      "args": [
        "-m",
        "pbip_mcp.server"
      ]
    }
  }
}

Available MCP Tools

📊 Tools Overview Matrix

CategoryToolScopePurposeEfficiency
Projectlist_projectsDirectoryFind all PBIP projects🚀 Single call
Projectload_projectSingle projectLoad project metadata🚀 Single call
Modelget_model_detailsEntire modelComplete model analysis🚀 Everything at once
Tableslist_tablesAll tablesBasic table information🚀 Single call
Tablesget_table_detailsSingle tableDeep table analysis⚡ Per table
Columnslist_columnsAll/Single tableColumn information🚀 All tables OR ⚡ per table
Columnsadd_columnSingle tableCreate new column⚡ Per column
Columnsupdate_columnSingle tableModify existing column⚡ Per column
Columnsdelete_columnSingle tableRemove column⚡ Per column
Measureslist_measuresAll/Single tableMeasure information🚀 All tables OR ⚡ per table
Measuresadd_measureSingle tableCreate new measure⚡ Per measure
Measuresupdate_measureSingle tableModify existing measure⚡ Per measure
Measuresdelete_measureSingle tableRemove measure⚡ Per measure
Relationshipslist_relationshipsAll relationshipsRelationship information🚀 Single call

Legend: 🚀 = Bulk operations (high efficiency) | ⚡ = Single item operations

📋 Detailed Tool Reference

Project Management
ToolRequired ParametersOptional ParametersDescription
list_projectsdirectory-Scan directory for all PBIP projects and standalone semantic models
load_projectproject_path-Load complete project structure with metadata and artifact information
Model Analysis
ToolRequired ParametersOptional ParametersDescription
get_model_detailsproject_path*-🚀 BULK: Complete model overview with all tables, columns, measures, relationships, and statistics

*project_path accepts either:

  • Path to PBIP project directory (containing .pbip file)
  • Path to standalone .SemanticModel directory
Table Operations
ToolRequired ParametersOptional ParametersDescription
list_tablesproject_path*-Basic information for all tables (name, counts, visibility flags)
get_table_detailsproject_path*, table_name-Detailed single table analysis including columns, measures, partitions, hierarchies, and relationships
Column Operations
ToolRequired ParametersOptional ParametersDescription
list_columnsproject_path*table_name🚀 BULK: All columns across all tables OR single table columns with summary statistics
add_columnproject_path*, table_name, column_namedata_type, expression, format_string, summarize_by, is_hiddenCreate new regular or calculated column
update_columnproject_path*, table_name, column_namedata_type, expression, format_string, summarize_by, is_hiddenModify existing column properties
delete_columnproject_path*, table_name, column_name-Remove column from table
Measure Operations
ToolRequired ParametersOptional ParametersDescription
list_measuresproject_path*table_name🚀 BULK: All measures across all tables OR single table measures with summary statistics
add_measureproject_path*, table_name, measure_name, expressiondescription, format_stringCreate new DAX measure with validation
update_measureproject_path*, table_name, measure_nameexpression, description, format_stringModify existing measure properties
delete_measureproject_path*, table_name, measure_name-Remove measure from table
Relationship Operations
ToolRequired ParametersOptional ParametersDescription
list_relationshipsproject_path*-All model relationships with cardinality, active status, and summary statistics

Note: All project_path parameters accept either:

  • Path to PBIP project directory (containing .pbip file)
  • Path to standalone .SemanticModel directory

Usage

Once the MCP Client is setup and has connected to the MCP server, start your conversation by providing the full path to either:

  • PBIP Project: Path to the directory containing your .pbip file
  • Standalone Semantic Model: Path directly to your .SemanticModel directory

Supported Path Types

# PBIP Project (directory containing .pbip file)
C:\MyProject\SalesReport\

# Standalone Semantic Model (direct path to .SemanticModel folder)  
C:\MyProject\SalesReport.SemanticModel\

Example Report

There is an example report provided for you to test with so you don't have to use your own, located in the TestReport folder

Example Questions

For PBIP Projects:

  • List all the columns and measures in the table "Fact" in my Power BI Project here: C:\Projects\SalesAnalysis\
  • Get complete model details for: C:\Users\YourName\PowerBI\MyProject\

For Standalone Semantic Models:

  • Analyze all tables and relationships in: C:\Models\SalesData.SemanticModel\
  • Add descriptions to all measures without descriptions in: C:\SemanticModels\Finance.SemanticModel\

General Tasks:

  • Add YTD variants of all my measures using the following date logic: {insert date logic here}
  • Show me all calculated columns across all tables