Get the FREE Ultimate OpenClaw Setup Guide →

pbixray

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
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jonaolden-pbixray-mcp-server python src/pbixray_server.py --max-rows 100 --page-size 50 \
  --env VIRTUAL_ENV="Path to your virtual environment if used" \
  --env PBIXRAY_CONFIG="Optional path to a config file"

How to use

PBIXRay MCP Server exposes the PBIXRay project capabilities as MCP tools so clients (like LLM copilots) can analyze Power BI (.pbix) files programmatically. The server provides a suite of tools for loading PBIX files, inspecting the data model, exploring M (Power Query) and DAX expressions, and retrieving data with pagination. Tools are organized by category (Core, Model, Query, Structure, Data) and can be selectively enabled or disabled using command-line options. After starting the server, clients send MCP requests to invoke specific tools such as load_pbix_file, get_tables, get_schema, get_table_contents, and get_model_summary to perform end-to-end analysis of a Power BI model.

To use the server, configure your MCP client with the pbixray server entry (as shown in the example), then invoke the desired tools with any optional filters (e.g., table names, measure names) and pagination controls. The server supports options to disallow certain tools for security, set a maximum number of rows returned, and adjust the default page size for paginated results. For Windows users running under WSL, refer to the WSL guidance in the README for path conversions when loading PBIX files from Windows paths.

Common workflows include loading a PBIX file, listing its tables, inspecting the schema, and then querying DAX measures or M code. You can paginate large table contents and filter results by names to focus on specific parts of the model, such as a particular table’s measures or columns.

How to install

Prerequisites

  • Python 3.8+ (recommended) and pip
  • Access to the PBIXRay MCP server source (either via clone or installed package)

Installation steps

  1. Install Python dependencies (via pip):
pip install pbixray-mcp-server
  1. (Optional) Create and activate a virtual environment:
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
  1. Install development or runtime requirements (if you cloned source):
pip install -e .
  1. Run the MCP server (example using the repository's script path):
# From the project root, adjust path to pbixray_server.py as needed
python src/pbixray_server.py --max-rows 100 --page-size 50
  1. Optional: using WSL as in the README example, configure the client to invoke the server via WSL and Python within the WSL environment.

Note: If you install via a package manager or use a prebuilt entry point, consult the project’s documentation for the exact command to launch the server.

Additional notes

Tips and common issues:

  • Ensure the Python virtual environment (if used) is activated before launching the server.
  • When using WSL, be mindful of file path differences between Windows and WSL paths for loading PBIX files; convert Windows paths to WSL paths (e.g., /mnt/c/Users/…).
  • The tool set is configurable; you can disable sensitive tools with --disallow to restrict what the MCP client can access.
  • For large PBIX files, enable pagination using get_table_contents and adjust page_size to avoid excessive payloads.
  • If you encounter module or path errors, verify that the pbixray_server.py script is accessible and that the working directory is correct when launching the server.
  • The server exposes a range of tools (e.g., get_tables, get_schema, get_dax_measures, get_table_contents) that you can selectively enable/disable depending on your security and data exposure requirements.

Related MCP Servers

Sponsor this space

Reach thousands of developers