Back to Getting Started

Configuration

Advanced configuration reference for SemanticOps MCP environment variables and runtime behavior.

If you only need installation and first prompts, start with Getting Started.

04 — CONFIGURATION

Environment Variables

Configure SemanticOps MCP behavior through environment variables. Click to expand each section.

MCP_ENGINE_LICENSE

Reserved for offline formats (disabled in this release)

Default: -

MCP_ENGINE_LICENSE_FILE

Path to activated lease file (JSON)

Default: ~/.mcp-engine/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 redaction in outputs (Pro)

Default: false

MCP_ENGINE_NUMERIC_MASKING

Enable numeric masking in outputs (Pro)

Default: false

Activate SemanticOps MCP directly from chat using the built-in license manager tool.

Pro & Teams Activation

Free tier works out of the box. Pro license activation is performed interactively via chat.

Activate from Chat

Ask your MCP client to run manage_license → activate, then follow the prompt to provide your key.

Connect to SemanticOps MCP and activate my license (use manage_license → activate)
Check my license tier (manage_license → status)
See License Manager documentation →

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}}'

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 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.

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_preferences:

{
  "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

The Impact Analyzer caches a per-model dependency corpus (expression index) to keep repeated lookups fast, especially during depth traversal. The cache is automatically invalidated when you connect to a different model or refresh metadata.

MCP_ENGINE_DEPENDENCY_CORPUS_CACHE_ENABLED

Enable caching of dependency corpus

Default: true

MCP_ENGINE_DEPENDENCY_CORPUS_CACHE_TTL_SECONDS

How long cached data remains valid

Default: 30

MCP_ENGINE_DEPENDENCY_CORPUS_CACHE_MAX_ENTRIES

Maximum number of cached corpora

Default: 8

DAX and M expressions can be automatically formatted before saving to the model. Formatting runs locally with the built-in DAX and Power Query parsers; no code leaves your machine.

Usage in Tools

Add formatting options to write operations:

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

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

Supported Operations

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

Runtime Preferences

Formatting is configured at runtime via manage_preferences or per-operation format_dax / format_m fields. The former formatting environment variables are retired and fail startup with migration guidance.

// Prefer multiline DAX function calls
{
  "operation": "put",
  "id": "dax_formatting_function_call_layout",
  "value": "prefer_multiline"
}

// Indent M with 4 spaces
{
  "operation": "put",
  "id": "m_formatting_indent_size",
  "value": 4
}

Ask your assistant to list the available dax_formatting_* and m_formatting_* settings with their current values.