pbidriver MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
pbidriver
Part of Zynxtech open source. Project page: zynxtech.in/projects/pbidriver.
WebDriver for Power BI Desktop. Let AI agents build, see and drive Power BI Desktop reports: create PBIP projects, pages and visuals; screenshots of pages, visuals and every view; the data behind visuals; blocking dialogs; slicers, tooltips, menus, bookmarks; refresh, DAX and Performance Analyzer. It all runs locally against Power BI Desktop, with no screen grabs and no publishing to the service.
Together with Microsoft's Power BI Modeling MCP, which edits the semantic model, it's a complete kit for agents to build Power BI reports end to end and check their own work. One command sets both up for Claude Code, VS Code (GitHub Copilot), Cursor and Codex:
pip install pbidriver
pbidriver setup # MCP configs for pbidriver + the Power BI Modeling MCP, AGENTS.md, the powerbi-builder skill(Not a data connector or ODBC driver: "driver" as in WebDriver, the thing that drives an app for automation.)
⚠️ Caution: pbidriver is a new tool (first released November 2026). It edits Power BI project files, saves through Power BI and drives its UI, and like any new software it can have bugs that damage a report. Work on a copy of your report, or keep it in git and commit before letting an agent change it, so you can always go back.
pbidriver new --gitstarts new projects under git, and commands that change files add acautionnote while a project isn't under version control. Found a bug? See Reporting bugs.
Documentation: speak2jerome.github.io/pbidriver, with building reports with agents, setup for Claude Code, Copilot, Codex and Cursor and a FAQ.
pbidriver is an MCP server (pbidriver mcp, every command a pbi_* tool, screenshots returned as images) and a CLI where every command prints one JSON object, so any agent that can run a shell command can use it too.
pbidriver launch "C:\reports\Sales.pbix"
pbidriver shot --page "Overview" --annotate # PNG of the canvas, each visual labelled with its index
pbidriver read --page "Overview" # chart points, card values, table/matrix cells, slicer state
pbidriver slicer --visual "Region" --select "West" --shot
pbidriver dax "EVALUATE TOPN(5, Sales)"Build a report with an agent
After pbidriver setup, ask your agent something like "Build a sales report from data\sales.csv: revenue by region and month, top products, a region slicer." It follows the powerbi-builder skill:
pbi_newcreates a PBIP project and opens it in Power BI Desktop.The Power BI Modeling MCP connects to it and creates tables (CSV, Excel, SQL or DAX), relationships and measures.
pbi_refresh sync=trueloads the data.pbi_add_visualadds each visual, with field names checked against the live model;shot=truereturns a screenshot.pbi_shot,pbi_readandpbi_daxverify that every visual shows the right numbers;pbi_savesaves.
Claude Code users can install the same kit as a plugin: /plugin marketplace add speak2jerome/pbidriver, then /plugin install pbidriver@pbidriver. scripts/e2e_kit.py runs this whole flow through both MCP servers against a real Power BI Desktop and checks 42 things along the way, from model to saved-and-reopened report.
Related MCP server: pbi-mcp
Why
Agents can already write DAX and edit PBIP files, but they can't see the result. Screenshots of the whole desktop are noisy and need focus. Publishing to see a report breaks the fast loop. pbidriver closes that gap:
See: pixel-exact PNGs of the canvas, one visual, every visual, the full UI, or the Table / Model / DAX query / TMDL views. It handles canvases bigger than the window, minimized windows, and windows behind other windows.
Read: the values behind visuals, as Power BI formats them: chart data points, cards, whole tables and matrices (virtualized grids are scrolled through), and slicer options with their selection.
Never get stuck: blocking dialogs of every kind Power BI uses (in-app, floating WebView2, native Windows, and legacy Internet Explorer) are detected on every call, can be read and captured, and are answered with
dialog --click. Input is refused while a modal is open. Broken visuals ("Can't display this visual") are reported.Interact: real mouse and keyboard input, so visuals react exactly as if you clicked: slicers, clicks, scrolling (including sideways in wide tables), typing, keys, tooltips, context and "More options" menus (sort, drill, show as table…), and bookmarks.
Understand: every page, visual, field, filter and bookmark read from the report file, plus the model's tables, columns, measures (with DAX) and relationships.
Review the design: clean captures for judging how a page looks, and overlays with each visual's size and position (in page units), a grid, spacing, edges that almost line up, overlaps and render times, plus a layout check that lists those issues.
Tune performance: Performance Analyzer timings per visual (DAX query / visual display / other), repeated runs with a cold cache, the bottleneck of each slow visual and what to do about it, every page ranked, and cold DAX query timings.
Build: create PBIP projects, pages and visuals (14 types, fields checked against the live model), convert a
.pbixinto a PBIP project, refresh data and get the failing source's error.Close the loop: reload a PBIP after edits on disk, save, and close (answering the save prompt).
Requirements
Windows 10 or 11, with Power BI Desktop (Microsoft Store or installer build).
Python 3.9 to 3.14 (each tested on Windows in CI).
Optional, for page captures and reloads on any open window: Microsoft's Desktop Bridge, in Power BI Desktop June 2026 or later. It's on by default (Options > Security > "Enable external tool access to Power BI Desktop through secure local APIs").
Install
pip install pbidriverOr from npm, which runs the same tool and needs uv or Python 3.9+:
npx pbidriver status # or: npm install -g pbidriverThe npm package also has a JavaScript API: const { run } = require('pbidriver'); await run(['shot', '--page', 'Overview']).
The latest code from GitHub: pip install git+https://github.com/speak2jerome/pbidriver. From a checkout: pip install . (or pip install -r requirements.txt and run python -m pbidriver).
Playwright is used only to attach to Power BI's own WebView2, so playwright install is not needed.
Two ways to connect
Started with | Any open Power BI Desktop | |
How | DevTools on a private WebView2 profile, so it works next to your other Power BI windows | Microsoft's Desktop Bridge, the local model engine, and Windows itself |
Page and visual screenshots | ✅ live state, any zoom, all views | ✅ report pages and visuals (positions from the saved file) |
Table / Model / DAX / TMDL view screenshots | ✅ | ❌ |
Read visual data, hover, menus, slicers, click, scroll, type | ✅ | ❌ |
Dialogs | ✅ all kinds | ✅ native and legacy (in-app ones need |
| ✅ | ✅ |
Use pbidriver instances to list every running Power BI with its pid, file, DevTools port and Bridge status. Pick one with --pid.
Commands
Every command prints {"ok": true, ...} or {"ok": false, "error": "..."}. Commands that touch the UI also return alerts whenever something needs attention.
Instances and state
Command | What it does |
| Opens a |
| Lists every running Power BI Desktop: pid, window, file, DevTools port, Bridge, model port, unsaved changes. |
| Current page, views, unsaved changes, alerts. |
| Report pages; dialogs, banners and broken visuals right now. |
Look
Command | What it does |
| Captures the report canvas. Add |
| Captures another view without switching to it. |
| Draws each visual's index and type on the capture, so you can say "visual 18". |
| For judging the design: no labels, selection outline, hover header, tooltip or open menu. Still returns the legend (each visual's box in page units) and a layout check: overlaps, edges that almost line up, uneven gaps, visuals off the page. |
| Draws |
| Real 2× detail, re-rendered rather than upscaled. |
| Captures through the Desktop Bridge. This happens automatically when the instance has no DevTools. |
| Live list of visuals: index, type, title, box, text, error. |
Read
Command | What it does |
| The data behind visuals: |
| Every page, visual, field, filter and bookmark from the report file, with no clicking ( |
| The semantic model, including measure DAX. |
| Runs a DAX query against the open model. |
| Performance Analyzer: per-visual total, DAX query, visual display and other time in ms (medians over |
Interact (all accept --page, --view, --shot, --force)
Command | What it does |
| Sets exactly this selection, in list or dropdown slicers, including long virtualized lists. With no flag it lists the options. |
| Clicks by text or accessible name, or at a point (fractions 0–1 or px) inside a visual. |
| Hovers a point and returns the tooltip rows. |
| Right-click or "More options" menu: lists the items, or chooses one (e.g. |
| Mouse-wheel scrolling. In table visuals, every 120 px of |
| Typing (e.g. into a search slicer) and key presses ( |
| Lists bookmarks, or applies one. |
| Waits until text appears or disappears. |
Build reports (PBIP projects; add --reload to show the change, --shot to also capture it)
Command | What it does |
| Creates a blank PBIP project (one page, empty model); |
| Pages and visuals in the PBIR files: ids, types, positions, fields. |
| Adds a page. |
| Adds a card, chart (column, bar, line, area, pie, donut), table, matrix, slicer or textbox. Fields: |
| Deletes a visual. |
| Refreshes data and waits; reports the failing source's error. |
| Saves the open report as a PBIP project (or |
Dialogs, file and lifecycle
Command | What it does |
| Reads, captures or answers the blocking dialog. |
| Reloads a PBIP/PBIR report (and model) from disk after an agent edited the files (Desktop Bridge). |
| Saves the report; the Desktop Bridge confirms there are no unsaved changes left. |
| Closes a Power BI window and answers the "save your changes?" prompt. |
Agent setup
Command | What it does |
| Runs the MCP server over stdio: every command as a |
| Writes MCP configs (pbidriver + Power BI Modeling MCP), an |
| Checks Power BI Desktop, the Desktop Bridge, the Modeling MCP and the project setup. |
| Where pbidriver and the Power BI Modeling MCP (VS Code extension, exe, npx package) are, how MCP clients start them, and install commands. |
| The powerbi-builder guide: workflow, visuals, design, performance, modeling-mcp, pbir, troubleshooting. |
| Drafts a GitHub issue with versions, paths and names redacted, plus a pre-filled new-issue link. Nothing is sent. |
Common options: --port (default 9333, env PBIDRIVER_PORT), --pid, --settle (max seconds to wait for rendering, default 20, env PBIDRIVER_SETTLE; lower it for faster commands on light pages). Captures go to ./pbidriver_shots/ unless you pass --out.
Find pbidriver and the Power BI Modeling MCP
pbidriver locate prints where everything is on your machine. In short:
pbidriver | Power BI Modeling MCP (Microsoft) | |
Get it |
| VS Code extension |
On disk |
|
|
MCP server |
| the exe (or npx) with |
See it in your agent | VS Code: Command Palette > "MCP: List Servers"; Claude Code: | same; VS Code lists it as "Power BI Modeling MCP Server" |
Source, issues |
Reporting bugs
Please report bugs at github.com/speak2jerome/pbidriver/issues. The easiest way:
pbidriver bug-report --command "pbidriver read --visual 3" --error "<the error or the wrong result>" --expected "<what should happen>"This drafts the issue with your pbidriver, Python, Windows and Power BI Desktop versions, and redacts your home folder, user name, report names and other paths. It writes the draft to a file and returns a link that opens GitHub's bug form pre-filled (and a gh issue create command if you use GitHub CLI). Nothing is sent until you open the link or run the command. Agents using pbidriver are told to do the same: draft with pbi_bug_report, show you, and file only with your OK. Problems with Microsoft's Modeling MCP go to its repository.
Agent instructions (CLI only: paste into CLAUDE.md / AGENTS.md)
With MCP, pbidriver setup writes these for you. For agents that only run shell commands:
Power BI Desktop is driven with the `pbidriver` CLI; every call prints JSON.
- Start: `pbidriver status`; if nothing is running, `pbidriver launch "<report.pbix|.pbip>"`.
- Look: `pbidriver shot --page "<page>" --annotate`, then open the PNG at `file`. Visual indices in the
picture work as `--visual <index>` everywhere.
- Numbers: `pbidriver read --page "<page>"` (all visuals) or `read --visual <index>`; `pbidriver dax "EVALUATE ..."`.
- Every result may contain "alerts". If alerts.blocked is true, read the dialog with `pbidriver dialog`
and answer it with `pbidriver dialog --click "<button>"`. Fix alerts.visual_errors before moving on.
- Structure: `pbidriver inventory --summary`; measures and their DAX: `pbidriver model --part measures`.
- Build: `pbidriver new <folder> --name <Name> --open`; model through the Power BI Modeling MCP, then
`pbidriver refresh --sync`; `pbidriver add-visual <type> --field "Category=T[Col]" --field "[Measure]" --shot`.
- After editing PBIP files on disk: `pbidriver reload --report-only`, then `shot` again.
- Interact: `slicer --visual "<name>" --select "<value>" --shot`, `scroll --visual <index> --dx 1200`,
`hover --visual <index> --text "<value>"`, `menu --visual <index> --more --choose "Sort by > <field>"`.
- Design: `pbidriver shot --clean` (how it looks, plus layout issues); `--overlay size pos gaps align` to measure.
- Performance: `pbidriver perf --page "<page>" --runs 3 --cold` (bottlenecks and hints).
- When done: `pbidriver save` if the changes should be kept, then `pbidriver close --discard`.
- pbidriver is new: before changing a report, make sure it's in git with a fresh commit or work on a copy; ask
the user if neither. If pbidriver misbehaves, `pbidriver bug-report --command "..." --error "..."`, show the
draft to the user, and file it only with their OK.How it works
DevTools. Power BI Desktop draws its UI in WebView2 (Chromium) pages, one per view.
launchsetsWEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=<port>and a privateWEBVIEW2_USER_DATA_FOLDER. The private folder gives the instance its own browser process, so the flag applies even while other Power BI windows are open.pbidriverattaches with Playwright'sconnect_over_cdp.Pixel-exact captures. Only the target's rectangle is captured (
Page.captureScreenshotwith a clip), so panes and scrollbars never leak in. If the canvas doesn't fit the window, the viewport is emulated larger for the capture and then restored. Power BI resets script-driven scrolling, so scrolling isn't an option. WebView2 stops painting while minimized, so the window is restored without focus and put back exactly as it was. Captures wait for the canvas to stop changing.Data. Built-in visuals bind each data point to its element (
__data__) withtooltipInfo: the field names and values exactly as Power BI formats them. Tables and matrices are read cell by cell through their ARIA grid roles. They are virtualized, soreadscrolls them one axis at a time; Power BI moves one column per horizontal wheel event.Dialogs. Power BI uses four technologies. In-app dialogs are read from the DOM; floating ones (the refresh dialog) from their own WebView2 page while their window is visible. Native WinForms dialogs are read from their child windows and clicked with
BM_CLICK. Legacy Internet Explorer dialogs (the "Do you want to save your changes?" prompt, "Enable script visuals", "Create table") are read and clicked through the dialog's own HTML viaWM_HTML_GETOBJECT. While a modal is open, the main window is disabled; every command reports this asalerts.blocked, and input commands refuse to run, because input sent through DevTools would go around the modal.Desktop Bridge. Microsoft's local JSON-RPC API on the named pipe
pbi-desktop-bridge-<pid>, used for page and region snapshots, reload and unsaved state.DAX. Windows PowerShell loads the ADOMD.NET client that ships inside Power BI Desktop and queries the local model engine (
msmdsrv). Nothing extra is installed.Authoring.
new,add-pageandadd-visualwrite PBIR JSON with the schema versions Power BI Desktop 2.159 uses, then reload the report through the Desktop Bridge. Fields are checked against the live model (including unsaved changes from the Modeling MCP), or the TMDL files when Power BI is closed.Overlays and layout checks. Visual boxes come from the canvas DOM and are converted to page units with the page size from the report file, so sizes and positions match what PBIR and
add-visualuse. The layout check compares edges and neighbour gaps within a small tolerance (6 units).Performance.
perfdrives Power BI's own Performance Analyzer pane;--coldsends an XMLAClearCacheto the local engine before each refresh, anddax --colddoes the same between query runs.MCP server.
pbidriver mcpgenerates its tools from the CLI's own argument definitions, runs each call as a CLI subprocess, and returns PNGs as image content. It's a small JSON-RPC implementation over stdio with no extra dependencies.
Security and privacy
pbidriver is new: work on copies of reports or keep them in git (see the caution at the top).
launchopens a DevTools port on127.0.0.1. While that instance runs, any program on your machine could drive it, including your signed-in Power BI session. Close it when you're done (pbidriver close).Everything stays on your machine. Screenshots and data are written to local files; what your agent does with them is up to the agent.
perf --queriesreads queries through the clipboard. It restores your clipboard text afterwards, but non-text clipboard content is lost.
Limits
The DOM selectors are Power BI internals. They're tested on Power BI Desktop 2.152 (March 2026) and 2.159 (November 2026), both Store builds. A monthly update can rename them; they're grouped at the top of
pbidriver/cli.py.Ribbon features (
perf,bookmarks) look for English labels.Custom visuals render in sandboxed iframes. They can be captured and clicked (
--at), but their data can't be read; usedaxwith the fields frominventory.readon large tables returns the rows Power BI has loaded (it loads them in windows of about 500). Usedaxfor every row.Slicer commands rescan the list after each click: about 10 s on a 28-option list.
Bridge captures locate visuals from the saved file, so unsaved layout changes may be off.
reloadworks for PBIP/PBIR projects only; reloading the model needs a recent model compatibility level.error_textfor broken visuals matches known error phrases, so it's a heuristic.add-visualcovers 14 common visual types with their data roles, a title, position and size. Other visual types and formatting (colors, data labels, conditional formatting) mean editing the visual's PBIR JSON; the skill'spbirreference shows how.Authoring writes PBIR in the format Power BI Desktop 2.159 saves; Microsoft may change the schema versions in later releases.
Related projects
Microsoft Power BI Desktop Bridge and its
powerbi-desktopCLI: Microsoft's official local API (status, open, reload, page snapshots).pbidriveruses it where it's available.Power BI Modeling MCP server: Microsoft's MCP server for semantic model changes. pbidriver is built to work alongside it.
pbi-webview2: an earlier MCP server that drives Power BI Desktop over the same WebView2 DevTools route.
sulaiman013/powerbi-mcp: an MCP server with model tools and Desktop Bridge screenshots.
PBI Inspector: rule-based testing of report definitions.
Development
pip install -e .[test]
pytestThe tests use synthetic report files and need no Power BI. For live checks, launch a copy of a report and run the commands above, or run the full agent flow: pip install mcp, then python scripts/e2e_kit.py --clean (opens and closes one Power BI window on port 9444).
The npm package in npm/ is a thin Node wrapper that runs the same Python CLI; test it with npm test inside npm/.
The powerbi-builder skill lives in pbidriver/skill/ (packaged, used by setup and pbi_guide); python scripts/sync_skill.py copies it into the Claude Code plugin in plugins/pbidriver/, and a test checks the copies match.
The Tests workflow runs the offline suite on Windows with Python 3.9 to 3.14, and the npm tests, on every push and pull request.
Releasing:
Raise the version in
pbidriver/__init__.py,npm/package.json,plugins/pbidriver/.claude-plugin/plugin.json,CITATION.cff, the version line inllms.txtand the PyPI and npm badges at the top of this README.tests/test_versions.pyfails until they all match, so the Tests workflow catches anything missed.Add a
CHANGELOG.mdentry, and make sure the Tests workflow is green.Tag
vX.Y.Zand publish a GitHub release. The Publish workflow uploads to PyPI and npm through trusted publishing; no tokens or manual publishing.
Author
Jerome Eliezer, Zynxtech (jeromeeliezer@zynxtech.in, GitHub speak2jerome).
pbidriver is part of Zynxtech's open-source projects: zynxtech.in/projects/pbidriver.
License
MIT, see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
PDF and image tools for AI agents: compress, merge, split, OCR, sign. Runs locally, never uploads.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to interact with live Power BI Desktop report canvas via Chrome DevTools Protocol, performing actions like page navigation, clicking slicers, reading cards and matrices, and capturing baselines.337 npmMIT
- AlicenseAqualityBmaintenanceEnables local Power BI project (.pbip) automation, including model (TMDL) and report (PBIR) layer manipulation, without cloud dependencies. Provides 56 tools for building, editing, and validating reports and measures through natural language prompts.13MIT
- AlicenseBqualityAmaintenanceEnables AI agents to author and edit Power BI files locally (.pbix/PBIP), covering semantic models, reports, and Power Query M with 490 tools.10023 npm3Cryptographic Autonomy 1.0 (Combined Work Exception)
- AlicenseNot gradedqualityCmaintenanceEnables an AI assistant to build Power BI projects end to end: data modeling (tables, DAX measures, relationships, calculation groups, roles, field parameters) against an open Power BI Desktop via TOM/XMLA, and reports (pages, visuals, formatting, bookmarks, themes) as PBIR files in a .pbip project. Every visual is cross-checked against the real model before being written, so generated dashboards don't break on open.MIT