Skip to main content
Glama
README.md
# powerbi-mcpb

MCP Bundle for **local** Power BI report files (`.pbix`, `.pbip`, `.pbit`). No Azure, no cloud API, no sign-in.

---

## Architecture

```
powerbi-mcpb/
├── src/
│   ├── index.ts
│   ├── helpers.ts
│   ├── local/
│   │   ├── paths.ts          # LOCAL_REPORTS_DIR
│   │   ├── scan.ts           # Find reports on disk
│   │   ├── pbixArchive.ts    # Unzip .pbix / .pbit
│   │   ├── pbixReader.ts
│   │   └── pbipReader.ts     # Read .pbip project folders
│   └── tools/
│       └── localReports.ts   # list_local_reports, get_local_report, ...
├── manifest.json
└── ...
```

Legacy cloud tools (`workspaces.ts`, `reports.ts`, `datasets.ts`) remain in the repo but are **not registered** — they targeted `api.powerbi.com`.

---

## Prerequisites

- **Node.js 18+**
- Power BI report files in a folder on disk

---

## Dev setup

```bash
npm install
npm run build
npm run bundle
```

```powershell
$env:LOCAL_REPORTS_DIR = "C:\Your\Reports"
npm start
```

---

## Install (MCP bundle)

Pick your reports folder when prompted (`local_reports_folder`). Rebuild with `npm run pack`.

---

## Tools

| Tool | Description |
|------|-------------|
| `list_local_reports` | Scan folder for `.pbix`, `.pbip`, `.pbit` |
| `get_local_report` | Pages, tables (if available), archive listing |
| `list_local_model_tables` | Tables/columns from `.pbip` / `.pbit` |

---

## Authentication

None. Files are read from disk only.