Pbi Dax Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Pbi Dax Mcp Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
🚀 A comprehensive Model Context Protocol (MCP) server for Power BI DAX query execution, validation, optimization, and intelligent assistance.
Create a .env file with the following variables:
# Required: Power BI XMLA Endpoint
POWERBI_XMLA_ENDPOINT=powerbi://api.powerbi.com/v1.0/myorg/YourWorkspace
# Azure Authentication (choose one method)
# Method 1: Service Principal (Recommended for production)
AZURE_TENANT_ID=your-tenant-id
AZURE_CLIENT_ID=your-client-id
AZURE_CLIENT_SECRET=your-client-secret
# Method 2: User Authentication (for development)
# Use 'az login' before running the server# Install dependencies
npm install
# Build the project
npm run build
# Start the enhanced server
npm run start:enhanced
# Or for development with hot reload
npm run dev:enhanced// Execute a simple DAX query
{
"tool": "powerbi_run_dax",
"parameters": {
"query": "EVALUATE VALUES(DimProduct[ProductName])",
"validate": true
}
}// Validate DAX syntax before execution
{
"tool": "powerbi_validate_dax",
"parameters": {
"query": "CALCULATE(SUM(Sales[Amount]), FILTER(DimDate, DimDate[Year] = 2024))"
}
}// Generate Year-to-Date calculation
{
"tool": "powerbi_generate_template",
"parameters": {
"templateType": "year_to_date",
"tableName": "Sales",
"measureName": "YTD Sales"
}
}// Get dataset schema information
{
"tool": "powerbi_get_schema",
"parameters": {
"datasetId": "your-dataset-id"
}
}// Check server health and connectivity
{
"tool": "powerbi_health",
"parameters": {
"testConnectivity": true
}
}The server includes pre-built templates for common calculations:
year_to_dateprevious_yearyear_over_year_growthmoving_averageabc_analysistime_intelligenceUse AI-powered assistance for DAX development:
// Analyze a DAX query
{
"prompt": "analyze_dax",
"parameters": {
"query": "CALCULATE(SUM(Sales[Amount]), Sales[Year] = 2024)"
}
}
// Generate DAX from business requirements
{
"prompt": "generate_dax_solution",
"parameters": {
"requirements": "Calculate total sales for the current year compared to last year"
}
}
// Explain DAX concepts
{
"prompt": "explain_dax_concept",
"parameters": {
"concept": "CALCULATE function"
}
}Access documentation and examples:
// Get DAX function documentation
GET powerbi://docs/functions
// Get template examples
GET powerbi://templates/time_intelligenceserver-enhanced.ts) - Main MCP server with all featuresvalidators.ts) - Syntax validation and optimizationtemplates.ts) - DAX template generationenhanced-powerbi.ts) - Power BI API interactionslogging.ts) - Comprehensive logging and telemetryresources.ts) - Dynamic resource managementprompts.ts) - Intelligent DAX assistanceerror-handling.ts) - Robust error recoveryThe server includes comprehensive error handling with:
Built-in performance monitoring includes:
# Check Azure credentials
az account show
# Re-authenticate if needed
az login # Verify workspace access
# Ensure Premium capacity
# Check XMLA endpoint format # Clean and rebuild
npm run typecheck
npm run buildUse the health check tool to diagnose issues:
{
"tool": "powerbi_health",
"parameters": {
"testConnectivity": true
}
}The server provides comprehensive logging:
Log format includes:
src/
├── server.ts # Original basic server
├── server-enhanced.ts # Enhanced server with all features
├── powerbi.ts # Basic Power BI operations
├── enhanced-powerbi.ts # Advanced Power BI service
├── validators.ts # DAX validation engine
├── templates.ts # DAX template engine
├── logging.ts # Logging and telemetry
├── resources.ts # Resource management
├── prompts.ts # Intelligent prompt system
├── error-handling.ts # Error handling and recovery
├── types.ts # TypeScript type definitions
└── cli.ts # Command-line interface# Development with hot reload
npm run dev:enhanced
# Type checking
npm run typecheck
# Build for production
npm run build
# CLI commands
npm run health
npm run list
npm run validate
npm run templateThe enhanced server includes optimizations for:
We welcome contributions! Please:
MIT License - see LICENSE file for details.
For support and questions:
Future enhancements planned:
Enhanced Power BI DAX MCP Server v1.0.0 - Transforming DAX development with intelligent assistance and comprehensive tooling! 🎉
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.