Logo di MCPBI - Tabular Model MCP 服务器

MCPBI - Tabular Model MCP 服务器

Community
jonaolden

PowerBI MCP server to give LLM clients (Claude, GH Copilot,etc) context from locally running PowerBI Desktop instances.

Pubblicato dajonaolden
Repositorymcpbi
LinguaC#
Fork
7
Stelle
21
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
Link
  • Collega gli strumenti ai flussi di lavoro IA

    MCPBI - Tabular Model MCP 服务器 mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • Strumenti disponibili: 0

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni se il server li fornisce.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse della comunità open source

    Stelle: 21; fork: 7 (repository collegato).

MCPBI - Tabular Model MCP Server

This is a Model Context Protocol (MCP) server for locally running Tabular Models, i.e. PowerBI models running on PowerBI Desktop.

This server allows MCP-enabled LLM clients to communicate with your tabular models and help you debug, analyse and compose DAX queries.

Example: Copilot querying Tabular Model via MCP

roocodedemo

How it works

It connects to a local running instance of Tabular models using the AdomdConnection in ADOMD.NET.

Using this connection, the server then allows clients to execute DAX-queries and retrieve model metadata (using DMV queries) through pre-defined tools for high accuracy, as well as custom DAX queries for debugging and development.

Features

Configuration Options

Port

Specify the Power BI Desktop instance port to connect to (required).

bash
# Example: Connect to Power BI Desktop instance on port 56751
dotnet run -- --port 56751

Obfuscation

Protect sensitive data with configurable encryption strategies:

  • None (default): No obfuscation
  • All: Mask all values
  • Dimensions: Mask only text/date fields (keep numeric data visible)
  • Facts: Mask only numeric fields (keep dimensional context)
bash
# Example: Protect customer/product names while keeping sales figures visible
dotnet run -- --port 56751 --obfuscation-strategy dimensions --encryption-key "YourSecureKey123!"

Output Truncation

Automatic row limiting with comprehensive metadata:

  • Default 500-row limit (configurable)
  • Response includes: totalRows, displayedRows, truncated, hasMore
bash
# Example: Increase row limit for analysis
dotnet run -- --port 56751 --max-rows 2000

Tools

list_objects

  • Lists all objects in the model (tables, columns, measures, relationships)
  • Returns object type, name, and basic metadata

get_object_details

  • Retrieves detailed metadata for a specific object (table, column, measure)
  • Returns properties, data types, relationships, and dependencies

list_functions

  • Lists available DAX functions with optional filtering by category or origin
  • Returns function name, description, interface classification, and origin

get_function_details

  • Retrieves comprehensive details for a specific DAX function including full parameter information
  • Returns function signature, parameter requirements, return type, and DirectQuery compatibility

run_query

  • Executes a custom DAX query against the model
  • Returns query results with metadata (total rows, truncated status)

1. Model Discovery

Use [ListTables], [GetTableColumns], and [GetTableRelationships] to quickly understand an unfamiliar model's structure without manually clicking through Power BI Desktop.

2. DAX Assistance

LLM clients can use [ListMeasures] and [GetMeasureDetails] to learn your existing DAX patterns and suggest consistent new measures that follow your naming conventions and calculation styles.

3. Debugging

Combine [RunQuery] with [ValidateDaxSyntax] to iteratively test and refine DAX expressions with immediate feedback on syntax and results.

validate_query

  • Validates DAX query syntax without execution
  • Returns syntax correctness and error messages if applicable

analyze_query_performance

  • Analyzes DAX query performance and provides optimization suggestions
  • Returns execution time, resource usage, and improvement recommendations

Installation

Setup Instructions

Requirements

  • Power BI Desktop (with a PBIX file open for discovery)
  • Windows OS
  • Visual Studio Code (for MCP server integration)
  • .NET 8.0 Runtime

Setup from Prebuilt Release

  1. Download the release from the Releases directory or GitHub releases page and extract to your preferred location.

  2. Open Power BI Desktop with a PBIX file you want to work with.

  3. Get PowerBI instance information

There are several ways to detect Power BI Desktop instances. The easiest is to open Tabular Editor and check the port in the connection string.

Simply add the port (63717 in example above) to your MCP server configuration in the next step (you can ignore the database ID, as this server connects to the default model).
If you don't have Tabular Editor, you can use the included discovery tool to find the running instance and database.

Open PowerShell, navigate to the release directory, and run:

powershell
cd path\to\release
.\pbi-local-mcp.DiscoverCli.exe

Note: In PowerShell, you must use .\ prefix to run executables from the current directory.

Follow the prompts to:

  • Select the Power BI Desktop instance (identified by port)
  • Choose the database/model to connect to

