playwright-mcp-metabase

Automates Metabase UI interactions through Playwright MCP browser tools.

49.0k|6.8k|Updated Feb 2, 2015
One-click install
npx skills add https://github.com/metabase/metabase --skill playwright-mcp-metabase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-mcp-metabase
Source: https://github.com/metabase/metabase/tree/main/.claude/skills/playwright-mcp-metabase
Command: npx skills add https://github.com/metabase/metabase --skill playwright-mcp-metabase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Driving Metabase's Mantine-based UI through browser automation is error-prone: dropdown menus race with clicks, Select components reject native option APIs, and Escape inside a popover can wipe an entire modal form. This Skill encodes the correct interaction patterns so automated sessions succeed reliably.

Core Features & Use Cases

  • Snapshot-Act-Check workflow: Uses Playwright MCP browser tools with inline response snapshots to minimize redundant page reads and stale element refs.
  • Mantine component handling: Covers hover-before-click for Menu triggers, click-based Select/MultiSelect interaction, portal scoping pitfalls, and the Escape-closes-modal trap.
  • Metabase login flows: Supports both form-based login at the local Jetty port and a faster API session-token cookie method via mage commands.
  • Use Case: An AI agent needs to create a dashboard in a local Metabase dev instance; it follows the login flow, hovers before clicking the "+ New" menu, and fills the modal without accidentally closing it with Escape.

Quick Start

Ask the agent to log into the local Metabase instance and navigate to create a new question using the Playwright browser tools.

Frequently Asked Questions about playwright-mcp-metabase

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Metabase UI interactions with Playwright MCP?

Use the snapshot-act-check pattern: call browser_snapshot to get element refs, act with browser_click or browser_fill, then read the inline response snapshot. Only take a separate snapshot when the inline response looks stale or you need fresh refs.

How do I click dropdown menu buttons in a Mantine UI?

Hover before clicking buttons that open Mantine Menu dropdowns, such as "+ New" or "..." action menus, because direct clicks hit a race condition. Call browser_hover first, then browser_click, and use the refs from the inline response.

Why does browser_select_option not work on Metabase dropdowns?

Metabase uses Mantine Select and MultiSelect components, which are not native HTML select elements, so browser_select_option fails. Instead, click the input to open the dropdown, then click the desired option using refs from the response snapshot.

Why does pressing Escape close the whole modal in Metabase?

When focus is inside a Mantine popover or Select nested in a modal, Escape closes the entire modal and discards filled form fields. To dismiss only the dropdown, click outside it or on another field instead of pressing Escape.

How do I log into a local Metabase instance programmatically?

Navigate to the login page on the local Jetty port, fill email and password, click sign-in, then explicitly navigate to the home page. Alternatively, POST to /api/session via the mage bot-api-call command and set the returned token as the metabase.SESSION cookie.

What should I do when Playwright clicks don't register in Metabase?

First take a fresh snapshot to handle async rendering, then retry with hover plus click for menu triggers, then try keyboard focus and Enter. After three failed attempts, report the issue and move on.