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.
- Download MCP Engine from mcpengine.dev/download
- Double-click the .mcpb package to install
- Restart Claude Desktop
- Start chatting with your Power BI models
Claude Code CLI
For developers who prefer the command line.
- Ensure Claude Code is installed
- Run the install command below
- The MCP server will be added to your configuration
VS Code + Copilot
Use MCP Engine with GitHub Copilot in VS Code.
- Create a .vscode/mcp.json file in your workspace
- Add the MCP Engine configuration (see below)
- 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.
- Download the appropriate binary for your platform
- Add the server to your client's MCP configuration
- 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
| Variable | Description | Default |
|---|---|---|
| MCP_ENGINE_LICENSE | Direct license key | - |
| MCP_ENGINE_LICENSE_FILE | Path to license file | ~/.powerbi-mcp/license.key |
| MCP_ENGINE_MAX_QUERY_ROWS | Max rows returned by DAX queries | 1,000 |
| MCP_ENGINE_MODE | Set to enable read-only mode | - |
| MCP_ENGINE_NO_AUTOSELECT | Disable auto-selection of single instance | false |
| MCP_ENGINE_MAX_PREVIEW_ROWS | Max rows for preview operations | 1,000 |
| MCP_ENGINE_PII_MASKING | Enable PII & numeric masking in outputs (Pro) | false |
MCP_ENGINE_LICENSEDirect license key
Default: -
MCP_ENGINE_LICENSE_FILEPath to license file
Default: ~/.powerbi-mcp/license.key
MCP_ENGINE_MAX_QUERY_ROWSMax rows returned by DAX queries
Default: 1,000
MCP_ENGINE_MODESet to enable read-only mode
Default: -
MCP_ENGINE_NO_AUTOSELECTDisable auto-selection of single instance
Default: false
MCP_ENGINE_MAX_PREVIEW_ROWSMax rows for preview operations
Default: 1,000
MCP_ENGINE_PII_MASKINGEnable 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.
| Variable | Description | Default |
|---|---|---|
| MCP_ENGINE_PAGINATION_DEFAULT_LIMIT | Default items per page for all tools | 50 |
| MCP_ENGINE_PAGINATION_MAX_LIMIT | Maximum allowed items per page | 1,000 |
| MCP_ENGINE_SEARCH_GROUPED_LIMIT_PER_TYPE | Default items per bucket in grouped search | 25 |
| MCP_ENGINE_PAGINATION_TOOLS_JSON | JSON object for per-tool overrides | - |
MCP_ENGINE_PAGINATION_DEFAULT_LIMITDefault items per page for all tools
Default: 50
MCP_ENGINE_PAGINATION_MAX_LIMITMaximum allowed items per page
Default: 1,000
MCP_ENGINE_SEARCH_GROUPED_LIMIT_PER_TYPEDefault items per bucket in grouped search
Default: 25
MCP_ENGINE_PAGINATION_TOOLS_JSONJSON 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
| Tool | Default Limit | Max Limit | Notes |
|---|---|---|---|
| All tools | 50 | 1,000 | Global default |
| list_model | 100 | 1,000 | More exploratory by default |
| manage_audit | 100 | 10,000 | Audit entries are small; large exports common |
All toolsGlobal default
list_modelMore exploratory by default
manage_auditAudit 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
| Mode | Description |
|---|---|
| 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 |
Prompt (default)Shows elicitation prompt asking user to reload
Auto-reloadAutomatically refreshes metadata without prompting
Fail-closed (default)Blocks operation if user declines reload
Fail-openProceeds with stale metadata after one-time acknowledgment
Environment Variables
| Variable | Description | Default |
|---|---|---|
| MCP_ENGINE_EXTERNAL_CHANGE_DETECTION | Enable/disable feature | true |
| MCP_ENGINE_EXTERNAL_CHANGE_POLL_MIN_INTERVAL_MS | Throttle between polls (ms) | 500 |
| MCP_ENGINE_EXTERNAL_CHANGE_PROMPT | Show elicitation prompts | true |
| MCP_ENGINE_EXTERNAL_CHANGE_AUTO_RELOAD | Auto-reload without prompt | false |
| MCP_ENGINE_EXTERNAL_CHANGE_FAIL_CLOSED | Block on stale model | true |
MCP_ENGINE_EXTERNAL_CHANGE_DETECTIONEnable/disable feature
Default: true
MCP_ENGINE_EXTERNAL_CHANGE_POLL_MIN_INTERVAL_MSThrottle between polls (ms)
Default: 500
MCP_ENGINE_EXTERNAL_CHANGE_PROMPTShow elicitation prompts
Default: true
MCP_ENGINE_EXTERNAL_CHANGE_AUTO_RELOADAuto-reload without prompt
Default: false
MCP_ENGINE_EXTERNAL_CHANGE_FAIL_CLOSEDBlock 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
| Variable | Description | Default |
|---|---|---|
| MCP_ENGINE_TEXT_SEARCH_CACHE_ENABLED | Enable in-memory caching of search snapshots | true |
| MCP_ENGINE_TEXT_SEARCH_CACHE_TTL_SECONDS | How long cached data remains valid | 30 |
| MCP_ENGINE_TEXT_SEARCH_CACHE_MAX_ENTRIES | Maximum number of cached snapshots | 16 |
MCP_ENGINE_TEXT_SEARCH_CACHE_ENABLEDEnable in-memory caching of search snapshots
Default: true
MCP_ENGINE_TEXT_SEARCH_CACHE_TTL_SECONDSHow long cached data remains valid
Default: 30
MCP_ENGINE_TEXT_SEARCH_CACHE_MAX_ENTRIESMaximum 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
| Variable | Description | Default |
|---|---|---|
| MCP_ENGINE_DAX_FORMATTING_ENABLED | Enable online DAX formatting | true |
| MCP_ENGINE_DAX_FORMATTING_ADMIN_DISABLE | Admin override to disable (Enterprise) | false |
| MCP_ENGINE_DAX_FORMATTING_TIMEOUT_MS | Request timeout in milliseconds | 30,000 |
| MCP_ENGINE_DAX_FORMATTING_LINE_STYLE | Line wrapping style (short, long) | long |
| MCP_ENGINE_DAX_FORMATTING_SPACING_STYLE | Space after function names (best_practice, no_space) | best_practice |
| MCP_ENGINE_DAX_FORMATTING_LIST_SEPARATOR | Locale list separator | , |
| MCP_ENGINE_DAX_FORMATTING_DECIMAL_SEPARATOR | Locale decimal separator | . |
MCP_ENGINE_DAX_FORMATTING_ENABLEDEnable online DAX formatting
Default: true
MCP_ENGINE_DAX_FORMATTING_ADMIN_DISABLEAdmin override to disable (Enterprise)
Default: false
MCP_ENGINE_DAX_FORMATTING_TIMEOUT_MSRequest timeout in milliseconds
Default: 30,000
MCP_ENGINE_DAX_FORMATTING_LINE_STYLELine wrapping style (short, long)
Default: long
MCP_ENGINE_DAX_FORMATTING_SPACING_STYLESpace after function names
Default: best_practice
MCP_ENGINE_DAX_FORMATTING_LIST_SEPARATORLocale list separator
Default: ,
MCP_ENGINE_DAX_FORMATTING_DECIMAL_SEPARATORLocale decimal separator
Default: .
M (Power Query) Formatting
| Variable | Description | Default |
|---|---|---|
| MCP_ENGINE_M_FORMATTING_ENABLED | Enable online M formatting | true |
| MCP_ENGINE_M_FORMATTING_ADMIN_DISABLE | Admin override to disable (Enterprise) | false |
| MCP_ENGINE_M_FORMATTING_TIMEOUT_MS | Request timeout in milliseconds | 30,000 |
| MCP_ENGINE_M_FORMATTING_LINE_WIDTH | Line width for formatted output | - |
| MCP_ENGINE_M_FORMATTING_INDENT_LENGTH | Indentation length | - |
| MCP_ENGINE_M_FORMATTING_INDENT_STYLE | Indentation character (spaces, tabs) | - |
MCP_ENGINE_M_FORMATTING_ENABLEDEnable online M formatting
Default: true
MCP_ENGINE_M_FORMATTING_ADMIN_DISABLEAdmin override to disable (Enterprise)
Default: false
MCP_ENGINE_M_FORMATTING_TIMEOUT_MSRequest timeout in milliseconds
Default: 30,000
MCP_ENGINE_M_FORMATTING_LINE_WIDTHLine width for formatted output
Default: -
MCP_ENGINE_M_FORMATTING_INDENT_LENGTHIndentation length
Default: -
MCP_ENGINE_M_FORMATTING_INDENT_STYLEIndentation 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-guideDAX Query Writing Guide
docs://dax-query-guideDAX Query Plan Reference
docs://dax-query-plan-referenceCalculation Groups Guide
docs://calc-groups-guideRelationships Guide
docs://relationships-guideColumn & Table Authoring
docs://column-and-table-authoring-guideSecurity Roles Guide
docs://security-roles-guidePartitions & Refresh Guide
docs://partitions-refresh-guideQuery Performance Guide
docs://query-performance-guideVertiPaq Optimization
docs://vertipaq-optimization-guideCalendar Configuration
docs://calendar-guidePII Masking Guide
docs://pii-masking-guidePolicy Guide
docs://policy-guideUnit Testing Guide
docs://unit-testing-guideTroubleshooting Guide
docs://troubleshooting-guideAccess 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.