This creates a .env file with PBI_PORT and PBI_DB_ID in the release directory, which you can reference in your MCP configuration or ignore if you specify the port directly.

  1. Configure MCP server in your editor. For VS Code with Roo, create/edit .roo/mcp.json:
    json
    {
      "mcpServers": {
        "MCPBI": {
          "type": "stdio",
          "command": "path\\to\\release\\mcpbi.exe",
          "cwd": "path\\to\\release",
          "args": ["--port", "YOUR_PBI_PORT"],
          "disabled": false,
          "alwaysAllow": [
            "ListTables",
            "GetTableDetails",
            "GetTableColumns",
            "GetTableRelationships",
            "ListMeasures",
            "GetMeasureDetails",
            "PreviewTableData",
            "RunQuery",
            "ValidateDaxSyntax",
            "AnalyzeQueryPerformance",
            "ListFunctions",
            "GetFunctionDetails"
          ]
        }
      }
    }
    Replace path\\to\\release with your actual release directory path and YOUR_PBI_PORT with the port number from PBI instance.

Setup from Source (For Development)

  1. Clone the repository:

    sh
    git clone <repository-url>
    cd MCPBI
  2. Build the project:

    sh
    dotnet build
  3. Open Power BI Desktop with a PBIX file.

  4. Run discovery to create .env file:

    sh
    dotnet run --project pbi-local-mcp/pbi-local-mcp.csproj discover-pbi

    Follow prompts to select instance and database.

  5. Configure MCP server in .roo/mcp.json:

    json
    {
      "mcpServers": {
        "mcpbi-dev": {
          "type": "stdio",
          "command": "dotnet",
          "cwd": "path\\to\\MCPBI",
          "envFile": "path\\to\\MCPBI\\.env",
          "args": [
            "exec",
            "path\\to\\MCPBI\\pbi-local-mcp\\bin\\Debug\\net8.0\\pbi-local-mcp.dll"
          ],
          "disabled": false,
          "alwaysAllow": [
            "ListTables",
            "GetTableDetails",
            "GetTableColumns",
            "GetTableRelationships",
            "ListMeasures",
            "GetMeasureDetails",
            "PreviewTableData",
            "RunQuery",
            "ValidateDaxSyntax",
            "AnalyzeQueryPerformance",
            "ListFunctions",
            "GetFunctionDetails"
          ]
        }
      }
    }

    Replace path\\to\\MCPBI with your actual repository path.

Configuration Notes

  • Use either port or envFile: You can specify the Power BI port directly in args or use envFile to load from .env.
  • Port argument: The --port argument in the release configuration connects to the specific Power BI Desktop instance on that port
  • envFile: The development setup uses envFile to automatically load PBI_PORT and PBI_DB_ID from .env
  • alwaysAllow: Lists all tools that can be used without requiring user approval for each invocation
  • Working directory: The cwd parameter sets the working directory where the .env file is located

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "jonaolden-mcpbi": {
      "command": "",
      "args": []
    }
  }
}

Usa MCPBI - Tabular Model MCP 服务器 MCP con più modelli AI

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso MCPBI - Tabular Model MCP 服务器, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura connettore.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura connettore e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con l’opzione «Questo dispositivo» selezionata
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi MCPBI - Tabular Model MCP 服务器 come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di MCPBI - Tabular Model MCP 服务器.
  4. Salva l'elenco dei server.
  5. Se vuoi verificare che il connettore sia ancora pronto, aggiorna la pagina.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "jonaolden-mcpbi": {
      "command": "npx",
      "args": [
        "-y",
        "mcpbi"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di MCPBI - Tabular Model MCP 服务器, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di MCPBI - Tabular Model MCP 服务器.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare MCPBI - Tabular Model MCP 服务器 per aiutarmi con questa attività?
MCPBI - Tabular Model MCP 服务器
Certo. L’ho letto.
Ecco cosa ho trovato con MCPBI - Tabular Model MCP 服务器.

Domande frequenti

A cosa serve il server MCP MCPBI - Tabular Model MCP 服务器?

MCPBI - Tabular Model MCP 服务器 è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare il server MCP MCPBI - Tabular Model MCP 服务器 con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare MCPBI - Tabular Model MCP 服务器 con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP MCPBI - Tabular Model MCP 服务器 con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando MCPBI - Tabular Model MCP 服务器, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego il server MCP MCPBI - Tabular Model MCP 服务器 a TypingMind?

MCPBI - Tabular Model MCP 服务器 funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre il server MCP MCPBI - Tabular Model MCP 服务器 in TypingMind?

MCPBI - Tabular Model MCP 服务器 mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare il server MCP MCPBI - Tabular Model MCP 服务器?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se MCPBI - Tabular Model MCP 服务器 richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