pbi-doc-generator
Power BI Documentation & Live Lineage Studio (pbi-doc-generator v1.0)
Turn Power BI Service Workspaces and local .pbix / .pbip / .xlsx files into clean, searchable HTML documentation with interactive Star-Schema diagrams, auto-formatted DAX catalogs, visual Power Query pipelines, 3-panel end-to-end Live Lineage, and a built-in local Model Context Protocol (MCP) server for AI assistants.
👉 Explore the Live Interactive v1.0 Demo Portal in your browser (no installation required)
Quick Start
Option 1: Portable Windows Download (No Python Required - Recommended for Business Users)
Click here to download
PBI_Doc_Generator_Windows_Portable.zipdirectly (or view the Release page).Right-click the downloaded ZIP file and choose Extract All...
Open the extracted folder and double-click
PBI_Doc_Generator.exe-> your browser openshttp://127.0.0.1:8765automatically. (If Windows SmartScreen asks for confirmation on first launch: click More info -> Run anyway.)
Option 2: Install via pip (Python 3.10+ on Windows, macOS & Linux)
pip install "git+https://github.com/djrien-ai/pbi-doc-generator.git"Launch the local Web Studio from anywhere:
pbi-doc-generator(Or clone/download the source repository on Windows and double-click Start_Studio.cmd - it automatically installs requirements.txt on first launch.)
Power BI Service Workspace Role Prerequisite (Contributor or higher)
To extract full semantic model definitions (tables, relationships, DAX measures, and Power Query M) from Power BI Service workspaces, your Microsoft account must have at least the Contributor role (Contributor, Member, or Admin) in each workspace you want to document.
Workspaces where you only have the Viewer role will list basic workspace and report inventory, because Microsoft's Fabric
getDefinition(TMDL) API blocksViewer-only accounts (HTTP 403).Documenting local
.pbix,.pbip, and.xlsxfiles works 100% offline and requires no Power BI Service permissions.
Related MCP server: fabric-model-reader-mcp
What Is Inside v1.0
Power BI Service Multi-Workspace Scanner (Zero Azure Admin Setup Required)
Sign in with your normal Microsoft account (
Sign in with MicrosoftOAuth 2.0 PKCE in your default browser, plus a fallbackPower BI Web Windowmode for locked-down corporate tenants, Azure CLI, and Service Principal support for CI/CD).Document 1 or 50+ workspaces into one searchable, 100% offline HTML portal with Grid, List, and By Workspace views, Workspaces & Reports Mapping (highlighting Cross-Workspace Shared Datasets / Thin Reports and Orphan Models), Interactive Live Lineage, and Governance & Health Checks.
Unified Local File Support (
.pbix,.pbip,.xlsx)Drop or select any local
.pbixfile,.pbipproject (automatically resolves its companion.SemanticModelfolder), or Excel PowerPivot.xlsxworkbook directly in the browser.
Effortless-to-Read Model Documentation
Interactive Star-Schema Diagram: Automatically classifies Fact vs. Dimension tables with zoom, pan, fullscreen, and click-to-pin relationship highlighting (contributed by
@jakubpokusa).Visual Power Query Pipelines: Displays an easy-to-scan transformation step ribbon (
1. Source -> 2. Filtered Rows -> 3. Typed Columns) above collapsible syntax-highlighted M code, recognizing 28+ enterprise connectors (SAP HANA, SAP BW, Snowflake, Databricks, Microsoft Fabric, SQL Server, SharePoint, Excel, BigQuery, and more).Auto-Formatted & Structured DAX Catalog: Defaults to a fast Compact Table overview with a 1-click toggle to Formatted Cards organized by
Table -> Display Folder -> Dependency Tier, pretty-printing single-line DAX formulas and linkingReads:/Used by:dependencies.
Interactive 3-Panel Live Lineage Explorer
Click any upstream database/view, Power Query table, column, DAX measure, or Power BI report to trace live upstream origins and downstream impact with smooth SVG connectors.
Built-In Local Model Context Protocol (MCP) Server for AI Assistants
Tab 3 of the Web Studio (
pbi-doc-generator mcp) exposes 8 read-only MCP tools to VS Code GitHub Copilot, Claude Desktop, Cursor, or Antigravity across all your scanned workspaces and imported local.pbix/.pbip/.xlsxmodels, with automatic secret masking.
Command-Line Usage (CLI & CI/CD)
# Launch the interactive Web Studio (default)
pbi-doc-generator
# Scan specific workspaces incrementally and generate the offline HTML portal
pbi-doc-generator scan --workspace "Supply Chain"
# Generate an anonymized portal safe for external sharing (hides personal/owner names)
pbi-doc-generator portal --anonymous
# Import a local .pbip, .SemanticModel, .pbix, or .xlsx into the multi-model catalog
pbi-doc-generator import-local ./SalesModel.pbip
# Generate a single standalone HTML file for one .pbix / .pbip / .xlsx
pbi-doc-generator file ./Report.pbix
# Start the stdio MCP server for AI assistants
pbi-doc-generator mcpSecurity & Privacy by Design
100% Local Execution: Metadata, TMDL definitions, and generated HTML files stay on your machine (
127.0.0.1). Zero telemetry or external CDN calls.Enforced Read-Only API Guard:
PowerBiReadOnlyClientblocksDELETE,PATCH,PUT, and mutatingPOSTrequests in code, allowing onlyGETmetadata calls and the read-only FabricgetDefinitionendpoint.In-Memory Tokens Only: OAuth access tokens live strictly in Python RAM for the active session and are never written to disk.
Automatic Secret Redaction: Connection passwords, SAS tokens, API keys, and bearer tokens are automatically masked in both HTML pages and MCP responses. See SECURITY.md for details.
Enterprise Integrations & Architecture Audits
The core of pbi-doc-generator is and remains 100% free and open-source under the MIT License. Organizations looking for custom enterprise integrations (automated CI/CD lineage publishing to SharePoint, Confluence, or Microsoft Purview, historical semantic-model drift monitoring, or white-label governance portals) or an independent Power BI Estate & Semantic Model Architecture Audit can inquire via Bohan VOF (connect with Rien Scheerlinck on LinkedIn).
Community & Support
Special thanks to community contributors @jakubpokusa (interactive Mermaid relationship viewer), @okiyuki99 (Xpress9 pbixray support), and @nblankes (TMDL table doc-comment bug report).
If pbi-doc-generator saves your BI team hours of manual documentation or impact analysis, consider starring the repository or supporting ongoing open-source development on Ko-fi.
License
MIT License - Copyright (c) 2024-2026 Rien Scheerlinck. See LICENSE for full text.
Available Tools
8 toolspbi_catalog_summaryA
Return high-level counts of scanned Power BI workspaces, semantic models, reports, dataflows, and source connectors.
Inputs: no named parameters.
pbi_generate_portalB
Regenerate the offline HTML Documentation & Live Lineage Portal from the local catalog store.
Inputs: anonymous.
pbi_health_auditC
Return governance, refresh, performance, and architecture findings across all scanned Power BI models.
Inputs: severity.
pbi_inspect_modelB
Return full architecture blueprint of a semantic model: tables, storage modes, relationships, RLS roles, DAX measures, and health findings.
Inputs: model (required).
pbi_list_modelsB
List documented Power BI semantic models with workspace, refresh status, source connectors, table/measure counts, and health warnings.
Inputs: search, workspace.
pbi_measure_lineageA
Return full upstream (referenced columns and base measures) and downstream (dependent KPIs and reports) lineage for a DAX measure.
Inputs: measure (required), model.
pbi_search_dax_and_mB
Search across all DAX measures, calculated columns, and Power Query M scripts in the catalog.
Inputs: query (required).
pbi_source_impactA
Perform end-to-end impact analysis for an upstream database, server, view, SharePoint site, or table name: returns every affected Power BI table, semantic model, DAX measure, and downstream report.
Inputs: source (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a reasonably distinct job: catalog_summary gives counts, list_models enumerates models, and inspect_model drills into one model's blueprint. The only fuzzy pairs are list_models vs inspect_model (depth vs enumeration) and measure_lineage vs source_impact (both lineage, but scoped to measures vs upstream sources), and the descriptions clarify both well enough.
All names are snake_case with a uniform pbi_ prefix and use domain vocabulary consistently. There is a minor deviation between verb-first names (pbi_list_models, pbi_inspect_model, pbi_generate_portal) and noun-first names (pbi_catalog_summary, pbi_measure_lineage, pbi_health_audit, pbi_source_impact), but the pattern remains readable and predictable.
Eight tools is a well-scoped set for a Power BI documentation/lineage server, with each tool covering a distinct read or generate capability. Nothing feels redundant or padded.
The surface covers discovery, inspection, DAX/M search, lineage, impact analysis, health auditing, and portal generation, which is strong coverage for documentation workflows. Minor gaps exist: no standalone report or workspace listing (reports appear only as downstream entities), no per-model export, and no tool to trigger a catalog scan/refresh.
Maintenance
Related MCP Connectors
Governed BI MCP. Ask questions of live company data and list workspace sources via OAuth.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for connecting to Microsoft Fabric and Power BI semantic models, enabling workspace browsing, dataset management, TMSL retrieval, DAX queries, model creation/editing, and includes a Best Practice Analyzer with 71 rules.2MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for reading and analyzing Fabric semantic models. Supports getting model definitions and executing DAX queries against Power BI datasets.17-
- AlicenseNot gradedqualityDmaintenanceProvides full lineage graph analysis for Power BI .pbix files, enabling source-to-visual-field traversal. Exposes REST and MCP endpoints for building, searching, and exporting lineage graphs.MIT
- AlicenseBqualityBmaintenanceMCP server for interacting with local Power BI Desktop and .pbip projects, enabling DAX queries, model documentation, measure editing, and PBIR visual management via natural language.90365 PyPI1Apache 2.0