Power-BI
An MCP server to connect your LLM or AI model to Power BI and Fabric
claude mcp add --transport stdio michaelmckinleyconsulting-power-bi-mcp-server node path/to/powerbi-mcp-server/dist/index.js \ --env PBI_TENANT_ID="your_tenant_id" \ --env PBI_PUBLIC_CLIENT_ID="your_client_id"
How to use
Power BI MCP Server exposes a range of Power BI operations to an MCP-enabled AI assistant. It lets the assistant list and manage workspaces, access and modify reports (including cloning, exporting, and rebinding to different datasets), manage datasets (execute DAX queries, trigger refreshes, and handle refresh schedules), and interact with dashboards. It also supports pushing real-time data via push datasets and handles authentication through interactive sign-in or app-only flows using Microsoft Entra ID. With this server configured in your MCP client, your AI can perform complex Power BI tasks through natural prompts, for example listing workspaces, running DAX against a dataset, exporting a report to PDF or PPTX, or creating a push dataset for streaming data. The included prompts and supported operations map directly to the Power BI REST APIs, enabling programmatic control of Power BI resources from your AI assistant.
How to install
Prerequisites
- Node.js v18 or higher
- npm or yarn
- Access to a Power BI Pro or Premium license
- Microsoft Entra ID app registration for authentication
- An MCP-compatible AI assistant
Installation steps
- Clone the repository:
git clone https://github.com/michaelmckinleyconsulting/powerbi-mcp-server.git
cd powerbi-mcp-server
- Install dependencies:
npm install
- Build the project:
npm run build
- Prepare authentication assets
- Register an app in Azure Active Directory and obtain a client (application) ID and tenant ID.
- If using app-only authentication, configure a client secret or certificate as required by your app registration.
- Create a .env file (see .env.example) and set PBI_PUBLIC_CLIENT_ID, PBI_TENANT_ID, and PBI_SCOPES as needed.
PBI_PUBLIC_CLIENT_ID=your_client_id
PBI_TENANT_ID=your_tenant_id
PBI_SCOPES=https://analysis.windows.net/powerbi/api/.default
Note: The server uses Authorization Code flow with PKCE (no client secret needed) and should be configured with redirect URIs such as http://localhost and http://127.0.0.1.
Additional notes
Tips and considerations:
- Ensure the Azure app registration has the required Power BI permissions and proper redirect URIs as described in the README.
- When running in development, you can enable verbose logs with DEBUG=powerbi:* to troubleshoot authentication and API calls.
- In MCP client configurations, you can provide environment variables like PBI_PUBLIC_CLIENT_ID and PBI_TENANT_ID to avoid hardcoding credentials.
- If you encounter authentication issues, verify that the tenant ID is correct and that the app registration has consent for Power BI Service permissions.
- For production deployments, consider securing environment variables and reviewing token lifetimes and refresh behavior with the chosen auth flow.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud