MCP Superset

io.github.bintocher由 GitHub 帳號 bintocher 發布v0.2.3更新於 Oct 24, 2026

Apache Superset MCP server — 135+ tools for dashboards, charts, datasets, SQL Lab, and security

概覽

AI 產生的概覽

本機 MCP 伺服器,為 AI 助理提供 137 個工具來管理 Apache Superset 執行個體,涵蓋儀表板、圖表、資料集、SQL Lab、使用者、角色與列級安全。

可以做什麼
列出、建立、更新、複製、發布、匯出與匯入儀表板,包含原生篩選器與嵌入模式設定;管理圖表及其資料與快取預熱;註冊資料庫與資料集,測試連線,檢視 schema 與資料表,重新整理或複製資料集並以 ZIP 匯出匯入;執行唯讀 SQL Lab 查詢、取得結果、估算成本、匯出 CSV 並管理已儲存查詢;管理使用者、角色、權限、群組與列級安全,包含批次角色變更、儀表板存取授權/撤銷與權限稽核矩陣;管理標籤、排程報告、註解、稽核日誌以及整個執行個體的資產匯出匯入。
適用情境
適合管理或基於 Apache Superset 工作的情境:希望助理檢視與修改儀表板、資料集與 SQL Lab 查詢,或處理使用者、角色與列級安全管理,而不必在 Superset 介面中逐項操作。
執行需求
以 Python 套件形式在本機執行(pip 或 uvx,支援 stdio 或 HTTP/SSE)。需要可存取的 Superset 執行個體,以及 SUPERSET_BASE_URL、SUPERSET_USERNAME 與 SUPERSET_PASSWORD 變數;完整 API 存取需要 Superset 管理員使用者。受 SSO 保護的執行個體可改用瀏覽器工作階段 cookie。已在 Superset 6.0.1 上測試。
安裝前請注意
這些憑證賦予對 Superset 的廣泛控制權:README 要求使用管理員使用者,而工作階段 cookie 方式會在工作階段有效期內授予該帳戶的完整存取權。許多工具會建立、更新或刪除儀表板、圖表、資料集、資料庫、使用者、角色、群組與 RLS 規則;破壞性呼叫需要確認旗標,SQL Lab 會攔截 DDL/DML,但這些只是防護措施而非保證。請勿將 SUPERSET_PASSWORD 與工作階段 cookie 留在 shell 歷史或提交到設定檔。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MCP Superset,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-superset

[PyPI version] [PyPI downloads] [Python 3.12+] [License: MIT] [CI] [CodeQL]

[Superset 6.0.1] [MCP] [Typed] [Ruff] [uv] [Tools: 137] [GitHub stars]

A comprehensive Model Context Protocol (MCP) server for Apache Superset. Gives AI assistants (Claude, GPT, etc.) full control over your Superset instance — dashboards, charts, datasets, SQL Lab, users, roles, RLS, and more — through 137 tools.

Comparison with Other Superset MCP Servers

Featuremcp-supersetsuperset-mcpsuperset-mcp (Winding2020)superset-mcp-server
Total tools13760314
LanguagePythonPythonTypeScriptTypeScript
Dashboard CRUD15 tools58-
Dashboard native filters5 tools---
Chart CRUD11 tools57-
Database tools18 tools1411
Dataset tools11 tools37-
SQL Lab5 tools711
Security (users/roles)26 tools2--
Row Level Security5 tools---
Groups9 tools---
Permissions audityes---
Dashboard access grant/revokeyes---
Auto datasource_access syncyes---
Reports & annotations10 tools---
Tags7 tools7--
Asset export/importyes---
Safety: confirmation flags14 types---
Safety: DDL/DML blockingyes---
Safety: system role protectionyes---
TransportHTTP, SSE, stdiostdiostdiostdio
Auth methodJWT + auto-refresh + CSRFUsername/password + token fileUsername/password or tokenLDAP
Superset versions6.0.14.1.1not specifiednot specified
CLI with args--host --port --transport---
PyPI packagemcp-supersetsuperset-mcpsuperset-mcp (npm)-
uvx supportyes---
LicenseMITMIT-Apache 2.0
GitHub starsnew170215

Key differentiators:

  • Only MCP server with full security management (users, roles, RLS, groups, permissions audit)
  • Only one with built-in safety validations (confirmation flags, DDL/DML blocking)
  • Only one with dashboard native filter management
  • Only one with automatic datasource_access synchronization
  • Only one with multiple transport options (HTTP, SSE, stdio)
  • Only one with configurable CLI (--host, --port, --transport, --env-file)

