Get the FREE Ultimate OpenClaw Setup Guide →

powerbi

MCP server for controlling Power BI Desktop through Claude

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository or navigate to the project directory.
  2. Install editable development mode to run from source:
pip install -e .
  1. (Optional) Install dependencies for development and testing as defined in the project’s requirements.
  2. Run the MCP server using the Python entry point as described in the mcp_config example:
python -m powerbi_mcp.server
  1. 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

Sponsor this space

Reach thousands of developers