home / mcp / pbixray mcp server

PBIXRay MCP Server

MCP server to give llms such as Claude, GitHub Copilot etc full PowerBI model context (from input .pbix) through tools based on PBIXRay python package.

Installation
Add the following to your MCP client configuration file.

Configuration

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

You can run the PBIXRay MCP Server to expose Power BI PBIX file analysis as MCP tools for large language model clients. This server lets you load PBIX files, explore the data model, view M and DAX code, inspect model metadata, and paginate table contents, all through a consistent MCP interface.

How to use

You will connect to the PBIXRay MCP Server from an MCP client. Once connected, you can load a PBIX file, list the tables in the model, inspect metadata and statistics, view Power Query (M) code and parameters, explore DAX calculated tables, measures, and columns, and retrieve schema details and table contents with pagination. Use the available tools to compose queries that retrieve exactly the data you need, then paginate results as necessary to manage large tables.

Your MCP client can enable or disable individual tools to control what information is exposed. This is useful if you want to limit sensitive data or only expose features you rely on.

How to install

Prerequisites: Python must be installed on your system. If you plan to run the server under Windows Subsystem for Linux (WSL), ensure WSL is installed and configured.

Install the PBIXRay MCP Server package for development or runtime use with Python’s package manager.

Install the server as a Python package.

Configure your client to connect to the MCP server using the following stdio configuration (local server). This example uses WSL to run the server.

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

Additional configuration and notes

You can also start the server directly via a development command if you are working locally. The server is designed to be run inside a development environment where you activate a virtual environment and start the Python script for the MCP server.

If you are using Claude Desktop or a similar MCP client, you can place the same command in your client’s configuration to start the PBIXRay MCP Server through WSL.

Available tools

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.