Features

  • 137 MCP tools covering the complete Superset REST API
  • Dashboard management — CRUD, copy, publish/unpublish, export/import, embedded mode, native filters
  • Chart management — CRUD, copy, data retrieval, export/import, cache warmup
  • Database management — CRUD, connection testing, schema/table introspection, SQL validation
  • Dataset management — CRUD, duplicate, schema refresh, export/import
  • SQL Lab — query execution, formatting, cost estimation, results & CSV export
  • Security — users, roles, permissions, Row Level Security (RLS), groups
  • Access control automation — grant/revoke dashboard access with automatic datasource permission sync
  • Audit — comprehensive permissions matrix (user x dashboards x datasets x RLS)
  • Tags, reports, annotations, saved queries — full CRUD
  • Asset export/import — full instance backup and restore
  • Built-in safety — confirmation flags for destructive operations, DDL/DML blocking in SQL Lab
  • JWT authentication with automatic token refresh and CSRF handling
  • Streamable HTTP, SSE, and stdio transports

Quick Start

Installation

bash
# From PyPIpip install mcp-superset
# With uv (recommended)uv pip install mcp-superset
# Run without installing (uvx)uvx mcp-superset

Configuration

Create a .env file in the current directory, or set environment variables:

env
# RequiredSUPERSET_BASE_URL=https://superset.example.comSUPERSET_USERNAME=adminSUPERSET_PASSWORD=your_password
# OptionalSUPERSET_AUTH_PROVIDER=db          # db (default) or ldapSUPERSET_MCP_HOST=127.0.0.1       # Server host (default: 127.0.0.1)SUPERSET_MCP_PORT=8001             # Server port (default: 8001)SUPERSET_MCP_TRANSPORT=streamable-http  # streamable-http (default), sse, or stdio
Session-cookie authentication (SSO/OAuth)

When Superset is behind SSO (OAuth/OIDC/SAML), password login via the REST API is unavailable. Instead, supply a browser session cookie:

VariableDescription
SUPERSET_SESSION_COOKIESession cookie value copied from your browser. When set, this mode is used instead of username/password.
SUPERSET_SESSION_COOKIE_NAMECookie name. Defaults to session.

Copy the cookie from your browser's dev tools (Application → Cookies → your Superset domain → session). The MCP server sends it on every request and fetches CSRF tokens with it. The session cannot be renewed server-side, so when it expires you must paste a fresh value and restart the server.

Two things worth checking before you use this mode:

  • The cookie name is not always session. Instances that set SESSION_COOKIE_NAME in superset_config.py use a different name (s, for example). Use the name shown in dev tools and set SUPERSET_SESSION_COOKIE_NAME accordingly.
  • The instance must accept session authentication on /api/v1/. Where the REST API is configured for JWT only, requests carrying a valid session cookie still return 401 {"msg": "Missing Authorization Header"} - refreshing the cookie will not help, and JWT mode is the only option there.

Treat the cookie as a credential: it grants full access to your Superset account for the lifetime of the session. Keep it in .env (which is gitignored), not in shell history or committed config.

Running

bash
# Using CLI (after pip install)mcp-superset
# Run without installinguvx mcp-superset
# Using Python modulepython -m mcp_superset
# With uv from sourceuv run mcp-superset
# With custom settingsmcp-superset --host 0.0.0.0 --port 9000 --transport sse
# With custom .env filemcp-superset --env-file /path/to/.env
# Using stdio transport (for Claude Desktop, Cursor, etc.)mcp-superset --transport stdio

CLI Options

OptionDefaultEnv VariableDescription
--host127.0.0.1SUPERSET_MCP_HOSTServer bind address
--port8001SUPERSET_MCP_PORTServer bind port
--transportstreamable-httpSUPERSET_MCP_TRANSPORTTransport: streamable-http, sse, stdio
--env-fileauto-detect—Path to .env file
--version——Show version and exit

Connecting to MCP Clients

Claude Code

Add to your project's .mcp.json:

json
{  "mcpServers": {    "superset": {      "type": "http",      "url": "http://localhost:8001/mcp"    }  }}

