Server data from the Official MCP Registry
PowerBI REST API integration. Query workspaces, datasets, and execute DAX queries via MCP.
PowerBI REST API integration. Query workspaces, datasets, and execute DAX queries via MCP.
Valid MCP server (3 strong, 2 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.
6 files analyzed ยท 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Set these up before or after installing:
Environment variable: POWERBI_TENANT_ID
Environment variable: POWERBI_CLIENT_ID
Environment variable: POWERBI_CLIENT_SECRET
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-gurvinder-dhillon-powerbi-mcp": {
"env": {
"POWERBI_CLIENT_ID": "your-powerbi-client-id-here",
"POWERBI_TENANT_ID": "your-powerbi-tenant-id-here",
"POWERBI_CLIENT_SECRET": "your-powerbi-client-secret-here"
},
"args": [
"powerbi-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
A Model Context Protocol (MCP) server that provides tools for interacting with PowerBI REST APIs. This server enables AI assistants like Claude to query PowerBI workspaces, datasets, and execute DAX queries.
[!WARNING] Security Best Practices
- Never commit credentials to version control
- Store credentials in
.envfiles (add to.gitignore)- Rotate client secrets regularly in Azure AD
- Use least-privilege access (only grant necessary workspace permissions)
- This server has read/write access to PowerBI datasets - use with caution
See all available tools below.
| Scenario | Example Prompt |
|---|---|
| Explore available data | "What workspaces do I have access to?" |
| Discover reports | "What reports are available in my workspace?" |
| Understand data schema | "Show me the schema for dataset [dataset-name]" |
| Monitor data freshes | "When was this dataset last refreshed?" |
| Check parameters | "What parameters does this dataset accept?" |
| Query data with DAX | "Run a DAX query to get top 10 sales by region from [dataset]" |
| Analyze data quality | "What tables are in the Sales dataset?" |
| Extract insights | "Get the list of all measures in the Financial dataset" |
Before installing the server, you need to set up an Azure AD application with PowerBI access.
After registration, collect these values:
[!NOTE] Service principals can access workspaces where they've been granted explicit permissions (Admin, Member, or Contributor roles).
For each workspace you want to access:
Once published to PyPI, this is the simplest installation method.
Add the following to your MCP client configuration file:
For Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"powerbi-mcp": {
"command": "uvx",
"args": ["powerbi-mcp"],
"env": {
"POWERBI_TENANT_ID": "your-tenant-id-here",
"POWERBI_CLIENT_ID": "your-client-id-here",
"POWERBI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}
For Claude Code (./.mcp.json in your project directory):
{
"mcpServers": {
"powerbi-mcp": {
"command": "uvx",
"args": ["powerbi-mcp"],
"env": {}
}
}
}
When using Claude Code, create a .env file in your project directory (where you run Claude Code from):
POWERBI_TENANT_ID=your-tenant-id-here
POWERBI_CLIENT_ID=your-client-id-here
POWERBI_CLIENT_SECRET=your-client-secret-here
[!TIP] The
.envfile should be in your working directory, not where the server is installed.
For OpenCode (~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"powerbi-mcp": {
"type": "local",
"command": ["uvx", "powerbi-mcp"],
"enabled": true,
"env": {
"POWERBI_TENANT_ID": "your-tenant-id-here",
"POWERBI_CLIENT_ID": "your-client-id-here",
"POWERBI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}
After adding the configuration, restart your MCP client.
This method uses uvx to run the server directly from GitHub without cloning the repository.
Add the following to your MCP client configuration file:
For Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"powerbi-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/gurvinder-dhillon/powerbi-mcp@main",
"run-server"
],
"env": {
"POWERBI_TENANT_ID": "your-tenant-id-here",
"POWERBI_CLIENT_ID": "your-client-id-here",
"POWERBI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}
For Claude Code (./.mcp.json in your project directory):
{
"mcpServers": {
"powerbi-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/gurvinder-dhillon/powerbi-mcp@main",
"run-server"
],
"env": {}
}
}
}
When using Claude Code, create a .env file in your project directory (where you run Claude Code from):
POWERBI_TENANT_ID=your-tenant-id-here
POWERBI_CLIENT_ID=your-client-id-here
POWERBI_CLIENT_SECRET=your-client-secret-here
[!TIP] The
.envfile should be in your working directory, not where the server is installed.
The server will automatically load environment variables from the .env file in your current working directory.
For OpenCode (~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"powerbi-mcp": {
"type": "local",
"command": [
"uvx",
"--from",
"git+https://github.com/gurvinder-dhillon/powerbi-mcp@main",
"run-server"
],
"enabled": true,
"env": {
"POWERBI_TENANT_ID": "your-tenant-id-here",
"POWERBI_CLIENT_ID": "your-client-id-here",
"POWERBI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}
After adding the configuration, restart your MCP client.
For contributors who want to run from a local clone:
git clone https://github.com/gurvinder-dhillon/powerbi-mcp.git
cd powerbi-mcp
uv sync
For Claude Desktop:
{
"mcpServers": {
"powerbi-mcp-local": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/powerbi-mcp",
"run",
"run-server"
],
"env": {
"POWERBI_TENANT_ID": "your-tenant-id-here",
"POWERBI_CLIENT_ID": "your-client-id-here",
"POWERBI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}
For Claude Code (./.mcp.json in your project directory):
{
"mcpServers": {
"powerbi-mcp-local": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/powerbi-mcp",
"run",
"run-server"
],
"env": {}
}
}
}
For OpenCode (~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"powerbi-mcp-local": {
"type": "local",
"command": [
"uv",
"--directory",
"/absolute/path/to/powerbi-mcp",
"run",
"run-server"
],
"enabled": true,
"env": {
"POWERBI_TENANT_ID": "your-tenant-id-here",
"POWERBI_CLIENT_ID": "your-client-id-here",
"POWERBI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}
Replace /absolute/path/to/powerbi-mcp with the actual path to your cloned repository.
When using Claude Code or OpenCode, create a .env file in your project directory with your credentials (see Method 1 Claude Code section above for the format).
Once installed, try these steps to get started:
| Tool | Description | Key Parameters |
|---|---|---|
get_workspaces | List accessible PowerBI workspaces | top, detail |
get_datasets | Get datasets from workspace or "My workspace" | workspace_id, detail |
get_dataset | Get detailed dataset info including schema | dataset_id, workspace_id, detail |
get_reports | List PowerBI reports in workspace | workspace_id, format, detail |
get_refresh_history | Get dataset refresh history with status/timestamps | dataset_id, workspace_id, top, format |
get_parameters | List dataset parameters and their current values | dataset_id, workspace_id, format, detail |
query_dataset | Execute DAX queries against dataset | dataset_id, dax_query, workspace_id |
List PowerBI workspaces accessible to the service principal.
Parameters:
top (optional): Number of workspaces to return (default: 100, max: 5000)detail (optional): Level of detail - "concise", "normal", or "full" (default: "normal")Get list of datasets from a workspace or "My workspace".
Parameters:
workspace_id (optional): Workspace ID (omit for "My workspace")detail (optional): Level of detail - "concise", "normal", or "full" (default: "normal")Get detailed information about a specific dataset including schema and tables.
Parameters:
dataset_id (required): Dataset IDworkspace_id (optional): Workspace ID (omit for "My workspace")detail (optional): Level of detail - "concise", "normal", or "full" (default: "normal")List PowerBI reports in a workspace.
Parameters:
workspace_id (optional): Workspace ID (omit for "My workspace")format (optional): Response format - "markdown" or "json" (default: "markdown")detail (optional): Level of detail - "concise" or "normal" (default: "concise")Get refresh history for a dataset showing recent refresh operations.
Parameters:
dataset_id (required): Dataset IDworkspace_id (optional): Workspace ID (omit for "My workspace")top (optional): Number of refresh records to return (default: 5, max: 60)format (optional): Response format - "markdown" or "json" (default: "markdown")Get parameters defined in a dataset.
Parameters:
dataset_id (required): Dataset IDworkspace_id (optional): Workspace ID (omit for "My workspace")format (optional): Response format - "markdown" or "json" (default: "markdown")detail (optional): Level of detail - "concise" or "normal" (default: "normal")Note: Not supported for datasets with SQL, Oracle, Teradata, SAP HANA DirectQuery connections or datasets modified via XMLA endpoint.
Execute DAX queries against a dataset.
Parameters:
dataset_id (required): Dataset IDdax_query (required): DAX query (must start with "EVALUATE")workspace_id (optional): Workspace ID (omit for "My workspace")Basic Table Scan:
EVALUATE
'Sales'
Top N with Sorting:
EVALUATE
TOPN(10, 'Sales', [Amount], DESC)
Filtered Results:
EVALUATE
FILTER('Sales', [Year] = 2024)
Calculated Columns:
EVALUATE
ADDCOLUMNS(
'Sales',
"Profit", [Revenue] - [Cost]
)
Aggregated Summary:
EVALUATE
SUMMARIZE(
'Sales',
'Product'[Category],
"Total Sales", SUM('Sales'[Amount])
)
Error: "Authentication failed"
POWERBI_TENANT_ID, POWERBI_CLIENT_ID, and POWERBI_CLIENT_SECRET are correctError: "403 Forbidden" or "Access denied"
Server not appearing in MCP client
Tools not working
.env file is in the current working directorySee DEVELOPER_GUIDE.md for information about developing and contributing to this project.
This project is licensed under the MIT License.
Be the first to review this server!
by Toleno ยท Developer Tools
Toleno Network MCP Server โ Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace ยท Developer Tools
Create, build, and publish Python MCP servers to PyPI โ conversationally.
by Microsoft ยท Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption