# pbix-lineage [Health: Active]

**Category:** 📊 Data Visualization  
**Repository:** https://github.com/fabienfrfr/pbix-lineage  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pbix-lineage

## Description
Bidirectional data lineage graph for Power BI (.pbix) files, from source to display

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "pbix-lineage": {
    "command": "uvx",
    "args": ["pbix-atlas"],
    "env": {
      "PBIX_LINEAGE_HOST": "",
      "PBIX_LINEAGE_PORT": ""
    }
  }
}
```

**Requires environment variables:** `PBIX_LINEAGE_HOST`, `PBIX_LINEAGE_PORT` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What pbix-lineage does

The pbix-lineage MCP server analyzes Power BI `.pbix` files and represents their dependencies as a directed graph. A graph can connect physical sources such as HTTP, OData, SQL, or files to Power Query expressions, columns, calculated columns, DAX measures, and fields used by report visuals. This lets an agent investigate both where a displayed field came from and which report elements depend on a source or model object.

Its central input is a local PBIX report, which is parsed into a graph for navigation and export.

## How it works

The graph builder combines several parsing stages. It isolates Power BI model access through a `pbixray` adapter, detects physical sources using configurable patterns, parses Power Query M with a built-in lexer, parser, and runtime, and reads report layout data to identify visual fields. DAX references and supported DAX expressions are also translated or analyzed as part of the model chain.

The resulting structure is a `networkx.DiGraph` containing typed nodes and edges. Navigation functions can search for matching nodes, walk toward upstream dependencies, walk downstream dependents, or print a tree from a selected node. The HTTP application mounts FastMCP at `/mcp/` and also provides REST routes for the same main operations.

## Setup and configuration

Install the Python package with:

```bash
pip install pbix-atlas
```

For the HTTP API and MCP server, the documented development setup is:

```bash
uv sync --extra api
uv run pbix-atlas
```

The service listens at `http://127.0.0.1:8080` by default. `PBIX_LINEAGE_HOST` and `PBIX_LINEAGE_PORT` configure the host and port. The streamable HTTP MCP endpoint is `/mcp/`.

## Tools and capabilities

The pbix-lineage MCP server exposes operations corresponding to these documented API routes:

- Create a graph from a PBIX file with `/graphs`.
- Search graph nodes with `/search`.
- Traverse dependencies upstream or downstream with `/upstream` and `/downstream`.
- Render a lineage tree with `/tree`.
- Export graph data with `/export`.
- Generate a Python pipeline with `/codegen`.

The Python API includes graph construction, node lookup, tree printing, traversal, summary generation, GraphML export, and separate node and edge CSV exports. GraphML output can be opened by tools such as Gephi or yEd. Optional code generation produces one Python file covering the source, extraction, Power Query, semantic model, and Vizro dashboard stages.

## Limitations and notes

Power Query execution uses the built-in interpreter, and unsupported functions raise `MRuntimeError` rather than being replaced with silent placeholder behavior. DAX handling is based on a supported subset. Physical source detection uses configurable patterns, so unusual source formats may require configuration. The available documentation describes local PBIX analysis and a local HTTP service; it does not document authentication, hosted deployment, or write-back to Power BI reports.

_Full upstream README: https://allmcps.com/mcp/pbix-lineage/readme_

