Power BI MCP Servers
Integrate with Power BI using a local server for offline .pbix file analysis and an Azure server for querying live datasets.
š„ Power BI MCP Servers
Dual Power BI integration for Claude Desktop - Local .pbix
analysis + Live Azure API queries
⨠Features
This repository provides two complementary MCP servers for comprehensive Power BI integration:
š Local Analysis Server (pbixray-mcp-server
)
- Analyze local
.pbix
files without cloud connection - Extract DAX measures, Power Query M code, relationships
- Explore data model structure and table contents
- Perfect for offline analysis and documentation
āļø Azure Live API Server (powerbi-azure-mcp
)
- Query live Power BI datasets via REST API
- Execute DAX queries in real-time
- List workspaces, datasets, and table schemas
- Authenticate with Azure service principal
š Quick Start
Prerequisites
- Claude Desktop installed
- Node.js 18+ and Python 3.8+
- Azure service principal with Power BI permissions (for live API)
Installation
-
Clone this repository:
git clone https://github.com/anix-lynch/powerbi-mcp-servers.git cd powerbi-mcp-servers
-
Setup Local Server:
cd pbixray-mcp-server python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install mcp pbixray numpy "mcp[cli]"
-
Setup Azure Server:
cd ../powerbi-azure-mcp npm install cp .env.example .env # Edit .env with your Azure credentials
-
Configure Claude Desktop: Add to your MCP configuration:
{ "mcpServers": { "powerbi-local": { "command": "bash", "args": ["-c", "source ~/path/to/pbixray-mcp-server/venv/bin/activate && python ~/path/to/pbixray-mcp-server/src/pbixray_server.py --max-rows 100"] }, "powerbi-azure": { "command": "node", "args": ["/path/to/powerbi-azure-mcp/src/server.mjs"] } } }
š® Usage Examples
Local File Analysis
"Load this PBIX file: /Users/username/Downloads/sales-report.pbix"
"What tables are in this model?"
"Show me all DAX measures from the Sales table"
"Get the Power Query M code"
Live Azure Queries
"Test my Power BI connection"
"List all my Power BI workspaces"
"Execute this DAX query: EVALUATE Sales"
"Show me table schema for dataset [dataset-id]"
š§ Configuration
Azure Setup
Create a service principal with these permissions:
Dataset.Read.All
Workspace.ReadWrite.All
Environment Variables
AZURE_CLIENT_ID=your-app-id
AZURE_CLIENT_SECRET=your-client-secret
AZURE_TENANT_ID=your-tenant-id
š Project Structure
powerbi-mcp-servers/
āāā pbixray-mcp-server/ # Local .pbix analysis
ā āāā src/pbixray_server.py # Python MCP server
ā āāā demo/ # Sample files
ā āāā requirements.txt
āāā powerbi-azure-mcp/ # Live Azure API
ā āāā src/server.mjs # Node.js MCP server
ā āāā package.json
ā āāā .env.example
āāā docs/ # Documentation
šÆ Available Tools
Local Server Tools
load_pbix_file
- Load Power BI file for analysisget_tables
- List all tables in the modelget_dax_measures
- Access DAX measures with filteringget_power_query
- Display M/Power Query codeget_relationships
- Get data model relationshipsget_table_contents
- Retrieve table data with pagination
Azure Server Tools
test_connection
- Test Azure authenticationlist_workspaces
- List accessible workspaceslist_datasets
- Browse datasets in workspaceexecute_dax_query
- Run DAX queries against live dataget_dataset_tables
- Explore table schemasget_dataset_info
- Get dataset metadata
š¤ Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Credits
- PBIXRay - Power BI file analysis library
- Model Context Protocol - MCP specification
- Microsoft Power BI REST API
Built with ā¤ļø for the Claude + Power BI community
Related Servers
Tinybird
Interact with Tinybird serverless ClickHouse platform
Unofficial ChEMBL MCP Server
Access the ChEMBL chemical database for drug discovery, chemical informatics, and bioactivity research using specialized tools via its REST API.
TON BLOCKCHAIN MCP
Interact with the TON blockchain using natural language.
Canada's Food Guide
A nutrition analysis platform integrating Canada's Food Guide recipes with Health Canada's official nutrition databases.
Claude Conversation Memory System
Provides searchable local storage for Claude conversation history, enabling context retrieval during sessions.
DICOM MCP Server
Enables AI assistants to query, read, and move data on DICOM servers such as PACS and VNA for medical imaging.
CockroachDB
Integrate with CockroachDB, a cloud-native, distributed SQL database.
Token Metrics
Token Metrics integration for fetching real-time crypto market data, trading signals, price predictions, and advanced analytics.
Elasticsearch
Connect to and interact with an Elasticsearch cluster directly from any MCP client using environment variables for configuration.
Discogs MCP Server
Access the Discogs API for music cataloging, search, and other database operations.