convez.ai
MCP ServerDados & AnalyticsAvançado
yujiyamane

Superset × Claude MCP — Dashboard Saúde Automatizado

yujiyamane/superset-claude-health

Dashboards de BI gerados por IA a partir de linguagem natural

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP server que integra Apache Superset com Claude para automação completa de dashboards de analytics em saúde. Gera datasets, cria 12+ tipos de gráficos, configura segurança por linha (RLS) e exporta tudo como código — tudo via linguagem natural, sem clicar na UI.

Instalação

$npx convez-ai yujiyamane/superset-claude-health

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 4 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Automação de dashboards hospitalares e emergência sem código
  • Configuração programática de segurança por perfil (Admin, Gerente, Enfermeiro)
  • Prototipagem rápida de análises de dados de saúde com Superset
  • Versionamento de dashboards como código (JSON + Git)

Veredito

Solução robusta e bem-documentada para automação de BI em contexto healthcare. Combina Superset + Claude MCP de forma pragmática, com arquitetura clara (PostgreSQL → Superset → MCP) e implementação real de RLS. Recomendado para equipes que precisam gerar dashboards complexos rapidamente mantendo segurança de dados.

README

A tradução para o português deste README ainda está na fila.

Superset × Claude MCP — Healthcare ED Dashboard

An AI-automated BI dashboard: Apache Superset + Claude MCP builds charts, configures RLS, and deploys — all from natural language.

Superset Claude MCP Docker PostgreSQL


What This Is

A complete Healthcare Emergency Department dashboard built entirely through AI automation. No manual chart creation, no clicking through UI wizards — Claude Code talks to Superset via MCP to:

  1. Create datasets from PostgreSQL tables
  2. Build 12+ charts (bar, line, heatmap, gauge, pie)
  3. Assemble dashboard layouts with filters and cross-links
  4. Configure Row-Level Security so each user sees only their authorised data
  5. Export everything as code (JSON + Git versioned)

Architecture

┌─────────────────────┐
│   PostgreSQL 16     │  200K+ synthetic ED records
│   (healthcare_db)   │  Star schema: fact_ed_visits + 4 dims
└────────┬────────────┘
         │ SQLAlchemy
┌────────▼────────────┐
│   Apache Superset   │  Dashboard engine
│   (Docker Compose)  │  Native RLS, RBAC, 60+ chart types
└────────┬────────────┘
         │ MCP Server (built-in, Superset 5.0+)
┌────────▼────────────┐
│   Claude Code /     │  Natural language → API calls
│   Claude Desktop    │  "Create a bar chart of wait times
└─────────────────────┘   by triage category from ed_visits"

Dashboard Pages

ED Performance Overview

KPI cards (presentations, ALOS, 4-hour rule %), monthly trend lines, LHD comparison bars.

Triage & Wait Times

Wait time distributions by triage category, hourly presentation heatmaps, breach rate gauges.

Capacity & Flow

Bed occupancy by ward type, patient flow Sankey diagrams, time-to-admission tracking.

Preview

Dashboard Overview — Top

Dashboard Overview — Bottom

Row-Level Security

Three roles with automatic data filtering:

RoleSeesFilter
AdminAll LHDs, all wardsNo filter
LHD ManagerTheir LHD onlylhd_name = {{current_user.lhd}}
Ward NurseTheir ward onlyward_id = {{current_user.ward}}

RLS rules are configured programmatically via Superset's REST API (8 endpoints), not through the UI.

RLS in Action

RLS Demo

Admin sees all data → LHD Manager sees Sydney only → Ward Nurse sees their ward only

Colour Palette

RoleHEXUsage
Primary#002664Main KPIs, chart series 1
Secondary#146cfdChart series 2, emphasis
Teal#2e808eChart series 3, categories
Baby Blue#8ce0ffChart series 4, backgrounds
Soft Pink#ffb8c1Accent, light warnings
Alert#630019Threshold breaches
Neutral#d1eeeaGridlines, backgrounds