Then start the server: mcp-superset or uvx mcp-superset.

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "superset": {      "command": "uvx",      "args": ["mcp-superset", "--transport", "stdio"],      "env": {        "SUPERSET_BASE_URL": "https://superset.example.com",        "SUPERSET_USERNAME": "admin",        "SUPERSET_PASSWORD": "your_password"      }    }  }}
Cursor / Windsurf
json
{  "mcpServers": {    "superset": {      "command": "uvx",      "args": ["mcp-superset", "--transport", "stdio"],      "env": {        "SUPERSET_BASE_URL": "https://superset.example.com",        "SUPERSET_USERNAME": "admin",        "SUPERSET_PASSWORD": "your_password"      }    }  }}
Other MCP Clients

Any MCP-compatible client can connect via:

  • Streamable HTTP: http://<host>:<port>/mcp
  • SSE: http://<host>:<port>/sse
  • stdio: pipe to mcp-superset --transport stdio

Available Tools (137)

Dashboards (15 tools)

ToolDescription
superset_dashboard_listList dashboards with filtering and pagination
superset_dashboard_getGet dashboard details by ID
superset_dashboard_createCreate a new dashboard
superset_dashboard_updateUpdate dashboard properties
superset_dashboard_deleteDelete a dashboard (requires confirmation)
superset_dashboard_copyDuplicate a dashboard
superset_dashboard_publishPublish a draft dashboard
superset_dashboard_unpublishUnpublish a dashboard
superset_dashboard_chartsList charts in a dashboard
superset_dashboard_datasetsList datasets used by a dashboard
superset_dashboard_exportExport dashboard as ZIP (base64)
superset_dashboard_importImport dashboard from ZIP file
superset_dashboard_embedded_getGet embedded configuration
superset_dashboard_embedded_setEnable embedded mode with allowed domains
superset_dashboard_embedded_deleteDisable embedded mode

Dashboard Filters (5 tools)

ToolDescription
superset_dashboard_filter_listList native filters on a dashboard
superset_dashboard_filter_addAdd a native filter (auto-generates correct ID format)
superset_dashboard_filter_updateUpdate an existing native filter
superset_dashboard_filter_deleteRemove a native filter (requires confirmation)
superset_dashboard_filter_resetRemove all filters (requires confirmation)

Charts (11 tools)

ToolDescription
superset_chart_listList charts with filtering and pagination
superset_chart_getGet chart details by ID
superset_chart_createCreate a new chart
superset_chart_updateUpdate chart properties
superset_chart_deleteDelete a chart (requires confirmation)
superset_chart_copyDuplicate a chart
superset_chart_dataExecute chart query and get data
superset_chart_get_dataGet data from a saved chart
superset_chart_exportExport chart as ZIP (base64)
superset_chart_importImport chart from ZIP file
superset_chart_cache_warmupWarm up chart cache

Databases (18 tools)

ToolDescription
superset_database_listList database connections
superset_database_getGet database details
superset_database_createRegister a new database connection
superset_database_updateUpdate database settings
superset_database_deleteRemove a database (requires confirmation)
superset_database_test_connectionTest database connectivity
superset_database_schemasList schemas in a database
superset_database_tablesList tables in a schema
superset_database_catalogsList catalogs (for multi-catalog databases)
superset_database_connection_infoGet connection string info
superset_database_function_namesList available SQL functions
superset_database_related_objectsFind charts/datasets using this database
superset_database_validate_sqlValidate SQL syntax
superset_database_validate_parametersValidate connection parameters
superset_database_select_starGenerate SELECT * query for a table
superset_database_table_metadataGet table column and index metadata
superset_database_exportExport database config as ZIP
superset_database_available_enginesList supported database engines

Datasets (11 tools)

ToolDescription
superset_dataset_listList datasets with filtering
superset_dataset_getGet dataset details including columns and metrics
superset_dataset_createCreate a dataset from a table or SQL query
superset_dataset_updateUpdate dataset properties
superset_dataset_deleteDelete a dataset (requires confirmation)
superset_dataset_duplicateDuplicate a dataset
superset_dataset_refresh_schemaRefresh columns from source
superset_dataset_related_objectsFind charts using this dataset
superset_dataset_exportExport dataset as ZIP
superset_dataset_importImport dataset from ZIP
superset_dataset_get_or_createGet existing or create new dataset

SQL Lab & Queries (13 tools)

ToolDescription
superset_sqllab_executeExecute a SQL query (SELECT only)
superset_sqllab_format_sqlFormat/beautify SQL
superset_sqllab_resultsFetch results of a completed query
superset_sqllab_estimate_costEstimate query execution cost
superset_sqllab_export_csvExport query results as CSV
superset_query_listList executed queries
superset_query_getGet query details and results
superset_query_stopStop a running query
superset_saved_query_listList saved queries
superset_saved_query_createSave a new query
superset_saved_query_getGet saved query details
superset_saved_query_updateUpdate a saved query
superset_saved_query_deleteDelete a saved query (requires confirmation)

