powerbi-mcp-local
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PBI_MCP_AUDIT | No | Tool registry audit (CI) | 0 |
| PBI_TOOLS_PATH | No | Path to pbi-tools executable if not on PATH | |
| PBI_MCP_READONLY | No | Block all write/destructive tools | 0 |
| PBI_MCP_ALLOW_DMV | No | Allow $SYSTEM.* / DISCOVER_* DAX | 0 |
| PBI_MCP_AUTH_TOKEN | No | SSE Bearer token (>=32 chars when set) | |
| PBI_MCP_ALLOWED_DIRS | No | ;-separated filesystem roots; default is cwd | |
| PBI_MCP_ALLOWED_ORIGINS | No | Extra Host/Origin allowlist for SSE | |
| PBI_MCP_SECURITY_POLICY | No | Path or inline JSON for security_policy.json | |
| PBI_MCP_STRICT_REGISTRY | No | Strict registry audit | 0 |
| PBI_MCP_ALLOW_EXTERNAL_M | No | Bypass the M function blocklist | 0 |
| PBI_MCP_PBI_TOOLS_TIMEOUT | No | pbi-tools subprocess timeout (s) | 300 |
| PBI_MCP_ALLOW_UI_AUTOMATION | No | Required for pbi_persist_now (Ctrl+S) | 0 |
| PBI_MCP_PERSIST_USE_SENDINPUT | No | Fall back from PostMessage to SendInput | 0 |
| PBI_MCP_ALLOW_UNAUTHENTICATED_SSE | No | Acknowledge non-loopback SSE without auth | 0 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| pbi_delete_relationshipA | Delete a relationship by name or by endpoint columns. |
| pbi_update_relationshipA | Update properties of an existing relationship (cardinality, direction, is_active, name). |
| pbi_delete_tableB | Delete a table. Removes associated relationships and measures. |
| pbi_delete_columnC | Delete a column from a table. |
| pbi_rename_tableB | Rename a table. Callers are responsible for updating dependent DAX expressions. |
| pbi_rename_columnC | Rename a column. Callers are responsible for updating dependent DAX. |
| pbi_rename_measureA | Rename a DAX measure. Callers must update downstream DAX expressions themselves. |
| pbi_refresh_metadataA | Reload cached TOM schema from the server (cheaper than full reconnect). |
| pbi_validate_daxA | Parse-check a DAX expression by running a zero/one-row probe and catching errors. kind='scalar' wraps the expression with EVALUATE ROW("v", ). kind='table' wraps the expression with EVALUATE TOPN(0, ). semantic=True additionally checks every |
| pbi_audit_modelC | Detect missing, ambiguous, bidirectional, and orphaned model structures. |
| pbi_lint_daxC | Validate measures, formats, and measure/column name collisions. |
| pbi_detect_name_collisionsC | Detect table, column, and measure name collisions before writes. |
| pbi_detect_dirty_datesC | Detect text columns that look like dirty dates. |
| pbi_detect_empty_visualsC | Execute lightweight DAX probes to detect visuals with no data. |
| pbi_detect_circular_dependenciesA | Detect cycles in the measure dependency graph. Builds a graph of measure → referenced measures (parsed from DAX
|
| pbi_detect_missing_visualsB | Detect required visuals that are absent from a page. Each requirement entry is a dict with at least |
| pbi_export_correction_reportB | Generate a Markdown correction report aggregating all analysis tools. Output sections: model overview, star-schema verdict, circular
dependency scan, optional rubric scoring, audit issues. Writes to
|
| pbi_export_validation_reportC | Export model, DAX, layout, binding, and score validation as JSON. |
| pbi_score_rubricA | Aggregate scoring across multiple validators. Each criterion is a dict with:
Returns per-criterion verdicts plus a weighted total score in [0, 1]. |
| pbi_validate_power_query_stepsA | Verify that a Power Query (M) expression contains expected step patterns. Each entry in |
| pbi_validate_star_schemaA | Confirm a model follows star schema topology. Heuristic: a fact table participates as the many-side in ≥1 relationship, a dimension table participates as the one-side. Tables that are both are flagged as bridge tables. Direct dimension-to-dimension relationships are flagged as snowflake violations. Fact tables wired to other facts are flagged as fact-to-fact (constellation). Optional |
| pbi_validate_filter_expressionB | Validate a DAX boolean filter expression before visual probes. |
| pbi_generate_measure_testsC | Generate and execute smoke tests for DAX measures. |
| pbi_validate_relationship_planB | Validate relationship cardinality, direction, duplicates, and ambiguity before creation. |
| pbi_lint_report_layoutA | Detect overlaps, excessive whitespace, tiny visuals, and missing titles. Optional knobs to silence noise on intentionally dense pages:
|
| pbi_validate_visual_bindingsC | Alias-level visual binding validation with clearer tool naming. |
| pbi_score_dashboardC | Score dashboard quality across model, DAX, layout, and readability. |
| pbi_run_scenarioC | Run a complete QA scenario against the active model and optional extracted layout. |
| pbi_compare_report_versionsC | Compare two extracted report versions by pages, visuals, and layout score. |
| pbi_validate_pbix_persistenceC | Validate that a patched PBIX still contains a readable, persistent report layout. |
| pbi_validate_pbix_reopenB | Open a PBIX in Power BI Desktop and scan for visible repair-error signals.
|
| pbi_measure_dependenciesC | Return calc-dependency graph rows (source → referenced object) from DISCOVER_CALC_DEPENDENCY. |
| pbi_list_rolesA | List all model roles with their members and table filters. |
| pbi_create_roleC | Create or update a model role. |
| pbi_delete_roleC | Delete a model role. |
| pbi_set_role_filterB | Set (or remove when filter_expression is None/empty) the RLS DAX filter on a table for a role. |
| pbi_add_role_memberA | Add (or update) a member (user/group) on a role. member_type: 'external' (default, ExternalModelRoleMember — recommended for Power BI service) 'windows' (WindowsModelRoleMember — domain principal SID) With |
| pbi_remove_role_memberB | Remove a member from a role, matching by MemberName (case-insensitive). |
| pbi_list_calc_groupsB | List calculation groups and their items. |
| pbi_create_calc_groupB | Create a calculation group table with its Name column and optional calculation items. items: list of {name, expression, format_string_expression?, ordinal?}. |
| pbi_delete_calc_groupC | Delete a calculation group table. |
| pbi_add_visualA | Add any visual to a report page — the single entry point for visual creation. visual_type: card, labelled_card, multi_row_card, bar_chart,
stacked_bar_chart, stacked_column_chart, clustered_column_chart,
hundred_percent_stacked_bar_chart, hundred_percent_stacked_column_chart,
ribbon_chart, line_chart, area_chart, stacked_area_chart,
hundred_percent_stacked_area_chart, donut, pie_chart, treemap, funnel,
table, waterfall, scatter_chart, combo_chart, slicer, gauge, kpi,
matrix, map, text_box.
config: per-type keys — categorical charts: category_column +
value_measure (+ legend_column); axis charts: axis_column +
value_measures (list); card/gauge: measure; table: columns (list);
matrix: rows + values (lists); scatter: category_column + x_measure +
y_measure; combo: category_column + bar_measures + line_measures;
kpi: indicator_measure + trend_column; slicer: column (+ slicer_type);
map: location (+ measure); text_box: text. Error messages name any
missing key. Prefer |
| excel_list_sheetsD | – |
| excel_read_sheetD | – |
| excel_read_cellD | – |
| excel_searchD | – |
| excel_write_cellD | – |
| excel_write_rangeD | – |
| excel_create_sheetD | – |
| excel_delete_sheetD | – |
| excel_format_rangeD | – |
| excel_auto_widthD | – |
| excel_create_workbookD | – |
| excel_workbook_infoD | – |
| excel_to_pbi_checkD | – |
| pbi_connectC | Connect to Power BI Desktop and report the active instance. |
| pbi_list_instancesA | List discovered Power BI Desktop instances without forcing a connection. |
| pbi_list_tablesC | List model tables and columns. |
| pbi_list_measuresB | List all model measures. |
| pbi_list_relationshipsB | List model relationships. |
| pbi_execute_daxC | Execute a DAX or DMV query. |
| pbi_execute_dax_as_roleB | Execute a DAX query under a specific role context. |
| pbi_trace_queryC | Execute a DAX query and return result rows with timing diagnostics. |
| pbi_create_measureC | Create or update a DAX measure. |
| pbi_delete_measureC | Delete a DAX measure. |
| pbi_create_relationshipA | Create or update a single-column relationship. With |
| pbi_model_infoC | Return a full model snapshot in a single call. |
| pbi_operation_historyA | Return the most-recent N tool operations recorded by the connection manager (newest first). Each entry: |
| pbi_system_healthA | Single-call self-diagnostic for stability and dependency status. Read-only. Skips any TOM/ADOMD probe gracefully when no connection is active. Use as a preflight from any LLM agent: one call answers "can I talk to Power BI right now?" without juggling connect / list / model_info. |
| pbi_refreshC | Trigger a model or table refresh. |
| pbi_import_dax_fileC | Parse a .dax file and bulk-create measures. |
| pbi_create_measuresA | Batch-create or update multiple DAX measures with a single SaveChanges call. Each item in measures must have at minimum: name, expression. Optional keys: format_string, description, display_folder, is_hidden. With |
| pbi_create_time_intelligence_packA | Create a family of time-intelligence measures from a base measure. Default patterns: YTD, MTD, QTD, SPY, YOY, YOY %, MA3. Each generated
measure is named With With |
| pbi_create_variance_measureB | Create a period-over-period variance measure. DAX template (parametrised by
Default |
| pbi_create_contribution_measureB | Create a %-of-total contribution measure. DAX template:
|
| pbi_create_topn_measureB | Create a Top-N filter measure. DAX template:
Use as the value of a chart visual to surface only the top N members of a
dimension. |
| pbi_create_rolling_average_measureB | Create a trailing rolling average measure. DAX template:
|
| pbi_apply_format_presetA | Apply a named format preset to a list of measures or columns. Wraps |
| pbi_list_format_presetsA | Return the catalogue of format-string presets. Optional |
| pbi_create_tableC | Create or update a calculated table. |
| pbi_create_columnC | Create or update a calculated column. |
| pbi_set_column_data_typeA | Set the DataType (and optionally FormatString) of an existing column. Works for any column kind (source, calculated, calculated table column).
Use when Power Query type hints (
|
| pbi_set_formatA | Batch-apply format strings to measures or columns. |
| pbi_export_modelC | Export the full model as JSON, optionally writing it to disk. |
| pbi_generate_dax_context_promptA | Render a compact markdown snapshot of the model — tables, columns, measures, relationships — ready to paste into an LLM system prompt so the LLM can author DAX with full schema context in one round-trip. Sections:
Output is truncated to |
| pbi_validate_modelB | Audit the model for common issues: empty expressions, missing format strings, orphan tables, duplicate measure names. |
| pbi_get_power_queryC | Read the M expression for a specific table partition. |
| pbi_list_power_queriesC | List table partitions and their current source expressions. |
| pbi_parameterize_data_sourceB | Make data sources portable via a Power Query parameter. Creates (or updates) an M parameter named
|
| pbi_relocate_data_sourceA | Bulk-rewrite a hardcoded file or folder path inside every M partition. Use when a workbook moves and queries break with DataSource.NotFound. Looks
for |
| pbi_set_power_queryC | Write or update an M expression on a table partition. |
| pbi_create_import_queryC | Generate and inject an Excel import Power Query for a table. |
| pbi_create_csv_import_queryC | Generate and inject a CSV import Power Query for a table. |
| pbi_create_folder_import_queryC | Generate and inject a folder import Power Query for a table. |
| pbi_bulk_import_excelC | Bulk-create Excel import queries for multiple tables. |
| pbi_import_excel_workbookC | Import an Excel workbook into Power BI tables in one call. |
| pbi_list_tmdl_filesC | List TMDL files in a Power BI Project semantic model definition folder. |
| pbi_patch_tmdl_measureC | Create or replace a measure block in one table TMDL file. |
| pbi_read_tmdl_fileB | Read one TMDL file from a Power BI Project definition folder. |
| pbi_write_tmdl_fileC | Create or overwrite one TMDL file inside a Power BI Project definition folder. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| model_audit | Full model audit: tables, measures, relationships, and improvement suggestions. |
| time_intelligence_kit | Generate a full time-intelligence measure kit (MTD, QTD, YTD, YoY, YoY%) for a base measure. |
| star_schema_builder | Guide for wiring a star schema: relationships + key measures. |
| rls_setup | Set up Row-Level Security for a given table and filter column. |
| dead_measure_scan | Find measures not referenced by any other measure and suggest cleanup. |
| bulk_measure_format_fix | Apply a format string to all measures in a table that are missing one. |
| excel_to_pbi_pipeline | Full pipeline: inspect Excel, create import queries, refresh, validate. |
| model_snapshot_export | Export the full model as JSON for documentation or version control. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| resource_model_schema | Full model snapshot: tables, columns, measures, relationships. |
| resource_model_measures | All DAX measures in the active model. |
| resource_model_relationships | All relationships in the active model. |
Latest Blog Posts
- 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/imnotStealthy/powerbi-mcp-local'
If you have feedback or need assistance with the MCP directory API, please join our Discord server