PBIXRay MCP Server
@jonaolden
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.
概览
What is PBIXRay MCP Server?
PBIXRay MCP Server is a Model Context Protocol (MCP) server that exposes the capabilities of PBIXRay as tools and resources for LLM clients to interact with Power BI (.pbix) files. It is for developers and analysts who want to programmatically analyze Power BI data models.
How to use PBIXRay MCP Server?
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.
Key features of PBIXRay MCP Server
- Load and analyze PBIX files
- List tables and retrieve model metadata
- View Power Query (M) and DAX code
- Examine DAX measures, calculated tables, and columns
- Retrieve schema, relationships, and table contents with pagination
- Configurable tool set via
--disallowoption
Use cases of PBIXRay MCP Server
- Inspect the data model schema of a Power BI report
- Extract DAX formulas for audit or documentation
- Analyze table relationships across the model
- Debug Power Query transformations in M code
- Explore large table contents efficiently with pagination
FAQ from PBIXRay MCP Server
How does this differ from the tabular-mcp project?
Tabular-mcp is a follow-up project that allows running DAX queries against a local Power BI model, while PBIXRay MCP Server focuses on analyzing .pbix files by loading and exposing their structure and code.
Can I restrict which tools are available?
Yes, use the --disallow command-line option followed by tool names to disable specific tools for security purposes.
How do I handle Windows paths when running in WSL?
Add instructions to your client project notes: Windows paths (e.g., C:\Users\name\file.pbix) must be converted to WSL paths (e.g., /mnt/c/Users/name/Downloads/file.pbix) when loading files.
Does the server support pagination for large tables?
Yes, the get_table_contents tool supports page and page_size parameters. Default page size is 20 rows; maximum rows per request can be set with --max-rows.
What are the runtime dependencies?
Python packages: mcp, pbixray, and numpy. The server runs on any platform with a Python environment.