Security & Access Control (26 tools)

ToolDescription
superset_get_current_userGet current authenticated user info
superset_get_current_user_rolesGet roles of current user
superset_user_listList users with filtering
superset_user_getGet user details
superset_user_createCreate a new user
superset_user_updateUpdate user properties
superset_user_deleteDelete a user (requires confirmation)
superset_role_listList roles
superset_role_getGet role details
superset_role_createCreate a new role
superset_role_updateUpdate role name/description
superset_role_deleteDelete a role (requires confirmation, blocks system roles)
superset_permission_listList all available permissions
superset_role_permissions_getGet permissions assigned to a role
superset_role_permission_addSet role permissions (full replacement, requires confirmation)
superset_role_copy_permissionsCopy all permissions from one role to another
superset_dashboard_grant_role_accessGrant a role access to dashboard and its datasets
superset_dashboard_revoke_role_accessRevoke a role's access to dashboard datasets
superset_bulk_user_role_addAdd a role to multiple users (by IDs or by current role)
superset_bulk_user_role_removeRemove a role from multiple users
superset_bulk_user_role_replaceReplace one role with another for all matching users
superset_rls_listList Row Level Security rules
superset_rls_getGet RLS rule details
superset_rls_createCreate an RLS rule
superset_rls_updateUpdate an RLS rule (requires both roles and tables)
superset_rls_deleteDelete an RLS rule (requires confirmation)

Groups (9 tools)

ToolDescription
superset_group_listList groups
superset_group_getGet group details with members and roles
superset_group_createCreate a new group
superset_group_updateUpdate group name
superset_group_deleteDelete a group
superset_group_add_usersAdd users to a group
superset_group_remove_usersRemove users from a group
superset_group_add_rolesAdd roles to a group
superset_group_remove_rolesRemove roles from a group

Tags (7 tools)

ToolDescription
superset_tag_listList tags
superset_tag_getGet tag details
superset_tag_createCreate a tag (optionally bind to objects)
superset_tag_updateUpdate a tag
superset_tag_deleteDelete a tag (requires confirmation)
superset_tag_get_objectsList objects associated with a tag
superset_tag_bulk_createCreate multiple tags at once

System & Reports (21 tools)

ToolDescription
superset_report_listList scheduled reports
superset_report_getGet report details
superset_report_createCreate a scheduled report
superset_report_updateUpdate a report
superset_report_deleteDelete a report (requires confirmation)
superset_annotation_layer_listList annotation layers
superset_annotation_layer_getGet annotation layer details
superset_annotation_layer_createCreate an annotation layer
superset_annotation_layer_updateUpdate an annotation layer
superset_annotation_layer_deleteDelete an annotation layer (requires confirmation)
superset_annotation_listList annotations in a layer
superset_annotation_getGet annotation details
superset_annotation_createCreate an annotation
superset_annotation_updateUpdate an annotation
superset_annotation_deleteDelete an annotation (requires confirmation)
superset_recent_activityGet recent user activity
superset_log_listGet audit logs
superset_get_menuGet Superset menu structure
superset_get_base_urlGet configured Superset base URL
superset_assets_exportExport all Superset assets as ZIP
superset_assets_importImport assets from ZIP file

Audit (1 tool)

ToolDescription
superset_permissions_auditGenerate comprehensive permissions matrix

Safety Features

The server includes extensive built-in protections to prevent accidental data loss or misconfiguration.

Confirmation Flags

Destructive operations require explicit confirmation parameters:

OperationRequired FlagWhat It Shows
Delete dashboardconfirm_delete=TrueDashboard name, slug, chart count
Delete chartconfirm_delete=TrueLinked dashboards
Delete datasetconfirm_delete=TrueAffected charts and dashboards
Delete databaseconfirm_delete=TrueAffected datasets, charts
Delete RLS ruleconfirm_delete=TrueClause, roles, datasets
Delete roleconfirm_delete=TrueBlocks system roles
Delete userconfirm_delete=TrueBlocks service account deletion
Update chart paramsconfirm_params_replace=True—
Update dataset columnsconfirm_columns_replace=True—
Update database URIconfirm_uri_change=TrueAffected charts/dashboards
Update user rolesconfirm_roles_replace=TrueCurrent roles
Set role permissionsconfirm_full_replace=True—
Grant dashboard accessconfirm_grant=TrueDry-run results
Revoke dashboard accessconfirm_revoke=TrueDry-run results
Bulk add role to usersconfirm=TrueUser count, sample list
Bulk remove role from usersconfirm=TrueUser count, prevents last role removal
Bulk replace roleconfirm=TrueOld/new role names, user count
Copy role permissionsconfirm=TrueSource/target permission counts

