PBIXRay

by jonaolden

1 stars
750 downloads
Not rated
GitHub

About

Provides a bridge to analyze Power BI (.pbix) files through a Python-based interface, enabling data model exploration, language querying, and structure analysis with pagination and filtering capabilities.

Details

Author
jonaolden
Repository
jonaolden/pbixray-mcp-server
GitHub stars
1
Downloads
750
License
MIT License
Categories
Developer Tools, Design, File Management, AI, Search, Infrastructure, Other
Tags
#integration

- [x] Loading and analyzing PBIX files
- [x] Data model exploration
- [x] Listing tables in the model
- [x] Retrieving model metadata
- [x] Checking model size
- [x] Getting model statistics
- [x] Getting comprehensive model summary
- [x] Query language access
- [x] Viewing Power Query (M) code
- [x] Accessing M Parameters
- [x] Exploring DAX calculated tables
- [x] Viewing DAX measures
- [x] Examining DAX calculated columns
- [x] Data structure analysis
- [x] Retrieving schema information
- [x] Analyzing table relationships
- [x] Accessing table contents with pagination

The list of tools is configurable, so you can choose which tools you want to make available to the MCP client.
This is useful if you don't use certain functionality or if you don't want to expose sensitive information.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name PBIXRay
    Command (node, npx, python, etc.) wsl.exe
    Arguments
    • Argument 1 bash
    • Argument 2 -c
    • Argument 3 source ~/dev/pbixray-mcp/venv/bin/activate && python ~/dev/pbixray-mcp/src/pbixray_server.py

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via pip install pbixray-mcp-server or clone the repository and install in development mode. Add the server configuration to your MCP client (e.g., Claude Desktop JSON) using command and args for WSL or direct Python. Command-line options include --disallow, --max-rows, and --page-size. Tools support filtering by name and pagination for table contents.

load_pbix_file

Load a Power BI (.pbix) file for analysis.

get_tables

List all tables in the model.

get_metadata

Get metadata about the Power BI configuration.

get_power_query

Display all M/Power Query code used for data transformation.

get_m_parameters

Display all M Parameters values.

get_model_size

Get the model size in bytes.

get_dax_tables

View DAX calculated tables.

get_dax_measures

Access DAX measures with filtering by table or measure name.

get_dax_columns

Access calculated column DAX expressions with filtering options.

get_schema

Get details about the data model schema and column types.

get_relationships

Get the details about the data model relationships.

get_table_contents

Retrieve the contents of a specified table with pagination.

get_statistics

Get statistics about the model with optional filtering.

get_model_summary

Get a comprehensive summary of the current Power BI model.

| Tool | Category | Description |
|-----------------------|-----------|--------------------------------------------------------------------|
| load_pbix_file | Core | Load a Power BI (.pbix) file for analysis |
| get_tables | Model | List all tables in the model |
| get_metadata | Model | Get metadata about the Power BI configuration |
| get_power_query | Query | Display all M/Power Query code used for data transformation |
| get_m_parameters | Query | Display all M Parameters values |
| get_model_size | Model | Get the model size in bytes |
| get_dax_tables | Query | View DAX calculated tables |
| get_dax_measures | Query | Access DAX measures with filtering by table or measure name |
| get_dax_columns | Query | Access calculated column DAX expressions with filtering options |
| get_schema | Structure | Get details about the data model schema and column types |
| get_relationships | Structure | Get the details about the data model relationships |
| get_table_contents | Data | Retrieve the contents of a specified table with pagination |
| get_statistics | Model | Get statistics about the model with optional filtering |
| get_model_summary | Model | Get a comprehensive summary of the current Power BI model |

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "pbixray": {
            "env": {},
            "args": [
                "bash",
                "-c",
                "source ~/dev/pbixray-mcp/venv/bin/activate && python ~/dev/pbixray-mcp/src/pbixray_server.py"
            ],
            "command": "wsl.exe"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "bash",
        "-c",
        "source ~/dev/pbixray-mcp/venv/bin/activate && python ~/dev/pbixray-mcp/src/pbixray_server.py"
    ],
    "command": "wsl.exe"
}

Macos

{
    "env": [],
    "args": [
        "bash",
        "-c",
        "source ~/dev/pbixray-mcp/venv/bin/activate && python ~/dev/pbixray-mcp/src/pbixray_server.py"
    ],
    "command": "wsl.exe"
}

Windows

{
    "env": [],
    "args": [
        "bash",
        "-c",
        "source ~/dev/pbixray-mcp/venv/bin/activate && python ~/dev/pbixray-mcp/src/pbixray_server.py"
    ],
    "command": "wsl.exe"
}

PBIXRay MCP Server

A [Model Context Protocol][mcp] (MCP) server for PBIXRay.

This MCP server exposes the capabilities of PBIXRay as tools and resources for LLM clients to interact with Power BI (.pbix) files.

Features

- [x] Loading and analyzing PBIX files
- [x] Data model exploration
- [x] Listing tables in the model
- [x] Retrieving model metadata
- [x] Checking model size
- [x] Getting model statistics
- [x] Getting comprehensive model summary
- [x] Query language access
- [x] Viewing Power Query (M) code
- [x] Accessing M Parameters
- [x] Exploring DAX calculated tables
- [x] Viewing DAX measures
- [x] Examining DAX calculated columns
- [x] Data structure analysis
- [x] Retrieving schema information
- [x] Analyzing table relationships
- [x] Accessing table contents with pagination

The list of tools is configurable, so you can choose which tools you want to make available to the MCP client.
This is useful if you don't use certain functionality or if you don't want to expose sensitive information.

Tools

| Tool | Category | Description |
|-----------------------|-----------|--------------------------------------------------------------------|
| load_pbix_file | Core | Load a Power BI (.pbix) file for analysis |
| get_tables | Model | List all tables in the model |
| get_metadata | Model | Get metadata about the Power BI configuration |
| get_power_query | Query | Display all M/Power Query code used for data transformation |
| get_m_parameters | Query | Display all M Parameters values |
| get_model_size | Model | Get the model size in bytes |
| get_dax_tables | Query | View DAX calculated tables |
| get_dax_measures | Query | Access DAX measures with filtering by table or measure name |
| get_dax_columns | Query | Access calculated column DAX expressions with filtering options |
| get_schema | Structure | Get details about the data model schema and column types |
| get_relationships | Structure | Get the details about the data model relationships |
| get_table_contents | Data | Retrieve the contents of a specified table with pagination |
| get_statistics | Model | Get statistics about the model with optional filtering |
| get_model_summary | Model | Get a comprehensive summary of the current Power BI model |

Usage

WSL (Recommended)

Add the server configuration to your client configuration file. For example, for Claude Desktop:

{
  "mcpServers": {
    "pbixray": {
      "command": "wsl.exe",
      "args": [
        "bash",
        "-c",
        "source ~/dev/pbixray-mcp/venv/bin/activate && python ~/dev/pbixray-mcp/src/pbixray_server.py"
      ]
    }
  }
}

WSL Path conversion (Claude Project instructions for instance)

When using the PBIXRay MCP Server in WSL with Claude Desktop on Windows, you need to be aware of path differences when loading PBIX files.
Windows paths (like C:\Users\name\file.pbix) cannot be directly accessed in WSL. Let your AI assistant know how to convert between pats by adding
"Note that mcp server is running in wsl. Windows paths (like C:\Users\name\file.pbix) cannot be directly accessed in WSL. Instead, use WSL paths when referencing files:

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.