mcp-powerbi-desktop
Model Context Protocol server that enables querying and modifying live Power BI Desktop models by connecting to the in-memory Analysis Services engine.
README
Power BI Desktop Companion MCP Server
A Model Context Protocol (MCP) server that acts as a local companion tool for actively running Power BI Desktop (.pbix) sessions. It attaches to the live in-memory Analysis Services engine on the local machine (similar to DAX Studio or Tabular Editor).
This companion tool is designed ONLY for local running Power BI Desktop instances. It communicates using Windows PowerShell interop to run OLE DB queries and Tabular Object Model (TOM) mutations.
Architecture & Features
- Windows PowerShell OLE DB / TOM Bridge: Executes native OLE DB commands (using the MSOLAP provider) and Tabular Object Model (TOM) scripts directly against the host machine's Analysis Services engine.
- Dynamic Host Instance Discovery: Scans host processes to locate the dynamic ports, PIDs, database catalog GUIDs, table counts, and measure counts of all open
.pbixfiles. - Case-Insensitive Metadata Parsing: Robust schema extraction from system DMVs, filtering out internal tables (
LocalDateTable_*,DateTableTemplate_*) to present clean models. - Live Model Mutations: Directly creates or updates measures in the active
.pbixsession in-memory, committing changes using TOM'sSaveChanges(). - Stateful Connection Management: Retains connection info (selected port and database catalog) in-memory across MCP requests, auto-selecting if only one instance is active.
Tools Exposed
list_instances: Lists active local Power BI Desktop instances and their ports.select_instance(port): Connects the MCP server session to a specific port.get_model_metadata: Returns a token-efficient summary of tables and measures.list_measures: Returns all measure names, expressions, and parent tables.get_measure(name): Retrieves the DAX formula for a specific measure.create_measure(table, name, dax): Creates a new measure in a table.update_measure(table, name, dax): Updates an existing measure's formula.create_or_update_measure(table, name, dax): Unified tool to create or update a measure.run_tmsl(script): Runs Tabular Model Scripting Language (TMSL) scripts.
Prerequisites & Installation
Requirements
- Python 3.11+
- Power BI Desktop running on Windows
- Execution environment: Directly on Windows, or via WSL2 (with PowerShell interop enabled).
Installation
cd power-bi
pip install -e .
Running the MCP Server
Run the python server directly to enable standard I/O communication:
python3 mcp_server.py
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.