Automatic Protections

  • DDL/DML blocking — SQL Lab rejects DROP, DELETE, UPDATE, INSERT, TRUNCATE, ALTER, CREATE, GRANT, REVOKE (SQL comments are stripped before checking)
  • System role protection — cannot delete Admin, Alpha, Gamma, Public roles
  • Service account protection — cannot delete the MCP service user
  • RLS safety — rls_update requires both roles and tables to prevent silent data wipe
  • Native filter IDs — automatically generated in NATIVE_FILTER-<uuid> format
  • Chart validation — rejects charts without granularity_sqla (required for dashboard time filters)
  • Auto-sync — datasource_access permissions are automatically synchronized when dashboard roles change

Architecture

superset-mcp/├── pyproject.toml              # Package configuration├── .env.example                # Environment variable template├── LICENSE                     # MIT License├── README.md                   # This file├── README_RU.md                # Russian documentation├── CHANGELOG.md                # Version history└── src/mcp_superset/    ├── __init__.py             # Package init with __version__    ├── __main__.py             # CLI entry point with argparse    ├── server.py               # FastMCP server setup and configuration    ├── auth.py                 # JWT authentication (login, refresh, CSRF)    ├── client.py               # HTTP client (auto-auth, retry, RISON pagination)    ├── models.py               # Pydantic models    └── tools/        ├── __init__.py         # register_all_tools()        ├── helpers.py          # Auto-sync datasource_access logic        ├── dashboards.py       # Dashboard + filter tools (20)        ├── charts.py           # Chart tools (11)        ├── databases.py        # Database tools (18)        ├── datasets.py         # Dataset tools (11)        ├── queries.py          # SQL Lab + saved query tools (13)        ├── security.py         # User, role, permission, RLS, bulk operations (26)        ├── groups.py           # Group management tools (9)        ├── audit.py            # Permissions audit tool (1)        ├── tags.py             # Tag tools (7)        └── system.py           # Reports, annotations, logs, assets (21)

Superset Compatibility

  • Tested with: Apache Superset 6.0.1
  • Authentication: JWT (recommended) — API Key (sst_*) is not implemented in Superset
  • Required Superset user: Admin role (for full API access)

Recommended Superset Configuration

Add to your superset_config.py:

python
from datetime import timedelta
# Increase JWT token lifetime (default is 15 min)JWT_ACCESS_TOKEN_EXPIRES = timedelta(hours=1)JWT_REFRESH_TOKEN_EXPIRES = timedelta(days=30)
# Max API page sizeFAB_API_MAX_PAGE_SIZE = 100

Development

Setup

bash
git clone https://github.com/bintocher/mcp-superset.gitcd superset-mcp
# Create virtual environment and install in editable modeuv venvuv pip install -e ".[dev]"
# Copy and configure .envcp .env.example .env# Edit .env with your Superset credentials

Running Locally

bash
# Run from sourceuv run python -m mcp_superset
# Or with CLIuv run mcp-superset --port 8001

Running Tests

bash
uv run python test_all_tools.py

Known Superset API Quirks

These are handled automatically by the MCP server, but useful to know when debugging:

QuirkDetails
RISON paginationSuperset ignores page/page_size as query params; must use RISON in q parameter
CSRF requiredAll POST/PUT/DELETE need X-CSRFToken header + session cookie
Referer requiredSQL Lab returns 403 without Referer header
Tag API returns {}Tag creation doesn't return the ID; must query list
Tag update needs nameField is mandatory even if unchanged
Role permissions replacePOST /security/roles/{id}/permissions replaces ALL permissions
RLS update replacesPUT /rowlevelsecurity/{id} replaces ALL provided fields
Dataset update columnsPUT /dataset/{id} with columns replaces ALL columns
Dashboard copyRequires json_metadata (can be "{}")
Native filter IDsMust be NATIVE_FILTER-<uuid> format
filter_time needs granularity_sqlaCharts without it silently ignore time filters
Number formattingSMART_NUMBER abbreviates; use ,d or ,.2f for exact

License

MIT — Stanislav Chernov (@bintocher)

來源:README.md,提交 4e0a856

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分