Skip to main content
Glama
NithyaGundavarapu

MCP Server for Power BI

MCP Server for Power BI

A Python-based Model Context Protocol server that exposes Power BI semantic models to Claude and Claude Code, enabling natural-language querying of your Power BI data from any MCP-compatible chat client.

What this project does

This implementation provides MCP tools to:

  • list Power BI workspaces

  • list datasets inside a workspace

  • inspect dataset metadata

  • list the tables and columns in a semantic model

  • execute DAX queries against a dataset

  • trigger a dataset refresh

This makes it possible for Claude to answer questions such as:

  • “Which workspaces do I have access to?”

  • “Show me the datasets in the Sales workspace.”

  • “Run a DAX query against the Finance dataset.”

Related MCP server: Power BI MCP for Claude

Architecture

flowchart LR
    A[Claude / Claude Code] --> B[MCP Client]
    B --> C[MCP Server - Python]
    C --> D[Power BI REST API]
    D --> E[Power BI Semantic Model]

Prerequisites

  • Python 3.10+

  • A Power BI service principal or user account with access to the required workspaces

  • Power BI tenant ID, client ID, and client secret for service principal authentication

Setup

  1. Create and activate a virtual environment

  2. Install dependencies

  3. Copy the environment template and set your credentials

  4. Run the server

1) Create a virtual environment

python -m venv .venv
.venv\Scripts\activate

2) Install dependencies

pip install -r requirements.txt

3) Configure environment variables

copy .env.example .env

Update .env with your values:

POWERBI_TENANT_ID=your-tenant-id
POWERBI_CLIENT_ID=your-client-id
POWERBI_CLIENT_SECRET=your-client-secret

4) Run the server

python -m powerbi_mcp_server.server

5) Connect it to Claude Desktop or Claude Code

Point your MCP client config at this server — see examples/claude_desktop_config.json for a ready-to-copy snippet, and examples/demo_prompts.md for prompts to try once it's connected.

MCP tools exposed

  • list_workspaces()

  • list_datasets(workspace_id)

  • get_dataset_details(workspace_id, dataset_id)

  • get_dataset_metadata(workspace_id, dataset_id)

  • list_dataset_tables(workspace_id, dataset_id)

  • execute_dax_query(workspace_id, dataset_id, dax_query)

  • refresh_dataset(workspace_id, dataset_id)

Running tests

pip install pytest
python -m pytest tests/ -v

Authentication

This server authenticates via an Azure AD service principal (client credentials flow). The service principal must be added to the Power BI tenant's allowed service principals and granted access to the relevant workspaces. Interactive/user-delegated login is a possible future addition if you need a lighter-weight local demo flow.

Next steps

  • add interactive user-login (device code) auth as an alternative to the service principal flow

  • add a tool that surfaces DAX measures per table for richer natural-language grounding

  • capture a short screen recording/GIF of a live Claude session for the README

License

MIT

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NithyaGundavarapu/mcp-server-powerbi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server