Superset MCP Server
An MCP server for Apache Superset that enables AI models to manage dashboards, create charts with auto-detection, and execute SQL queries programmatically. It utilizes stateless HTTP transport to ensure compatibility with integration tools like Open WebUI.
README
š 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
- Buka Admin Panel ā Tools ā Tool Connections
- Tambahkan MCP Server baru:
- Name: Superset MCP
- Type: MCP (Streamable HTTP)
- URL:
http://YOUR_SERVER_IP:3000/mcp
- 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:
- Menganalisis schema dataset
- Mendeteksi kolom waktu (x_axis)
- Mendeteksi kolom numeric untuk metrics
- 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:
create_dashboard- Membuat dashboard barucreate_chart_auto(3x) - Membuat setiap chartadd_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 untuk login |
MCP_PORT |
3000 |
Port untuk MCP server |
š Troubleshooting
1. Authentication Failed
Pastikan credentials di .env sudah benar. Server akan otomatis refresh token jika expired.
2. CORS Error
Server sudah dikonfigurasi untuk menerima requests dari semua origin. Jika masih error, pastikan firewall tidak memblokir port.
3. Chart Tidak Menampilkan Data
Gunakan create_chart_auto daripada create_chart untuk auto-detection metrics dan dimensions.
š License
MIT License
š¤ Contributing
Contributions are welcome! Feel free to open issues atau pull requests.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.