powerbi-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@powerbi-mcp-serverList all Power BI workspaces I have access to."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
powerbi-mcp
An MCP server that connects Claude (and any MCP-compatible client) to Microsoft Power BI via the Power BI REST API using a Service Principal.
Tools exposed
Tool | Description |
| List all workspaces the SP has access to |
| List datasets in a workspace (or all) |
| Run a DAX query against a dataset and get results |
| Trigger an on-demand dataset refresh |
| List reports in a workspace (or all) |
| Get all pages in a report |
| Get all visuals on a report page |
Related MCP server: Power BI MCP for Claude
Prerequisites
Azure App Registration with these Power BI API permissions (Application, not Delegated):
Dataset.Read.AllDataset.ReadWrite.All(for refresh)Report.Read.AllWorkspace.Read.All
In Power BI Admin Portal → Tenant settings, enable:
Allow service principals to use Power BI APIs
Add the security group containing your App Registration
Add the service principal as a Member or Admin to the workspaces you want to access.
Setup
# Clone and install
git clone <this-repo>
cd powerbi-mcp-server
pip install -e .
# Copy and fill in credentials
cp .env.example .env
# Edit .env with your tenant ID, client ID, client secretConfigure in Claude Code / Claude Desktop
Add this to your MCP configuration (~/.claude/claude_desktop_config.json for Desktop, or claude mcp add for Claude Code):
{
"mcpServers": {
"powerbi": {
"command": "python",
"args": ["-m", "powerbi_mcp"],
"env": {
"POWERBI_TENANT_ID": "your-tenant-id",
"POWERBI_CLIENT_ID": "your-client-id",
"POWERBI_CLIENT_SECRET": "your-client-secret"
}
}
}
}Or using uv (no install needed):
{
"mcpServers": {
"powerbi": {
"command": "uvx",
"args": ["--from", "/path/to/powerbi-mcp-server", "powerbi-mcp"],
"env": {
"POWERBI_TENANT_ID": "...",
"POWERBI_CLIENT_ID": "...",
"POWERBI_CLIENT_SECRET": "..."
}
}
}
}Claude Code CLI
claude mcp add powerbi \
--command python \
--args "-m powerbi_mcp" \
-e POWERBI_TENANT_ID=your-tenant-id \
-e POWERBI_CLIENT_ID=your-client-id \
-e POWERBI_CLIENT_SECRET=your-client-secretExample prompts
Once connected, you can ask Claude:
"List all Power BI workspaces I have access to."
"Run this DAX query on dataset abc-123: EVALUATE SUMMARIZE(Sales, Sales[Region], "Total", SUM(Sales[Amount]))"
"Refresh the dataset named 'Monthly Sales' in the Finance workspace."
"Show me all the pages and visuals in the Executive Dashboard report."
Development
pip install -e ".[dev]"
python -m powerbi_mcp # runs the MCP server via stdioAvailable Tools
7 toolsexecute_dax_queryB
Execute a DAX query against a Power BI dataset and return results.
Args: dataset_id: The dataset ID to query. dax_query: A valid DAX query string, e.g. "EVALUATE SUMMARIZE(Sales, Sales[Region])". workspace_id: Optional workspace ID that contains the dataset.
| Name | Required | Description | Default |
|---|---|---|---|
| dax_query | Yes | ||
| dataset_id | Yes | ||
| workspace_id | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'return results' but does not detail the output format, potential size, rate limits, or error handling. For a query execution tool, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded with the purpose. The Args list is efficiently structured. Minor issue: the example could be more prominent, but overall no unnecessary text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and the complexity of DAX queries, the description lacks completeness. It does not describe the return format, pagination, error cases, or performance implications, leaving the agent underinformed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining each parameter (e.g., 'The dataset ID to query') and provides a DAX query example. However, it does not elaborate on valid query patterns or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes a DAX query against a Power BI dataset and returns results. It uses a specific verb and resource, distinguishing it from sibling tools like list_datasets (which only list metadata) or refresh_dataset.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage through the example and parameter details but does not explicitly state when to use this tool versus alternatives (e.g., list_datasets for exploring datasets). No guidance on prerequisites or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_report_pagesB
Get all pages in a Power BI report.
Args: report_id: The report ID. workspace_id: Optional workspace ID that contains the report.
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes | ||
| workspace_id | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It only states the function and arguments, omitting any behavioral traits like authentication needs, rate limits, or response nature.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences and an arg list, containing no unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the presence of an output schema, the description adequately states the purpose and parameters. It could mention that no output details are needed because the output schema exists.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description compensates by explicitly describing both parameters (report_id and workspace_id) beyond just names and types. However, no additional details like formats or constraints are provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get all pages in a Power BI report' clearly states the verb, resource, and context. It distinctly differentiates from sibling tools like get_report_visuals and list_reports.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, nor are prerequisites or context (e.g., requiring a report_id from list_reports) mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_report_visualsA
Get all visuals on a specific page of a Power BI report.
Args: report_id: The report ID. page_name: The page name (from get_report_pages). workspace_id: Optional workspace ID that contains the report.
| Name | Required | Description | Default |
|---|---|---|---|
| page_name | Yes | ||
| report_id | Yes | ||
| workspace_id | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries burden. States it 'gets all visuals' implying read-only, but does not disclose permissions, error handling, or behavior if page missing. Adequate but minimal beyond purpose.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very concise; one-line purpose followed by compact Args section. Every sentence adds value. Front-loaded with purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool is straightforward; output schema exists, so return details not needed. Description covers essential input context. Could mention that it returns a list/array of visuals, but not necessary given schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Description lists all three parameters with additional context: page_name's source (from get_report_pages), workspace_id's optionality. Schema has 0% coverage, so this adds meaning over the schema's simple type definitions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Get all visuals on a specific page of a Power BI report'. Verb 'get' and resource 'visuals on a page' are specific. Distinguishes from sibling tools like get_report_pages (gets pages) and execute_dax_query (query).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly mentions that page_name 'comes from get_report_pages', providing context for prerequisite tool. Does not explicitly state when not to use, but the context is clear. Minor omission of exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_datasetsA
List datasets in a workspace or across all workspaces.
Args: workspace_id: Optional workspace (group) ID. Omit for the default workspace.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It correctly indicates this is a listing operation (read-only by nature), but it does not disclose any behavioral traits such as pagination, result limits, or required permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, using two clear sentences and an Arg block. Every part adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists (though not shown), the description does not need to explain return values. The description covers the essential purpose and parameter, leaving no major gaps for a simple list tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaning to the single parameter workspace_id by explaining its purpose ('optional workspace ID') and default behavior ('omit for default workspace'). Since the schema provides no descriptions (0% coverage), this adds significant value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (list) and resource (datasets) and specifies the scope (in a workspace or across all workspaces), which distinguishes it from sibling tools like list_reports and list_workspaces.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides minimal guidance: it notes that workspace_id is optional and omitting it uses the default workspace. However, it does not explicitly explain when to use this tool versus alternatives, nor does it mention any prerequisites or limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_reportsA
List reports in a workspace or across all workspaces.
Args: workspace_id: Optional workspace ID. Omit for the default workspace.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must carry burden. It describes action and parameter but does not state read-only nature, safety, or response details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very concise: two sentences plus parameter note. Front-loaded with purpose, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Simple listing tool with output schema; parameter and scope are well-covered. Could mention pagination or ordering, but not critical.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description adds value by explaining workspace_id effect (omit for default). Adds meaning beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the action 'list' and resource 'reports', with scope options (workspace or all). While distinct from sibling tools like list_datasets, it lacks explicit differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Guidance on the workspace parameter is given (optional, omit for default), but no when-to-use vs. alternatives or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_workspacesA
List all Power BI workspaces (groups) the service principal has access to.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It states the tool lists workspaces but does not declare it as read-only or disclose any side effects. Basic transparency but could be more explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that is clear and to the point, with no unnecessary words or repetition. Perfectly concise for the simplicity of the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the zero parameters and existence of an output schema (not shown), the description adequately explains the tool's purpose and scope. It could mention the output format, but the output schema covers that.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters and 100% schema coverage. The description adds value by specifying 'all workspaces' and 'the service principal has access to,' providing context beyond the empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (list) and the resource (Power BI workspaces/groups). It specifies 'the service principal has access to,' distinguishing it from siblings which deal with datasets, reports, and DAX queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it (to list accessible workspaces) but does not explicitly state when not to use it or mention any prerequisites. However, the sibling tools cover different operations, making the usage context clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
refresh_datasetB
Trigger an on-demand refresh of a Power BI dataset.
Args: dataset_id: The dataset ID to refresh. workspace_id: Optional workspace ID that contains the dataset.
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_id | Yes | ||
| workspace_id | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description does not disclose behavioral traits like whether the refresh is synchronous or asynchronous, if it triggers a full refresh, or any error scenarios. No annotations are provided to compensate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences plus parameter details. It is well-structured and front-loaded with the purpose, though the parameter descriptions could be integrated more naturally.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and annotations, the description provides minimal context. It does not explain return values, error handling, or the nature of the refresh operation, leaving significant gaps for a mutation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaning to both parameters: 'dataset_id' is described as 'The dataset ID to refresh' and 'workspace_id' as 'Optional workspace ID that contains the dataset.' This goes beyond the schema's type-only information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Trigger an on-demand refresh of a Power BI dataset,' which is a specific verb ('trigger') and resource ('dataset'), clearly distinguishing it from sibling tools that list datasets or reports.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, such as listing datasets first or using other refresh methods. No prerequisites or context about when a refresh is needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v0.1.0- First observed
execute_dax_query - First observed
get_report_pages - First observed
get_report_visuals - First observed
list_datasets - First observed
list_reports - First observed
list_workspaces - First observed
refresh_dataset
TDQS
Each tool has a clearly distinct purpose: querying, listing, getting details, or refreshing. No overlap in functionality.
All tool names follow a consistent verb_noun pattern in snake_case, using verbs like execute, get, list, and refresh.
7 tools is well-scoped for a Power BI server covering listing, querying, and refreshing resources without being excessive or too thin.
The tool set covers core read, query, and refresh operations, but lacks create/update/delete capabilities for datasets and reports, which are minor gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with Microsoft PowerBI REST API, providing tools for data cleaning, transformation, analysis, and visualization within PowerBI.4MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Microsoft Power BI and Fabric, enabling Claude to discover workspaces, semantic models, generate and execute DAX queries, and retrieve report metadata via device-code authentication.23MIT
- AlicenseAqualityDmaintenanceAn MCP (Model Context Protocol) server that lets AI agents manage Power BI workspaces, datasets, and refreshes via natural language.112MIT
- AlicenseNot gradedqualityDmaintenanceA self-hosted MCP server that proxies MCP clients to Power BI, using your own Entra tenant and Azure subscription. It enables DAX queries, workspace listing, and dataset management while preserving user-specific row-level security.2MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Divyansh-dev12/powerbi-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server