Back to home

Getting Started

Get MCP Engine running in under a minute. Choose your preferred installation method below.

QUICK START

If you have Claude Code installed, run this command:

01 — INSTALLATION

Installation Methods

Claude Desktop

The easiest way to get started. Works out of the box.

  1. Download MCP Engine from mcpengine.dev/download
  2. Double-click the .mcpb package to install
  3. Restart Claude Desktop
  4. Start chatting with your Power BI models

Claude Code CLI

For developers who prefer the command line.

  1. Ensure Claude Code is installed
  2. Run the install command below
  3. The MCP server will be added to your configuration

VS Code + Copilot

Use MCP Engine with GitHub Copilot in VS Code.

  1. Create a .vscode/mcp.json file in your workspace
  2. Add the MCP Engine configuration (see below)
  3. Restart VS Code
// Windows (Power BI Desktop)
{
  "servers": {
    "mcp-engine": {
      "type": "stdio",
      "command": "C:\\Path\\To\\McpEngine.exe",
      "args": []
    }
  }
}

// macOS (XMLA Only)
{
  "servers": {
    "mcp-engine": {
      "type": "stdio",
      "command": "/path/to/McpEngineXmla",
      "args": []
    }
  }
}

Manual Configuration

For other MCP-compatible clients.

  1. Download the appropriate binary for your platform
  2. Add the server to your client's MCP configuration
  3. Use stdio transport with the executable path
// Windows (Power BI Desktop)
{
  "mcpServers": {
    "mcp-engine": {
      "command": "C:\\Path\\To\\McpEngine.exe",
      "args": []
    }
  }
}

// macOS (XMLA Only)
{
  "mcpServers": {
    "mcp-engine": {
      "command": "/path/to/McpEngineXmla",
      "args": []
    }
  }
}

02 — REQUIREMENTS

System Requirements

Power BI Desktop

  • Windows 10/11
  • Power BI Desktop installed
  • A .pbix file open

Power BI Service (XMLA)

  • Windows or macOS
  • Premium or Fabric capacity
  • XMLA endpoint enabled

03 — EXAMPLES

Example Prompts

Try these prompts to get started with MCP Engine:

List all measures

"Show me all measures in the current model"

Create a new measure

"Create a measure called Total Revenue that sums the Amount column from Sales"

Run a DAX query

"Show me the top 10 products by revenue"

Analyze performance

"What are the largest tables in this model by memory usage?"

Set up security

"Create a role called Sales Team that filters Region to 'West'"

Compare models

"What changed since my last checkpoint?"

04 — CONFIGURATION

Environment Variables

MCP_ENGINE_LICENSE

Direct license key

Default: -

MCP_ENGINE_LICENSE_FILE

Path to license file

Default: ~/.powerbi-mcp/license.key

MCP_ENGINE_MAX_QUERY_ROWS

Max rows returned by DAX queries

Default: 1,000

MCP_ENGINE_MODE

Set to enable read-only mode

Default: -

MCP_ENGINE_NO_AUTOSELECT

Disable auto-selection of single instance

Default: false

MCP_ENGINE_MAX_PREVIEW_ROWS

Max rows for preview operations

Default: 1,000

MCP_ENGINE_PII_MASKING

Enable PII & numeric masking in outputs (Pro)

Default: false

Pagination Configuration

Centralized pagination configuration with per-tool overrides. All paginated tools pull their defaults from a single configuration source.

MCP_ENGINE_PAGINATION_DEFAULT_LIMIT

Default items per page for all tools

Default: 50

MCP_ENGINE_PAGINATION_MAX_LIMIT

Maximum allowed items per page

Default: 1,000

MCP_ENGINE_SEARCH_GROUPED_LIMIT_PER_TYPE

Default items per bucket in grouped search

Default: 25

MCP_ENGINE_PAGINATION_TOOLS_JSON

JSON object for per-tool overrides

Default: -

Configuration File (appsettings.json)

{
  "Pagination": {
    "DefaultLimit": 50,
    "MaxLimit": 1000,
    "SearchGroupedDefaultLimitPerType": 25,
    "Tools": {
      "list_model": { "DefaultLimit": 100 },
      "manage_audit": { "DefaultLimit": 100, "MaxLimit": 10000 }
    }
  }
}

Precedence: Environment variables override appsettings.json, which overrides hardcoded defaults.

Default Tool Overrides

All tools
Default: 50Max: 1,000

Global default

list_model
Default: 100Max: 1,000

More exploratory by default

manage_audit
Default: 100Max: 10,000

Audit entries are small; large exports common

Per-Tool Override via Environment

export MCP_ENGINE_PAGINATION_TOOLS_JSON='{"list_model":{"DefaultLimit":200},"manage_audit":{"MaxLimit":50000}}'

External Change Detection

Detects when the Power BI model is modified outside of MCP (e.g., in Power BI Desktop UI or Tabular Editor) and can prompt to reload metadata or block operations until refreshed.

How It Works

  • Before each tool call, MCP checks when the model was last modified
  • Compares against a baseline (set on connect and after each change you make)
  • If the model was modified more recently than the baseline, an external change is detected
  • Works with both Power BI Desktop and Power BI Service (XMLA)

Behavior Modes

Prompt (default)

Shows elicitation prompt asking user to reload

Auto-reload

Automatically refreshes metadata without prompting

Fail-closed (default)

Blocks operation if user declines reload

Fail-open

Proceeds with stale metadata after one-time acknowledgment

Environment Variables

MCP_ENGINE_EXTERNAL_CHANGE_DETECTION

Enable/disable feature

Default: true

MCP_ENGINE_EXTERNAL_CHANGE_POLL_MIN_INTERVAL_MS

