mcpField
P
pbix-atlas

pbix-atlas

Local
github.com/fabienfrfrData & Analytics0Updated 13w ago

About pbix-atlas

pbix-atlas builds a navigable lineage graph for Power BI .pbix reports, tracing data from sources through queries and model fields to report visuals. It also provides graph exports, an HTTP API, MCP access, and Python pipeline generation.

Key features

  1. 01Trace source-to-visual lineage
  2. 02Search and traverse graph nodes
  3. 03Export GraphML and CSV
  4. 04Generate Python report pipelines
  5. 05REST API and MCP endpoint

Use cases

  1. 01Trace a visual field back to its source
  2. 02Explore downstream effects of a source
  3. 03Export lineage for graph analysis

MCP support

Exposes lineage operations through an MCP server at `/mcp/`, including graph search, traversal, export, and code generation.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"fabienfrfr-pbix-atlas": {
"command": "uvx",
"args": [
"pbix-atlas"
],
"env": {
"PBIX_LINEAGE_PORT": "<PBIX_LINEAGE_PORT>",
"PBIX_LINEAGE_HOST": "<PBIX_LINEAGE_HOST>"
}
}
}
}
Run commanduvx pbix-atlas
Environment variables to set
PBIX_LINEAGE_PORTPort the server listens on
PBIX_LINEAGE_HOSTHost interface to bind to

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypipbix-atlas1.0.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

🌐 PBIX‑Atlas

PyPI GitHub CI MCP Registry

Full lineage graph for Power BI — from source to visual field

PbixAtlas is an Universal lineage graph for Power BI .pbix files: source to visual field in one traversable graph.

source (HTTP, OData, SQL, file...) --> Power Query (M)
    --> column / calculated column --> measure (DAX)
        --> field displayed in a report visual

Install

pip install pbix-atlas
# or
uv add pbix-atlas

Quick start

from pbix_atlas import LineageGraphBuilder, upstream, downstream, print_tree, find_nodes

graph = LineageGraphBuilder().build("my_report.pbix")

find_nodes(graph, "customer_name")
print_tree(graph, "visual_field::my_report.pbix::Page1::16::customer_name", direction="upstream")
print_tree(graph, "source::odata::example.com/odata/", direction="downstream")

Export

from pbix_atlas import export_graphml, export_nodes_csv, export_edges_csv, graph_summary

graph_summary(graph)  # {'query': 70, 'column': 183, ...}
export_graphml(graph, "lineage.graphml")  # Gephi / yEd
export_nodes_csv(graph, "nodes.csv")
export_edges_csv(graph, "edges.csv")

Codegen — standalone Python pipeline

Generates a single Python file reproducing a report's full chain: source → extraction → Power Query → semantic model → Vizro dashboard. The M source is executed at runtime by the built-in interpreter, not pattern-matched. Unimplemented functions raise MRuntimeError (no silent stubs).

pip install "pbix-atlas[codegen]"
pbix-atlas-codegen my_report.pbix -o pipeline.py
from pbix_atlas import generate_python_pipeline

generate_python_pipeline("my_report.pbix", "pipeline.py")

HTTP API / MCP server

uv sync --extra api
uv run pbix-atlas    # http://127.0.0.1:8080
  • REST: POST /graphs, /search, /upstream, /downstream, /tree, /export, /codegen
  • MCP (streamable HTTP): http://127.0.0.1:8080/mcp/
  • Env vars: PBIX_LINEAGE_HOST, PBIX_LINEAGE_PORT

Architecture

ModuleResponsibility
models.pyNode/edge types and shared data structures
sources.pyPhysical source detection (configurable patterns)
pbix_model.pyAdapter isolating from pbixray
m_lexer.py / m_parser.pyBuilt-in M tokenizer and parser
m_interpreter.pyM runtime interpreter + stdlib
dax_translate.pyDAX → Python (supported subset)
dax.pyDAX reference parsing
mquery.pyPower Query dependencies (table-level)
layout.pyInternal Report/Layout format parsing
graph_builder.pyOrchestrator: builds the networkx.DiGraph
navigation.pyUpstream/downstream traversal, search, export
codegen.pyPython pipeline code generation
api/app.pyFastAPI + MCP mount (FastMCP)

Sample files

Development

uv sync --extra dev
uv run pytest
uv build

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.