Skip to main content
Glama
Mavline

MCP_powerbi_TS

by Mavline
README.md
# MCP_powerbi_TS

TypeScript MCP (Model Context Protocol) server for Power BI Desktop integration. Connects to a running Power BI Desktop instance through its local Analysis Services (XMLA) endpoint and exposes a set of specialized agents for model work: running DAX queries, inspecting and editing table structure, and managing model relationships.

## Layout

```
src/
  index.ts    entry point
  agents/     13 specialized agents (DAX, tables, relationships, ...)
  server/     MCP server wiring
  services/   XMLA / Power BI connection services
  types/      shared types
  utils/      helpers
tests/        unit and integration tests (synthetic star-schema demo data)
```

## Install & build

```bash
npm install
npm run build   # tsc -> dist/
```

## Use with an MCP client

Power BI Desktop must be running with the target model open (the server discovers the local XMLA port).

```json
{
  "mcpServers": {
    "powerbi": {
      "command": "node",
      "args": ["<path-to-repo>/dist/index.js"]
    }
  }
}
```