powerbi
MCP server for controlling Power BI Desktop through Claude
claude mcp add --transport stdio enelyse-powerbi-mcp-server python -m powerbi_mcp.server \ --env LOG_LEVEL="Optional: logging level (e.g., DEBUG, INFO, WARNING, ERROR)" \ --env TOM_DLL_PATH="Optional: path to Microsoft Analysis Services DLLs if not auto-detected" \ --env MCP_KNOWLEDGE_BASE="Optional: path or identifier for knowledge base storage" \ --env POWERBI_WORKSPACE_NAME="Optional: Power BI workspace name to target"
How to use
This MCP server enables Claude or any MCP client to communicate with a running Power BI Desktop instance by bridging the Model Context Protocol to the Tabular Object Model. It provides capabilities to inspect the model, generate DAX, optimize expressions, and manage measures and metadata from a chat-like interface. The server is exposed via a Python entry point and acts as a thin wrapper around the underlying Power BI MCP implementation, allowing you to drive Power BI actions without leaving your conversational environment. To use it, run the server with the Python module entry point and connect your MCP host (e.g., Claude Desktop) to the configured mcpServers entry. Typical workflows include listing model metadata, exporting measures to a knowledge base, and running a DAX optimizer on expressions. Tools available through the server include: list model information (tables, columns, and measures), create or modify measures, DAX code generation, DAX optimization suggestions, and import/export helpers for TMDL and knowledge base integration.
How to install
Prerequisites:
- Python 3.10 or newer
- Git and a working Python environment
- Access to a running Power BI Desktop instance if testing locally
Installation steps:
- Clone the repository or navigate to the project directory.
- Install editable development mode to run from source:
pip install -e .
- (Optional) Install dependencies for development and testing as defined in the project’s requirements.
- Run the MCP server using the Python entry point as described in the mcp_config example:
python -m powerbi_mcp.server
- Configure your MCP host (e.g., Claude Desktop) to connect to the server using the configuration snippet provided in the README (adjust as needed for your environment).
Additional notes
Tips and common issues:
- Ensure you have the Microsoft Analysis Services DLLs available if TOM_DLL_PATH is not autodetected; set TOM_DLL_PATH to point to the DLLs as described in the INSTALLATION.md.
- If you encounter connection issues with Power BI Desktop, verify that the workspace name (if provided) matches the active workspace and that the Power BI model allows external tools.
- The server is Alpha; APIs and behaviours may change. Keep an eye on repository issues for breaking changes or updates.
- The CLI is a thin wrapper around python -m powerbi_mcp.server; debugging can be performed by invoking the module directly.
- For knowledge base features, ensure the MCP_KNOWLEDGE_BASE environment variable points to a valid storage backend compatible with the server.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP