Metadata-Version: 2.5
Name: mcp-data-platform-toolkit
Version: 1.5.1
Summary: MCP server for Power BI projects (PBIP, TMDL, PBIR): read, analyze and safely edit semantic models, find where measures and columns are used in reports, and trace the lineage from the SQL Server database project to the report visuals.
Project-URL: Homepage, https://github.com/akabyte-labs/data-platform-toolkit
Project-URL: Issues, https://github.com/akabyte-labs/data-platform-toolkit/issues
Project-URL: Changelog, https://github.com/akabyte-labs/data-platform-toolkit/blob/main/CHANGELOG.md
Author: Matteo Rossi
License-Expression: MIT
License-File: LICENSE
Keywords: dax,lineage,mcp,model-context-protocol,pbip,pbir,power-bi,sql-server,tmdl
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.10
Requires-Dist: mcp<3,>=2.2.0
Requires-Dist: pyyaml<7,>=6.0
Requires-Dist: sqlglot<31,>=30.24
Provides-Extra: dev
Requires-Dist: pytest==9.2.0; extra == 'dev'
Requires-Dist: ruff==0.17.3; extra == 'dev'
Description-Content-Type: text/markdown

# Data Platform Toolkit

[![tests](https://github.com/akabyte-labs/data-platform-toolkit/actions/workflows/tests.yml/badge.svg)](https://github.com/akabyte-labs/data-platform-toolkit/actions/workflows/tests.yml)
[![PyPI](https://img.shields.io/pypi/v/mcp-data-platform-toolkit)](https://pypi.org/project/mcp-data-platform-toolkit/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/LICENSE)

**Ask your AI assistant where a Power BI number comes from, and get the answer down to the source column.**

An MCP (Model Context Protocol) server for Power BI projects saved as PBIP. It reads the files on disk, with no connection to Power BI Desktop, the Power BI service or Microsoft Fabric, and lets an AI assistant:

- **analyze and safely edit semantic models** in TMDL format (read-only by default);
- **find where measures and columns are used** in PBIR reports, and which security roles read them;
- **trace end-to-end lineage**: from the source column of a SQL Server database project, through its medallion layers and Power Query, to the measures and the report visuals.

**Scope:** Power BI projects saved as PBIP, with the semantic model in TMDL and the reports in PBIR (not `.pbix` files); on the database side, SQL Server database projects (`.sqlproj`, T-SQL). Other sources that Power Query reads (files, other databases, services) appear as the start of the lineage, with their connector.

Asked where the *Ratio* card of a synthetic test project gets its numbers from, the server follows it back to the files the data warehouse loads ([the full example](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/lineage.md#example-where-the-number-of-a-visual-comes-from)):

[![Lineage of the Ratio card, from the source files through the bronze, silver and gold layers and the semantic model to the report visual](https://raw.githubusercontent.com/akabyte-labs/data-platform-toolkit/main/docs/img/lineage-example.png)](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/lineage.md#example-where-the-number-of-a-visual-comes-from)

## Try it

With [uv](https://docs.astral.sh/uv/getting-started/installation/) installed, nothing else to install by hand:

```bash
uvx --python 3.13 mcp-data-platform-toolkit --check "C:\path\to\Project.pbip"
```

`--check` validates the project and prints the configuration to paste into your MCP client, in read-only mode. Then ask the assistant about the project. Setup for Claude Desktop, VS Code and Claude Code, or with pip: [docs/installation.md](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/installation.md).

## What you can ask

| Ask | What the server does |
| --- | --- |
| "Where is [Total Sales] used, and does any RLS role read it?" | Searches every PBIR report and the RLS filters |
| "Which source columns does [Gross Margin %] come from?" | Follows DAX, Power Query and the T-SQL of the database project, upstream |
| "If I drop `mart.sales.Discount`, what breaks?" | The same chain, downstream, down to the visuals |
| "Draft the lineage.yaml of this database project." | Reads the project and asks only what the SQL can't tell |

More requests, with the tools behind each one: [docs/tools.md](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/tools.md#what-you-can-ask).

## How it fits with Microsoft's server

Microsoft's [Power BI Modeling MCP Server](https://github.com/microsoft/powerbi-modeling-mcp) works *inside* the semantic model. This server works *around* it, and answers the questions the model alone can't: which reports and security roles use each field, and where its data comes from.

| | Microsoft's Power BI Modeling MCP Server | Data Platform Toolkit |
|---|---|---|
| **Reads** | the semantic model, from Power BI Desktop, Fabric or a PBIP folder | the PBIP files on disk: semantic model, PBIR reports, and the SQL database project |
| **Answers** | what the model contains, and DAX queries | where each field is used, who can see it, where its data comes from |
| **Edits** | the whole model | measures, calculation items, formats, folders, visibility, descriptions and OLS, written straight into the TMDL files; the rest of the model through the [bridge](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/tools.md#the-microsoft-bridge) |

You don't have to choose. If the official server is installed, this server's optional [bridge](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/tools.md#the-microsoft-bridge) gives the assistant its modeling tools on the local PBIP folder, from the same connection (Windows only). Everything else of the official server, such as DAX queries, refresh and cloud operations, stays with it.

## How it was built

The model and report tools started on a real Power BI project, where the end-to-end lineage was first built for one data warehouse. This version makes the lineage generic, so any naming convention can be described in `lineage.yaml`.

I designed the tool, wrote the specifications and reviewed every change; most of the code was written with Claude Code as a pair programmer. A test suite that builds synthetic PBIP and database projects checks every change, on Windows and Linux. The choices behind it, and why: [design decisions](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/design.md).

## Documentation

- [Installation and client setup](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/installation.md)
- [Tools reference](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/tools.md)
- [End-to-end lineage and lineage.yaml](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/lineage.md)
- [Configuration and options](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/configuration.md)
- [Known limitations](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/limitations.md)
- [Design decisions](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/design.md)
- [Development: project structure and tests](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/docs/development.md)
- [Changelog](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/CHANGELOG.md) · [Contributing](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/CONTRIBUTING.md) · [Code of Conduct](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/CODE_OF_CONDUCT.md) · [Security](https://github.com/akabyte-labs/data-platform-toolkit/blob/main/SECURITY.md)
