- Tabular Mcp
Tabular Mcp
Uses
Open source alternative to PowerBI Copilot.
Debug and adjust DAX queries and measures using an LLM with full model context.
Quickly understand how a model is set up and identify bottlenecks.

How it works
The server 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 to retrieve model metadata (using DAX INFO functions) through pre-defined and well documented tools for high accuracy, as well as custom DAX queries for debugging and development.
Installation
Requirements
-
Power BI Desktop (with a PBIX file open for discovery)
-
Windows OS
-
Visual Studio Code (for MCP server integration)
-
- Clone the repository and open it in your terminal.
-
- Run InstanceDiscovery to detect Power BI Desktop and populate the
.envfile:
dotnet run --project pbi-local-mcp/pbi-local-mcp.csproj discover-pbiFollow prompts to select the instance and database. This writes
PBI_PORTandPBI_DB_IDto.envin the project root.OR: Manual setup (if you already know your port and db id):
Createpbi-local-mcp/.envwith:PBI_PORT=<your_pbi_instance_port> PBI_DB_ID=<your_pbi_database_id> - Run InstanceDiscovery to detect Power BI Desktop and populate the
-
- Configure MCP server in VS Code:
Add a.vscode/mcp.jsonfile:
{ "servers": { "tabular-mcp": { "type": "stdio", "command": "dotnet", "envFile": "${workspaceFolder}/.env", "args": [ "run", "--project", "${workspaceFolder}/pbi-local-mcp/pbi-local-mcp.csproj" ] } } } - Configure MCP server in VS Code:
This loads the .env file and starts the MCP server for VS Code integration.
Server Config
{
"mcpServers": {
"tabular-mcp": {
"type": "stdio",
"command": "dotnet",
"envFile": "${workspaceFolder}/.env",
"args": [
"run",
"--project",
"${workspaceFolder}/pbi-local-mcp/pbi-local-mcp.csproj"
]
}
}
}