Quick Start

git clone https://github.com/yujiyamane/superset-claude-health.git
cd superset-claude-health

# Start Superset + PostgreSQL
docker compose up -d

# Load healthcare data
python scripts/load_data.py

# Connect Claude Desktop via MCP (see docs/mcp_setup.md)
# Then ask Claude: "Create the ED Performance dashboard"

Repository Structure

├── README.md
├── docker-compose.yml          # Superset + PostgreSQL + MCP server
├── superset/
│   ├── superset_config.py      # Superset configuration + MCP + RLS
│   ├── dashboards/             # Exported dashboard JSON (Git-versioned)
│   └── datasets/               # Dataset definitions
├── data/
│   ├── generate_data.py        # Synthetic ED data generator (same as Case 2)
│   └── schema.sql              # PostgreSQL schema (star schema)
├── scripts/
│   ├── load_data.py            # Data loader: CSV → PostgreSQL
│   ├── setup_rls.py            # Programmatic RLS configuration via API
│   ├── setup_roles.py          # RBAC role creation via API
│   └── apply_theme.py          # Colour palette application via API
├── tests/
│   ├── test_data_integrity.py  # Data quality checks
│   ├── test_api_endpoints.py   # Superset API availability
│   ├── test_rls_rules.py       # RLS filtering validation
│   ├── test_colour_theme.py    # Palette consistency
│   └── test_dashboard_export.py # Dashboard-as-Code validation
├── docs/
│   ├── architecture.md         # System architecture
│   ├── mcp_setup.md            # Claude MCP connection guide
│   ├── rls_guide.md            # RLS implementation details
│   └── before_after.md         # Manual vs AI-automated comparison
└── screenshots/
    ├── overview_top.png
    ├── overview_bottom.png
    └── rls_demo.gif

Key Metrics

WhatManual BI BuildAI-Automated (This Project)
Dashboard creation2-3 days~30 minutes
RLS configuration2-4 hours~5 minutes (scripted)
Theme customisation1-2 hours~2 minutes (API)
ReproducibilityManual screenshotsdocker compose up + Git

Tech Stack

LayerTool
Data StorePostgreSQL 16
BI PlatformApache Superset 5.0+
AI IntegrationClaude MCP (Model Context Protocol)
Data GenerationPython (pandas, numpy, Faker)
OrchestrationDocker Compose
Version ControlGit + GitHub
Testingpytest

Dashboard 2: Meeting Room Utilisation

Analysis of meeting room booking patterns across 8 floor levels and 50+ rooms.

Key Metrics

  • 50,000+ bookings analysed (2024–2026)
  • ~52 minute average booking duration
  • 13 rooms most active per day on average
  • Peak hours: 9–11 AM and 1–2 PM

Meeting Dashboard

Charts

  • 4 KPI cards (Total Bookings, Hours Booked, Avg Duration, Utilisation Rate)
  • 3 Donut charts (Floor Level, Time of Day, Day of Week distributions)
  • Heatmap (Peak booking times by hour × day)
  • 3 Bar charts (Floor level, Room name, Utilisation Rate comparisons)
  • Combo chart (Bookings vs Avg Duration by Day of Week)
  • Time series area (Daily booking volume 2024–2026)
  • 6 Native filters (Day, Hour, Organizer, Subject, Room, Floor Level)

Data Generation

python data/generate_meeting_data.py
python scripts/load_meeting_data.py
python scripts/create_meeting_charts.py
python scripts/create_meeting_dashboard.py

Related Projects

CaseFocusRepo
Case 1Power BI × Healthcare KPIpowerbi-claude-health
Case 2Streamlit × ED Performancestreamlit-claude-health
Case 3Life OS × Personal Analyticslifeos-claude-dashboard
Case 4Superset × Claude MCP × RLSThis repo

Author

Yuji Yamane — BI Developer @ NSW Health | AI-augmented analytics

Ver o original no GitHub

Bom para

Relacionados