MCP server/database

Superset MCP Server

An MCP server for Apache Superset to manage dashboards and execute SQL queries.

okybaguslukmana/superset-mcp ↗by okybaguslukmanaupdated
Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

Prepare the server locally

Run this once before adding it to Claude Code.

git clone <repository-url>
cd superset-mcp
npm install
npm run build
2

Register it in Claude Code

claude mcp add -e "SUPERSET_URL=${SUPERSET_URL}" -e "SUPERSET_USERNAME=${SUPERSET_USERNAME}" -e "SUPERSET_PASSWORD=${SUPERSET_PASSWORD}" superset-mcp -- node /path/to/superset-mcp/dist/index.js

Replace any placeholder paths in the command with the real path on your machine.

Required:SUPERSET_URLSUPERSET_USERNAMESUPERSET_PASSWORD+ 1 optional
3

Make your agent remember this setup

superset-mcp's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Dashboard management including listing, retrieving, and creating dashboards.
  • Chart management with auto-detection schema capabilities.
  • Dataset management to list datasets and inspect column schemas.
  • Direct SQL execution against connected databases.
  • Stateless HTTP transport for compatibility with tools like Open WebUI.

Tools 14

list_dashboardsGet all available dashboards.
get_dashboardGet detail of a dashboard including its charts.
create_dashboardCreate a new dashboard.
add_chart_to_dashboardAdd a single chart to a dashboard.
add_charts_to_dashboardAdd multiple charts to a dashboard.
list_chartsGet all available charts.
get_chartGet detail configuration of a chart.
get_chart_dataFetch data from a chart.
create_chartCreate a new chart with manual configuration.
create_chart_autoCreate a chart with auto-detection schema.
list_datasetsGet all datasets or tables.
get_dataset_schemaGet column definitions of a dataset.
list_databasesGet all database connections.
execute_sqlExecute a SQL query against a database.

Environment Variables

SUPERSET_URLrequiredURL of the Superset instance
SUPERSET_USERNAMErequiredUsername for Superset authentication
SUPERSET_PASSWORDrequiredPassword for Superset authentication
MCP_PORTPort for the MCP server

Try it

Create a bar chart for the sales_data dataset showing total revenue per month.
Create a new dashboard named 'Sales Overview' and add a line chart for revenue and a pie chart by category.
List all available datasets and get the schema for the 'customer_transactions' table.
Execute a SQL query to find the top 10 products by sales volume from the database.
Original README from okybaguslukmana/superset-mcp

🚀 Superset MCP Server (Streamable HTTP)

MCP (Model Context Protocol) Server untuk Apache Superset yang memungkinkan integrasi chatbot dengan Superset untuk membuat dashboard, chart, dan mengeksekusi query SQL secara programatis.

✨ Fitur

  • 📊 Dashboard Management - List, get, create dashboard dan tambahkan chart ke dashboard
  • 📈 Chart Management - List, get, create chart dengan auto-detection schema
  • 🗃️ Dataset Management - List datasets dan get schema kolom
  • 🔍 SQL Execution - Eksekusi query SQL langsung ke database Superset
  • 🔄 Stateless HTTP - Menggunakan Streamable HTTP transport untuk kompatibilitas dengan Open WebUI
  • 🔐 Auto Authentication - Otomatis login dan refresh token ke Superset

🛠️ Teknologi

  • Runtime: Node.js + TypeScript
  • Transport: Express.js + JSON-RPC 2.0
  • Protocol: MCP (Model Context Protocol)
  • Client: Axios untuk HTTP requests

📋 Prasyarat

  • Node.js v18 atau lebih baru
  • Apache Superset yang sudah running
  • NPM atau Yarn

⚡ Quick Start

1. Clone & Install Dependencies

git clone <repository-url>
cd superset-mcp
npm install

2. Konfigurasi Environment

Salin file .env.example ke .env dan sesuaikan konfigurasinya:

cp .env.example .env

Isi konfigurasi di file .env:

# Superset Configuration
SUPERSET_URL=http://localhost:8088
SUPERSET_USERNAME=admin
SUPERSET_PASSWORD=admin

# MCP Server Configuration
MCP_PORT=3000

3. Build & Run

# Build TypeScript
npm run build

# Jalankan server
npm start

