Documentation

Power UI MCP

Use Power UI from inside Claude Code, Cursor, and other terminal-based 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 ~13 tools across two scopes: account assets (list/load/save themes, list palettes, open in studio) and theme styling (foundation, 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 Power UI MCP runs in the terminal and writes to your local filesystem (e.g. inject_theme patches a .pbip on disk). That requires a client with project/filesystem access — Claude Code and Cursor work; the Claude Desktop app does not.

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.

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).
  • 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_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"

load_theme("acme")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.

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