Skip to main content

TOMPo MCP — Power BI & Fabric Lineage Intelligence

Trace lineage from semantic models → tables → reports → pages → visuals → columns/measures.

An MCP (Model Context Protocol) server that brings Power BI lineage intelligence directly into your AI assistant — GitHub Copilot, Claude Desktop, Cursor, or any MCP-compatible client.

What it does

  • Full Lineage: See exactly which columns and measures appear in which visuals, across all reports bound to a semantic model
  • Impact Analysis: "What breaks if I rename Employee.StartDate?" — instantly shows every affected visual
  • Interactive Visualization: Export a self-contained D3 tree (HTML file) with expand/collapse, zoom, and search
  • Zero Infrastructure: Runs locally on your machine using your own Azure identity. No App Service, no Docker, no backend.

Quick Start

1. Install

pip install tompo-mcp

2. Login to Azure

az login

3. Add to VS Code

Option A — mcp.json (recommended)

Create or edit .vscode/mcp.json in your workspace (or ~/.config/Code/User/mcp.json globally):

{
  "servers": {
    "tompo": {
      "command": "python",
      "args": ["-m", "tompo_mcp"],
      "type": "stdio"
    }
  }
}

Option B — settings.json

Add to your VS Code settings.json (Ctrl+Shift+P → "Preferences: Open User Settings (JSON)"):

{
  "mcp": {
    "servers": {
      "tompo": {
        "command": "python",
        "args": ["-m", "tompo_mcp"],
        "type": "stdio"
      }
    }
  }
}

4. Use in Copilot Chat

Open GitHub Copilot Chat and start asking:

> List my Fabric workspaces
> Generate lineage for dataset abc-123 in workspace xyz-456
> What visuals use the Employee.Department column?
> Export the lineage as an interactive HTML file

MCP Tools

Tool Description
list_workspaces List all Fabric/Power BI workspaces you have access to
generate_lineage Full lineage: Model → Tables → Reports → Pages → Visuals → Fields
impact_analysis Find all visuals where a specific column or measure is used
describe_semantic_model Detailed metadata: tables, columns, measures, relationships, roles
export_lineage_html Generate interactive D3 visualization as a self-contained HTML file

How It Works

You type in Copilot Chat
        │
        ▼
Copilot calls TOMPo MCP tools
        │
        ▼
TOMPo runs locally on your machine:
  → Uses your az login identity
  → Calls Fabric REST APIs (getDefinition, Scanner, DAX)
  → Parses model + report definitions
  → Builds lineage tree
  → Returns data to Copilot
        │
        ▼
Copilot shows the lineage tree / impact table
(or opens interactive HTML in your browser)

Authentication

TOMPo uses DefaultAzureCredential which automatically picks up:

  1. Azure CLI (az login) — most common for developers
  2. VS Code Azure Account — if you're signed into the Azure extension
  3. Environment variables — for CI/CD pipelines
  4. Managed Identity — for Azure-hosted scenarios

You need access to the Fabric workspaces you want to analyze. No extra app registrations or service principals required.

Metadata Extraction (3-tier fallback)

  1. Fabric getDefinition API — returns full model.bim / TMDL / PBIR definitions
  2. Admin Scanner API — fallback if getDefinition fails (requires admin permissions)
  3. DAX executeQueries — last resort using INFO.TABLES(), INFO.COLUMNS(), etc.

If a sensitivity label blocks access, TOMPo temporarily downgrades to "General", extracts metadata, then restores the original label.

Interactive Visualization

The export_lineage_html tool generates a single HTML file with:

  • D3 horizontal tree with expand/collapse nodes
  • Color-coded by type (model, table, report, page, visual, column, measure)
  • Impact Analysis tab with searchable data grid
  • Semantic Model tab with tables, columns, measures, relationships
  • Zoom, pan, fullscreen — all interactive
  • Works offline — all JavaScript and CSS inlined, no server needed

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "tompo": {
      "command": "python",
      "args": ["-m", "tompo_mcp"]
    }
  }
}

Cursor / Windsurf

{
  "mcpServers": {
    "tompo": {
      "command": "python",
      "args": ["-m", "tompo_mcp"]
    }
  }
}

Development

git clone https://github.com/microsoft/tompo-mcp.git
cd tompo-mcp
pip install -e ".[dev]"
python -m pytest tests/

Requirements

  • Python 3.10+
  • Azure CLI (az login) or any Azure credential
  • Access to Fabric/Power BI workspaces

License

MIT

Metadata

Release files for tompo-mcp 0.3.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tompo-mcp 0.3.23
File Size Uploaded Provenance Actions
tompo_mcp-0.3.23.tar.gz 33.4 MB Without provenance Details for tompo_mcp-0.3.23.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tompo-mcp 0.3.23
File Interpreter ABI Platform Actions
tompo_mcp-0.3.23-py3-none-any.whl Python 3 none any Details for tompo_mcp-0.3.23-py3-none-any.whl

Total release size: 66.9 MB

Release files / tompo_mcp-0.3.23.tar.gz

Download URL tompo_mcp-0.3.23.tar.gz
Size 33.4 MB
Tags Source
SHA-256 checksum
How to use checksums
16a73def5469d5de9cc3ffbda2a026bd7ddb5b5ec685f66f6c4d95ec3b9b37d9
BLAKE2b-256 checksum
How to use checksums
a9ee7e92e0094cc83c1c57871c68fe6aef4d4514e1abe715453f44f397510226
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / tompo_mcp-0.3.23-py3-none-any.whl

Download URL tompo_mcp-0.3.23-py3-none-any.whl
Size 33.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4ce2e14536cfc9355aa6173079686c14bb3ba71344a77150951ff9d2d7e230da
BLAKE2b-256 checksum
How to use checksums
594509183f22a9afefa1d445251372ea0dcf7be21e5d08ad4bf748bbadc5ee30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for tompo-mcp 0.3.23

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page