Atau untuk development dengan hot-reload:

npm run dev

4. Verifikasi Server

Akses health check endpoint:

curl http://localhost:3000/health

Response yang diharapkan:

{
  "status": "ok",
  "server": "superset-mcp",
  "version": "1.0.0",
  "mode": "stateless",
  "tools": ["list_dashboards", "get_dashboard", "create_dashboard", ...]
}

🔌 Integrasi dengan Open WebUI

Konfigurasi di Open WebUI

  1. Buka Admin PanelToolsTool Connections
  2. Tambahkan MCP Server baru:
    • Name: Superset MCP
    • Type: MCP (Streamable HTTP)
    • URL: http://YOUR_SERVER_IP:3000/mcp
  3. Save dan test koneksi

🔧 Available Tools

Dashboard Tools

Tool Deskripsi
list_dashboards Mendapatkan semua dashboard yang tersedia
get_dashboard Detail dashboard termasuk chart-chart di dalamnya
create_dashboard Membuat dashboard baru
add_chart_to_dashboard Menambahkan satu chart ke dashboard
add_charts_to_dashboard Menambahkan multiple charts ke dashboard (recommended)

Chart Tools

Tool Deskripsi
list_charts Mendapatkan semua chart yang tersedia
get_chart Detail konfigurasi chart
get_chart_data Fetch data dari chart
create_chart Membuat chart baru (manual config)
create_chart_auto Membuat chart dengan auto-detection schema

Dataset Tools

Tool Deskripsi
list_datasets Mendapatkan semua datasets/tables
get_dataset_schema Mendapatkan definisi kolom dari dataset

SQL Tools

Tool Deskripsi
list_databases Mendapatkan semua koneksi database
execute_sql Eksekusi query SQL ke database

📚 Contoh Penggunaan

Membuat Chart dengan Auto-Detection

"Buatkan bar chart untuk dataset sales_data yang menampilkan total revenue per bulan"

AI akan menggunakan create_chart_auto untuk:

  1. Menganalisis schema dataset
  2. Mendeteksi kolom waktu (x_axis)
  3. Mendeteksi kolom numeric untuk metrics
  4. Membuat chart dengan konfigurasi optimal

Membuat Dashboard dengan Multiple Charts

"Buatkan dashboard Sales Overview dengan 3 chart: line chart revenue, pie chart by category, dan table top products"

AI akan:

  1. create_dashboard - Membuat dashboard baru
  2. create_chart_auto (3x) - Membuat setiap chart
  3. add_charts_to_dashboard - Menambahkan semua chart sekaligus dengan layout optimal

🏗️ Struktur Project

superset-mcp/
├── src/
│   ├── index.ts          # Entry point
│   ├── server.ts         # Express server & MCP tools
│   └── superset-client.ts # Superset API client
├── dist/                  # Compiled JavaScript
├── .env                   # Environment variables
├── .env.example           # Example environment
├── package.json
├── tsconfig.json
└── README.md

🔗 API Endpoints

Endpoint Method Deskripsi
/health GET Health check
/mcp POST MCP JSON-RPC requests
/mcp GET SSE streaming (keepalive)
/mcp DELETE Session cleanup

⚙️ Environment Variables

Variable Default Deskripsi
SUPERSET_URL http://localhost:8088 URL Superset instance
SUPERSET_USERNAME admin Username untuk login
SUPERSET_PASSWORD admin Password unt

Frequently Asked Questions

What are the key features of Superset MCP Server?

Dashboard management including listing, retrieving, and creating dashboards.. Chart management with auto-detection schema capabilities.. Dataset management to list datasets and inspect column schemas.. Direct SQL execution against connected databases.. Stateless HTTP transport for compatibility with tools like Open WebUI..

What can I use Superset MCP Server for?

Automating the creation of BI reports and dashboards via natural language prompts.. Enabling AI agents to perform ad-hoc data analysis by querying Superset databases directly.. Streamlining the workflow for data analysts by programmatically generating charts from datasets.. Integrating Superset dashboard management into custom AI-powered data platforms..

How do I install Superset MCP Server?

Install Superset MCP Server by running: git clone <repository-url> && cd superset-mcp && npm install && npm run build

What MCP clients work with Superset MCP Server?

Superset MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep Superset MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest