MCP Server for Power BI

MCP Server for Power BI

A Python-based MCP server that exposes Power BI semantic models to Claude, enabling natural-language querying of Power BI data through tools like listing workspaces, exploring datasets, executing DAX queries, and triggering refreshes.

Category
Visit Server

README

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.”

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured