Documentation

Power UI MCP

Use Power UI from inside Claude Code, Cursor, Claude Desktop, and other Model Context Protocol clients.

Overview

The Power UI MCP server lets an AI agent use your Power UI account directly: list and load your saved themes, apply them to a Power BI report you're working on, change colors and typography in plain language, and save the result back to your dashboard. It runs locally on your machine and authenticates with a personal API key.

The MCP exposes 17 tools across two scopes: account assets (list/load/save themes, list and manage palettes, open in studio) and theme styling (foundation, page background and wallpaper, title and effects styling, per-property control, and writing themes into .pbip reports). Anything you can do in the visual studio or the in-app AI assistant is available to your local agent.

Install

You'll need a Power UI Pro account and an API key. Create one at your API keys page. Treat it like a password — Power UI shows the plaintext exactly once at creation.

Note: the server runs locally on your machine, so it works in any MCP client that supports local stdio servers — including the Claude Desktop app. Clients with project access (Claude Code, Cursor) give the smoothest experience because the agent can find your .pbip on its own; in Claude Desktop you'll need to tell inject_theme the absolute path to your report.

Claude Code

Add to your project's .mcp.json (or your user-level ~/.claude.json):

{
  "mcpServers": {
    "powerui": {
      "command": "npx",
      "args": ["-y", "@powerui/mcp@latest"],
      "env": {
        "POWERUI_API_KEY": "pwu_live_..."
      }
    }
  }
}

Cursor

Cursor → Settings → MCP → Add new server. Paste the same configuration.

Claude Desktop

Settings → Developer → Edit Config opens claude_desktop_config.json. Add the same mcpServers entry there.

Restart your client. The MCP tools should appear automatically.

Tools

Account assets

  • list_themes — list themes you can access (personal + org).
  • load_theme — fetch a theme by id and load it as the active session theme.
  • save_theme — save the active theme back to your account. Defaults to updating the loaded theme; pass name to fork or scope: "org" to share with your team.
  • list_palettes — list data-color palettes (personal, org-shared, built-in).
  • create_palette — save a new 8-color data palette to your account.
  • update_palette — rename, re-color, or re-describe a palette you own.
  • open_in_studio — get a deep link to fine-tune the active theme in the visual studio.

Theme styling

  • create_theme — start a new theme with a brand color, mode, neutral palette, font, padding, etc.
  • modify_theme — change foundation properties on the active theme.
  • set_page_background — set the page canvas to a color, catalog image, gradient, or pattern.
  • set_wallpaper — set the outspace/letterbox area to a color, gradient, or pattern.
  • set_title_style — title font, size, weight, color. Globally or per visual type.
  • set_effects_style — background, border, drop shadow.
  • set_visual_property — fine-grained control over any visual property (axes, legends, data labels, gridlines, …).
  • get_visual_controls — discover the available properties and controls for a given visual type. Use this before set_visual_property.
  • inject_theme — write the active theme into a .pbip report's RegisteredResources/ and patch report.json so Power BI Desktop loads it.
  • export_theme — return the active theme as Power BI JSON.

Common workflows

Apply your brand theme to a report

From your IDE, in a folder containing a .pbip Power BI Project:

"Use my Acme theme on this report"

The agent calls list_themes to find Acme, load_theme to pull it into the active session, and inject_theme with your report path to write it into the .pbip. Reopen the report in Power BI Desktop to see the new theme applied.

Fork a saved theme and tweak it

"Load my Acme theme, make titles 18pt bold, save as Acme Dark"

list_themesload_theme(id)set_title_style(font_size: 18, bold: true)save_theme(name: "Acme Dark", fork: true). The new theme appears in your dashboard.

Hand off to the visual studio

"Open this in the studio so I can adjust the colors visually"

open_in_studio returns a deep link to the live theme. You edit visually, save, and the agent can callload_theme again to pick up your changes for further work.

Build a report theme from scratch

"Make a dark theme with #0F62FE as the brand color, warmer neutrals, and rounded corners"

The agent calls create_theme with mode, brand_color, neutral_palette, and radius — Power UI generates a full 25-950 brand palette from the hex automatically. Save with save_theme when you're happy.

Configuration

VariableDefaultPurpose
POWERUI_API_KEYrequiredAPI key minted at /settings/api-keys.
POWERUI_API_URLhttps://www.powerui.comOverride for self-hosted or staging environments. Keep the www. for production — the apex domain redirects and the auth header is dropped on the redirect.

Troubleshooting

The MCP shows as "Failed to connect"

Check that POWERUI_API_KEY is set in your client config and that you've restarted the client after adding it. Run npx -y @powerui/mcp@latest directly in a terminal — if it prints a protocol error or authentication error you'll see it there. If the key is correct, verify it's not revoked at /settings/api-keys.

My styling change doesn't appear in Power BI

Power BI Desktop caches report.json on load. Close and reopen the .pbip after inject_theme for changes to take effect.

A 401 from the MCP

Your API key is missing, malformed, or revoked. Re-paste it from the dashboard. Keys start with pwu_live_and contain no spaces or quotes.

I want to revoke a key

Go to /settings/api-keys, click the trash icon next to the key. Any client using that key will start receiving 401s on its next request. Mint a new key to replace it.

Related