Skip to content
Back to skills

Metabase Connector

ASecurity

A skill to interact with the Metabase API, allowing you to fetch dashboard details, query questions (cards), and run raw SQL queries directly from the chat.

  • 33 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 23, 2026
ai-agentsgobashsqlnodeapidatabase

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 23, 2026

npx -y skills add BrianArfi/ai-second-brain --skill metabase-connector --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Metabase Connector?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Metabase Connector
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/brianarfi-metabase-connector/badge)](https://www.skillsdirectory.com/skills/brianarfi-metabase-connector)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Metabase Connector
description: A skill to interact with the Metabase API, allowing you to fetch dashboard details, query questions (cards), and run raw SQL queries directly from the chat.
---

# Metabase Connector Skill

This skill allows the agent to interact with a Metabase instance using either Email/Password credentials or a Google OAuth Session Token.

## Capabilities

1. **Verify Connection**: Test authentication status against Metabase.
2. **Explore Dashboard**: Fetch all questions/cards on a dashboard, listing their IDs, dashcard IDs, and parameter options.
3. **Query Card (Question)**: Run a query for a specific card with parameters.
4. **Query Dashcard**: Run a query for a specific card on a dashboard layout using active dashboard filters.
5. **List Databases**: Get a list of database connections configured in Metabase.
6. **Execute Direct SQL**: Execute native SQL queries directly on a connected database via Metabase.

## Prerequisites

- **Configuration**: Set up the following environment variables in your `.env` file:
  ```env
  METABASE_BASE_URL=https://metabase.yourcompany.me
  
  # Option A: Email/Password login
  METABASE_USERNAME=yourteammate@yourcompany.com
  METABASE_PASSWORD=your-password
  
  # Option B: Direct Session Token (Mandatory for Google OAuth users)
  METABASE_SESSION_TOKEN=your-session-cookie-value
  ```
- **Session Token Extraction**: If using Google OAuth, log into Metabase in your browser, open DevTools (`F12`), go to **Application > Cookies**, copy the value of `metabase.SESSION`, and paste it as `METABASE_SESSION_TOKEN` in `.env`.

## Usage

The skill runs using Node.js. It does not require any external npm dependencies (contains a self-loading `.env` file parser).

### Verify Connection
```bash
node .agent/skills/metabase-connector/scripts/metabase.js login
```

### Fetch Dashboard Cards
```bash
node .agent/skills/metabase-connector/scripts/metabase.js dashboard 27
```

### Query Card in Dashboard Context with Filter
Format: `node .agent/skills/metabase-connector/scripts/metabase.js query-dashcard <dash_id> <dashcard_id> <card_id> "<parameter_id>=<value>"`
```bash
node .agent/skills/metabase-connector/scripts/metabase.js query-dashcard 27 476 366 "d9a6252e=Last 30 Days"
```

### Run Custom SQL Query
Format: `node .agent/skills/metabase-connector/scripts/metabase.js sql <db_id> "<query>"`
```bash
node .agent/skills/metabase-connector/scripts/metabase.js sql 2 "SELECT * FROM my_table LIMIT 10"
```

Files in this skill

  • SKILL.md2.4 KB
  • scripts/metabase.js12.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.