Throttle between polls (ms)

Default: 500

MCP_ENGINE_EXTERNAL_CHANGE_PROMPT

Show elicitation prompts

Default: true

MCP_ENGINE_EXTERNAL_CHANGE_AUTO_RELOAD

Auto-reload without prompt

Default: false

MCP_ENGINE_EXTERNAL_CHANGE_FAIL_CLOSED

Block on stale model

Default: true

Manual Reload

Manually refresh metadata anytime via manage_model_connection:

{ "operation": "reload" }

Design Points

  • No false positives: Baseline resets after each change you make through MCP
  • Graceful degradation: If timestamp data is unavailable, feature auto-disables
  • Transient-failure resilient: Temporary network issues don't disable detection
  • Thread-safe: Concurrent tool calls handled correctly

Text Search Cache

Text searches in list_model (mode="text" and mode="any") use an in-memory cache for faster performance. The cache is automatically invalidated when you connect to a different model, refresh metadata, or make changes.

Environment Variables

MCP_ENGINE_TEXT_SEARCH_CACHE_ENABLED

Enable in-memory caching of search snapshots

Default: true

MCP_ENGINE_TEXT_SEARCH_CACHE_TTL_SECONDS

How long cached data remains valid

Default: 30

MCP_ENGINE_TEXT_SEARCH_CACHE_MAX_ENTRIES

Maximum number of cached snapshots

Default: 16

Runtime Preferences

These settings can also be adjusted at runtime via manage_memory:

{
  "operation": "set",
  "scope": "global",
  "preferences": {
    "text_search_cache_enabled": true,
    "text_search_cache_ttl_seconds": 30
  }
}

When to Disable

Consider disabling the cache if:

  • Debugging issues with external model changes not being detected
  • Running in memory-constrained environments with very large models

Expression Formatting

DAX and M expressions can be automatically formatted before saving to the model. Formatting uses external services and requires explicit consent since your code is sent to these services.

DAX Formatting

MCP_ENGINE_DAX_FORMATTING_ENABLED

Enable online DAX formatting

Default: true

MCP_ENGINE_DAX_FORMATTING_ADMIN_DISABLE

Admin override to disable (Enterprise)

Default: false

MCP_ENGINE_DAX_FORMATTING_TIMEOUT_MS

Request timeout in milliseconds

Default: 30,000

MCP_ENGINE_DAX_FORMATTING_LINE_STYLE

Line wrapping style (short, long)

Default: long

MCP_ENGINE_DAX_FORMATTING_SPACING_STYLE

Space after function names

Default: best_practice

MCP_ENGINE_DAX_FORMATTING_LIST_SEPARATOR

Locale list separator

Default: ,

MCP_ENGINE_DAX_FORMATTING_DECIMAL_SEPARATOR

Locale decimal separator

Default: .

M (Power Query) Formatting

MCP_ENGINE_M_FORMATTING_ENABLED

Enable online M formatting

Default: true

MCP_ENGINE_M_FORMATTING_ADMIN_DISABLE

Admin override to disable (Enterprise)

Default: false

MCP_ENGINE_M_FORMATTING_TIMEOUT_MS

Request timeout in milliseconds

Default: 30,000

MCP_ENGINE_M_FORMATTING_LINE_WIDTH

Line width for formatted output

Default: -

MCP_ENGINE_M_FORMATTING_INDENT_LENGTH

Indentation length

Default: -

MCP_ENGINE_M_FORMATTING_INDENT_STYLE

Indentation character (spaces, tabs)

Default: -

Usage in Tools

Add formatting options to write operations. The consent flag is required when formatting is enabled:

// DAX formatting (measures, calc items)
"format_dax": {
  "enabled": true,
  "consent": true
}

// M formatting (partitions, named expressions)
"format_m": {
  "enabled": true,
  "consent": true
}

Supported Operations

  • DAX: Measures, calculation items, calculated partitions
  • M: M partitions, named expressions

Runtime Preferences

Formatting settings can also be adjusted at runtime via manage_memory without restarting. Environment variables take precedence over runtime preferences.

// Set DAX line style to short
{
  "operation": "put",
  "id": "dax_formatting_line_style",
  "value": "short"
}

// European locale (semicolon separator)
{
  "operation": "put",
  "id": "dax_formatting_list_separator",
  "value": ";"
}

Available preferences: dax_formatting_enabled, dax_formatting_line_style, dax_formatting_spacing_style, dax_formatting_list_separator, dax_formatting_decimal_separator, m_formatting_enabled, m_formatting_line_width, m_formatting_indent_length, m_formatting_indent_style

05 — BUILT-IN GUIDES

Docs Library

MCP Engine ships with 20+ built-in markdown guides, available via MCP resources/list and resources/read.

Measure Authoring Guide

docs://measure-authoring-guide

DAX Query Writing Guide

docs://dax-query-guide

DAX Query Plan Reference

docs://dax-query-plan-reference

Calculation Groups Guide

docs://calc-groups-guide

Relationships Guide

docs://relationships-guide

Column & Table Authoring

docs://column-and-table-authoring-guide

Security Roles Guide

docs://security-roles-guide

Partitions & Refresh Guide

docs://partitions-refresh-guide

Query Performance Guide

docs://query-performance-guide

VertiPaq Optimization

docs://vertipaq-optimization-guide

Calendar Configuration

docs://calendar-guide

PII Masking Guide

docs://pii-masking-guide

Policy Guide

docs://policy-guide

Unit Testing Guide

docs://unit-testing-guide

Troubleshooting Guide

docs://troubleshooting-guide

Access guides in your AI assistant: "Read the measure authoring guide" or use resources/read directly.

Ready to explore more?

Check out the full API reference or get help from the community.