Skip to main content
Glama
mbrummerstedt

PowerBI Analyst MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
POWERBI_CLIENT_IDYesThe application (client) ID from your Azure AD app registration.
POWERBI_TENANT_IDYesThe directory (tenant) ID from your Azure AD app registration. Required for most organizations to ensure authentication targets the correct tenant.
POWERBI_OUTPUT_DIRNoOverride the default output directory (~/powerbi_output) where large DAX query results are saved as CSV files.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
authenticateA

Authenticate with Power BI using the OAuth 2.0 device code flow.

Call this tool first if you have never logged in, or if a previous call returned "Not authenticated".

The tool uses a two-step flow:

  • First call: returns a URL and a one-time code for you to open in a browser.

  • Second call: completes the authentication after you have signed in.

Your credentials are cached locally so you will not need to repeat this step until the refresh token expires (~90 days).

logoutA

Sign out of Power BI by clearing the cached credentials.

After logging out, call authenticate to sign in again.

list_workspacesA

List all Power BI workspaces (groups) the authenticated user is a member of.

Returns workspace id, name, type, and capacity information. Use the id field as workspace_id in subsequent tools.

list_appsA

List all Power BI apps installed for the authenticated user.

Returns each app's id, name, description, publisher, last update time, and — most importantly — the workspaceId of the underlying workspace.

Use the workspaceId field (not the app id) as the workspace_id parameter in list_datasets, list_tables, execute_dax, and other dataset tools.

If no apps are installed, try list_workspaces instead to find workspaces directly.

list_datasetsA

List all datasets (semantic models) in a Power BI workspace.

Returns dataset id, name, configured-by, web URL, is-refreshable flag, and the target storage mode (Import / DirectQuery / etc.). Use the id field as dataset_id in subsequent tools.

get_dataset_infoA

Return detailed metadata for a single Power BI dataset.

Includes name, owner, refresh schedule, storage mode, web URL, and more. Also returns the last 5 refresh history entries so you can see data freshness.

list_tablesA

List all visible tables in a Power BI dataset.

Hidden tables and internal Power BI system tables (names starting with '$') are excluded. Use the returned table names in list_measures, list_columns, and DAX queries.

list_measuresB

List measures defined in a Power BI dataset.

Returns each measure's name, parent table, description, and format string. Optionally filter by table name.

list_columnsA

List columns (dimensions) in a Power BI dataset.

Returns each column's name, parent table, description, data type, and whether it is a key column. Optionally filter by table name.

execute_daxA

Execute a DAX query against a Power BI dataset and return the result rows.

The query must start with EVALUATE (standard DAX query syntax). Results are returned as a JSON array of objects, with column names as keys.

Small results (<= 50 rows) are returned inline as JSON. Large results (> 50 rows) are automatically saved to a CSV file and a compact summary is returned with the file path, column names, row count, and a preview of the first 5 rows. Use read_query_result to page through a saved CSV, or read the file directly.

Every successful execution is logged to a local history file for auditability and cross-session reuse. Use search_query_history to find prior queries. The query_summary parameter makes history search much more effective — always provide it when you can.

Limitations imposed by the Power BI API:

  • Maximum 1,000,000 values or 100,000 rows per query.

  • Rate limit: 120 requests per minute per user.

  • Only DAX is supported; MDX and DMV queries are not.

  • The tenant setting "Dataset Execute Queries REST API" must be enabled.

Tips:

  • Use TOPN or FILTER to limit large result sets.

  • Use SUMMARIZECOLUMNS for aggregated queries.

  • Use CALCULATETABLE for filtered table expressions.

  • Use max_rows to sample a large table without rewriting the DAX.

  • Use result_name to give the saved CSV a meaningful filename.

read_query_resultA

Read a page of rows from a CSV file saved by execute_dax.

Use this tool when execute_dax returns a savedTo path instead of inline rows. Combine offset and limit to page through large results without loading the entire file into context.

Returns rows for the requested slice together with pagination metadata:

  • totalRows: total number of rows in the file

  • offset: the offset used

  • limit: the limit used

  • hasMore: whether more rows exist after this page

Example workflow:

  1. Call execute_dax — if rows > 50 you get a savedTo path.

  2. Call read_query_result(file_path=savedTo, offset=0, limit=100).

  3. If hasMore is true, call again with offset=100, then 200, etc.

search_query_historyA

Search the local query history log for prior DAX executions.

Every successful execute_dax call is logged with the DAX query, a short summary of what the user asked for, the result shape, and the path to any saved CSV file. Use this tool to:

  • Find previous queries for a dataset so you can reuse or adapt the DAX

  • Locate saved CSV files from earlier sessions

  • Audit what data has been pulled and when

  • Avoid re-running expensive queries when the data already exists locally

Results are returned newest-first. Use keyword to search by intent (e.g. "revenue by market") — it matches against the query summary, the DAX text, and the result name.

delete_query_log_entryA

Remove a single entry from the query history log.

Use this when a query produced incorrect or misleading results and should not appear in future history searches. The associated CSV file (if any) is NOT deleted — only the log entry is removed.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/mbrummerstedt/powerbi-analyst-mcp'

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