PowerBI MCP Server

v0.1.2
io.github.gurvinder-dhillon/powerbi-mcp Checked 2 days ago Published 10 months ago

PowerBI REST API integration.

Starts only with mcp<2 (written for an older SDK); the install commands pin it.

Values you need

VariableWhat it is
POWERBI_TENANT_IDrequired Azure AD Tenant ID for PowerBI authentication
POWERBI_CLIENT_IDrequired Azure AD Application (Client) ID with PowerBI API access
POWERBI_CLIENT_SECRETrequired secret Azure AD Client Secret for service principal authentication

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add powerbi-mcp -e 'POWERBI_CLIENT_ID=<POWERBI_CLIENT_ID>' -e 'POWERBI_CLIENT_SECRET=<POWERBI_CLIENT_SECRET>' -e 'POWERBI_TENANT_ID=<POWERBI_TENANT_ID>' -- uvx --with 'mcp<2' powerbi-mcp==0.1.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "powerbi-mcp": {
      "args": [
        "--with",
        "mcp<2",
        "powerbi-mcp==0.1.2"
      ],
      "command": "uvx",
      "env": {
        "POWERBI_CLIENT_ID": "<POWERBI_CLIENT_ID>",
        "POWERBI_CLIENT_SECRET": "<POWERBI_CLIENT_SECRET>",
        "POWERBI_TENANT_ID": "<POWERBI_TENANT_ID>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "powerbi-mcp": {
      "args": [
        "--with",
        "mcp<2",
        "powerbi-mcp==0.1.2"
      ],
      "command": "uvx",
      "env": {
        "POWERBI_CLIENT_ID": "<POWERBI_CLIENT_ID>",
        "POWERBI_CLIENT_SECRET": "<POWERBI_CLIENT_SECRET>",
        "POWERBI_TENANT_ID": "<POWERBI_TENANT_ID>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "POWERBI_CLIENT_ID",
      "id": "powerbi-client-id",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "POWERBI_CLIENT_SECRET",
      "id": "powerbi-client-secret",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "POWERBI_TENANT_ID",
      "id": "powerbi-tenant-id",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "powerbi-mcp": {
      "args": [
        "--with",
        "mcp<2",
        "powerbi-mcp==0.1.2"
      ],
      "command": "uvx",
      "env": {
        "POWERBI_CLIENT_ID": "${input:powerbi-client-id}",
        "POWERBI_CLIENT_SECRET": "${input:powerbi-client-secret}",
        "POWERBI_TENANT_ID": "${input:powerbi-tenant-id}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.powerbi-mcp]
command = "uvx"
args = ["--with", "mcp<2", "powerbi-mcp==0.1.2"]
env = { "POWERBI_CLIENT_ID" = "<POWERBI_CLIENT_ID>", "POWERBI_CLIENT_SECRET" = "<POWERBI_CLIENT_SECRET>", "POWERBI_TENANT_ID" = "<POWERBI_TENANT_ID>" }

For AI agents

  1. Ask the user for: POWERBI_TENANT_ID, POWERBI_CLIENT_ID, POWERBI_CLIENT_SECRET. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: get_workspaces, get_reports, get_datasets, get_dataset, get_refresh_history, get_parameters, query_dataset.
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json