Mcp Superset
@bintocher
关于 Mcp Superset
Full-featured MCP server for Apache Superset with 135+ tools for dashboards, charts, datasets, SQL Lab, security, and more
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"superset-stdio": {
"command": "uvx",
"args": [
"mcp-superset",
"--transport",
"stdio"
],
"env": {
"SUPERSET_BASE_URL": "https://your-superset-instance.com",
"SUPERSET_USERNAME": "admin",
"SUPERSET_PASSWORD": "<YOUR_PASSWORD>"
}
},
"superset-http": {
"type": "http",
"url": "http://localhost:8001/mcp"
},
"superset-sse": {
"type": "sse",
"url": "http://localhost:8001/sse"
}
}
}工具
133List Superset dashboards with pagination. IMPORTANT: always call this tool before dashboard_get to find out the current dashboard IDs. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for search. Examples: - By title: (filters:!((col:dashboard_title,opr:ct,value:search))) - By owner: (filters:!((col:owners,opr:rel_m_m,value:1))) - Published only: (filters:!((col:published,opr:eq,value:!t))) get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get detailed information about a dashboard by ID. IMPORTANT: if the ID is unknown, first call superset_dashboard_list to find the desired dashboard. A non-existent ID will return 404. Args: dashboard_id: Dashboard ID (integer from dashboard_list result).
Create a new dashboard. IMPORTANT: when roles are specified, datasource_access is automatically synced for the given roles — each role will get access to all dashboard datasets. Args: dashboard_title: Dashboard title (displayed in the UI). slug: URL slug for a pretty link (e.g. "my-dashboard"). Must be unique. published: Publish immediately (default False — draft). json_metadata: JSON string with dashboard metadata. Contains filter settings, color palette, refresh interval. Use "{}" for empty metadata. css: Custom CSS for dashboard styling. position_json: JSON string with widget positioning on the dashboard. Defines the layout of charts, headers, dividers in the grid. roles: List of role IDs that can access the dashboard. Users without one of these roles will NOT see the dashboard. Empty list = accessible to all.
Update an existing dashboard. Pass only the fields to change. IMPORTANT: after the update, datasource_access is automatically synced — each role from dashboard.roles will get access to all dashboard datasets. Args: dashboard_id: ID of the dashboard to update. dashboard_title: New title. slug: New URL slug (must be unique). published: Change publication status (true — published, false — draft). json_metadata: Dashboard JSON metadata (string or object, fully replaced). css: New custom CSS for the dashboard. Injected as a <style> tag on the dashboard page. Does NOT affect Explore view (chart editor) — only the dashboard. Common CSS fixes: 1) KPI big_number_total — digit size and scroll: KPI container has a fixed height (~60px at 2 cells). Default font is small. To enlarge via CSS: div[class*="big_number"] .header-line { font-size: 3.3rem !important; /* digits */ font-weight: 700 !important; line-height: 1.1 !important; margin-bottom: 0 !important; /* REQUIRED! otherwise scroll */ } div[class*="big_number"] .subheader-line { font-size: 1rem !important; /* label */ font-weight: 400 !important; opacity: 0.7; } IMPORTANT: margin-bottom on .header-line defaults to 8px — together with line-height causes overflow and scroll. Verification formula: font_size_px * 1.1 + margin_bottom <= 60px. 3.3rem = 52.8px -> 52.8 * 1.1 = 58px + 0 = 58px < 60px OK 2) Country Map tooltip clipped by container — culprit is DIV.dashboard-chart (styled-component with overflow:hidden). Tooltip = DIV.hover-popup (NOT .datamaps-hoverover!). Fix: .dashboard-chart-id-{N} .dashboard-chart { overflow: visible !important; } .hover-popup { z-index: 99999 !important; } To analyze CSS issues: open the dashboard in Playwright, find the chart element, walk up parentElement, check getComputedStyle(el).overflow at each level. position_json: Widget positioning on the dashboard (string or object). Defines the layout of charts, headers, dividers in the grid. IMPORTANT: fully replaced — first get current layout via dashboard_get, modify needed elements and pass the entire JSON. owners: List of owner user IDs (REPLACES all current owners). roles: List of role IDs for dashboard access (REPLACES current ones). On change, datasource_access is automatically synced.
Publish a dashboard (make it visible to users with appropriate permissions). Args: dashboard_id: Dashboard ID.
Unpublish a dashboard (convert to draft). The dashboard will remain accessible to owners and admins but will be hidden from the general list. Args: dashboard_id: Dashboard ID.
Delete a dashboard by ID. Charts and datasets are NOT deleted — only the dashboard itself. CRITICAL: the dashboard will be permanently deleted. Args: dashboard_id: ID of the dashboard to delete. confirm_delete: Deletion confirmation (REQUIRED).
Create a copy of an existing dashboard with all its charts. Args: dashboard_id: ID of the source dashboard to copy. dashboard_title: Title for the new copy. json_metadata: JSON metadata for the copy. IMPORTANT: Superset requires this field. If not provided, "{}" will be used.
Get the list of all charts placed on a dashboard. Returns chart IDs and names. Useful for analyzing dashboard contents. Args: dashboard_id: Dashboard ID.
Get the list of all datasets used by a dashboard's charts. Useful for understanding the dashboard's dependencies on data sources. Args: dashboard_id: Dashboard ID.
Export dashboards with all dependencies (charts, datasets, databases) as a ZIP. The result is a base64-encoded ZIP file. It can be imported back via superset_dashboard_import. Args: dashboard_ids: Comma-separated dashboard IDs (e.g. "1,2,3"). Returns: JSON: {"format": "zip", "encoding": "base64", "data": "...", "size_bytes": N}
Import dashboards from a ZIP file (created via export). The ZIP should contain YAML files with dashboard and dependency configurations. Args: file_path: Absolute path to the ZIP file on disk. overwrite: Overwrite existing objects with the same UUID (default False).
Get the embedding (embedded) settings of a dashboard. IMPORTANT: will return 404 if embedded mode has not been configured via embedded_set. Args: dashboard_id: Dashboard ID.
Enable dashboard embedding (embedded mode) and configure allowed domains. Once enabled, the dashboard can be embedded via iframe on the specified domains. Args: dashboard_id: Dashboard ID. allowed_domains: List of domains where embedding is allowed (e.g. ["example.com", "app.example.com"]). Empty list = all domains.
Disable dashboard embedding (embedded mode). After disabling, the dashboard can no longer be embedded via iframe. Args: dashboard_id: Dashboard ID.
Get a list of native filters on a dashboard in a readable format. Parses json_metadata and returns configuration of each filter: ID, name, type, column, dataset, chartsInScope, controlValues. Args: dashboard_id: Dashboard ID.
Add a native filter to a dashboard with correct defaults. Automatically populates chartsInScope with all dashboard charts, builds correct scope, defaultDataMask, and cascadeParentIds. Filter ID is generated in NATIVE_FILTER-<uuid> format — this is REQUIRED for Superset 6.0.1 (custom IDs are silently ignored by the frontend). Args: dashboard_id: Dashboard ID. name: Display name of the filter (e.g. "Full Name"). column: Dataset column name for filtering (e.g. "full_name"). dataset_id: ID of the dataset providing filter values. filter_type: Filter type: "filter_select", "filter_time", "filter_range". multi_select: Allow multiple selection (default True). search_all_options: Search all values, not just loaded ones (for large lists). enable_empty_filter: Empty filter means filtering by NULL. cascade_parent_id: ID of the parent filter for cascading.
Update a native filter on a dashboard by ID. Pass only the fields to change. Args: dashboard_id: Dashboard ID. filter_id: Filter ID (format "NATIVE_FILTER-<uuid>"). name: New filter name. column: New column for filtering. multi_select: Multiple selection. search_all_options: Search all values. enable_empty_filter: Empty filter = NULL. cascade_parent_id: Parent filter ID (None — remove cascading).
Delete a native filter from a dashboard by ID. Args: dashboard_id: Dashboard ID. filter_id: ID of the filter to delete (format "NATIVE_FILTER-<uuid>"). confirm_delete: Deletion confirmation (REQUIRED).
Recreate ALL native filters on a dashboard with correct defaults. Deletes all current filters and creates new ones from the provided list. Automatically populates chartsInScope, scope, defaultDataMask, cascadeParentIds. CRITICAL: all current filters will be DELETED and replaced with new ones. Args: dashboard_id: Dashboard ID. dataset_id: Dataset ID for all filters. filters_json: JSON array of filter definitions. Each element: confirm_reset: Filter reset confirmation (REQUIRED). { "name": "Full Name", "column": "full_name", "type": "filter_select", // filter_select | filter_time | filter_range "multi_select": true, // optional, default true "search_all_options": false, // optional, default false "enable_empty_filter": false, // optional, default false "cascade_parent_id": null // optional, parent filter ID }
List Superset charts with pagination. IMPORTANT: always call this tool before chart_get/chart_delete to look up actual chart IDs. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for searching. Examples: - By name: (filters:!((col:slice_name,opr:ct,value:search_term))) - By type: (filters:!((col:viz_type,opr:eq,value:table))) - By dataset: (filters:!((col:datasource_id,opr:eq,value:1))) get_all: Retrieve ALL records with automatic pagination (ignores page/page_size).
Get detailed information about a chart by ID. Returns all settings: viz_type, params, query_context, dashboard bindings. IMPORTANT: if the ID is unknown, call superset_chart_list first. Args: chart_id: Chart ID (integer from chart_list result).
Create a new chart. Args: slice_name: Chart name (displayed in the UI). viz_type: Visualization type (Superset 6.x). Main types: ECharts (recommended): - echarts_timeseries_bar — bar/horizontal bar chart - echarts_timeseries_line — line chart - echarts_timeseries_smooth — smoothed line - echarts_timeseries_step — step line - echarts_timeseries_scatter — scatter plot - echarts_area — area chart - mixed_timeseries — multiple series with 2 Y-axes - pie — pie chart - funnel — funnel chart - gauge_chart — gauge/speedometer - radar — radar chart - graph_chart — graph/network - tree_chart — tree diagram - treemap_v2 — treemap - sunburst_v2 — sunburst chart - sankey_v2 — Sankey diagram - heatmap_v2 — heatmap - histogram_v2 — histogram - box_plot — box plot - bubble_v2 — bubble chart - waterfall — waterfall chart - gantt_chart — Gantt chart KPI: - big_number_total — big number (KPI) - big_number — KPI with trend Tables: - table — table - pivot_table_v2 — pivot table Maps: - country_map — country map (ISO 3166-2 codes) - world_map — world map Other: - word_cloud — word cloud - handlebars — custom template DEPRECATED (DO NOT USE — "not registered" error): dist_bar -> echarts_timeseries_bar, bar -> echarts_timeseries_bar, area -> echarts_area, line -> echarts_timeseries_line, heatmap -> heatmap_v2, histogram -> histogram_v2, treemap -> treemap_v2, sunburst -> sunburst_v2, sankey -> sankey_v2, pivot_table -> pivot_table_v2, dual_line -> mixed_timeseries, line_multi -> mixed_timeseries datasource_id: Dataset ID (from superset_dataset_list). datasource_type: Data source type (default "table" — dataset). params: JSON string with visualization parameters (depend on viz_type). Define metrics, groupings, filters, colors, labels, etc. IMPORTANT — numeric and time formats: Do NOT use SMART_NUMBER or SMART_DATE — they abbreviate numbers (1.61k instead of 1610) and show literal text instead of dates. Use explicit formats: - y_axis_format: "d" (integers without separators), ",d" (with commas), ",.2f" (decimals) - number_format: ",d" (for pie chart) - x_axis_time_format: "%b %Y" (X-axis dates), "%Y-%m-%d" (ISO) - tooltipTimeFormat: "%Y-%m-%d" or "%Y-%m" (tooltip dates) - show_value: true (show numbers on bar chart columns) CRITICAL — date/time format in Superset 6.x: Superset 6.x uses ONLY D3 time format (strftime syntax). Do NOT use moment.js format (YYYY-MM-DD) — it will be rendered as literal text "YYYY-MM-DD" instead of an actual date! Correct formats (D3/strftime): - "%Y-%m-%d" -> 2026-03-05 (ISO date) - "%Y-%m-%d %H:%M" -> 2026-03-05 14:30 (date + time) - "%d.%m.%Y" -> 05.03.2026 (European format) - "%b %Y" -> Mar 2026 (month + year) - "%Y" -> 2026 (year only) - "%Y-%m" -> 2026-03 (year-month) INCORRECT formats (moment.js — DO NOT WORK): - "YYYY-MM-DD" — renders literal "YYYY-MM-DD" - "DD.MM.YYYY" — renders literal "DD.MM.YYYY" - "MMM YYYY" — renders literal "MMM YYYY" Parameters that accept date formats: - table_timestamp_format (tables) - x_axis_time_format (X-axis) - tooltipTimeFormat (tooltip) - y_axis_format (for big_number_total with date in metric) big_number_total (KPI cards) — REFERENCE parameters: - header_font_size: 0.27 (number size, ~53px in a 60px container) - subheader_font_size: 0.15 (subtitle/label size) - y_axis_format: "d" (integers without comma separators) IMPORTANT — scroll in KPI: the big_number_total container has a fixed height (usually 60px at 2 grid cells). Too large a font causes scrolling. Culprits: font-size + line-height (1.1x) + margin-bottom (8px default). If using dashboard CSS for custom font size, add `margin-bottom: 0 !important` to .header-line. Formula: font_size * 1.1 + margin <= container_height (60px). Recommended CSS: font-size 3.3rem (58px with line-height), margin-bottom: 0. country_map — required parameters: - select_country: "russia" - entity: "<column with ISO 3166-2 codes>" - metric: {...} Map tooltip (class .hover-popup) is clipped by the container .dashboard-chart (overflow:hidden). Fix via dashboard CSS: .dashboard-chart-id-{N} .dashboard-chart { overflow: visible !important; } .hover-popup { z-index: 99999 !important; } query_context: JSON string with query context. Required for chart_get_data to work. Usually generated by the UI. dashboards: List of dashboard IDs to bind the chart to.
Update an existing chart. Pass only the fields to change. Args: chart_id: ID of the chart to update. slice_name: New name. viz_type: New visualization type (see chart_create for the list of types). params: New JSON visualization parameters (replaces entirely). See chart_create for reference on numeric/time formats. IMPORTANT: params replaces ALL parameters — first get current ones via chart_get, modify the needed fields, and pass the full JSON. CRITICAL: for dates use D3 strftime format ("%Y-%m-%d"), NOT moment.js ("YYYY-MM-DD") — otherwise a literal will be shown! query_context: New JSON query context (replaces entirely). IMPORTANT: when changing params you should also update query_context, otherwise the chart will use the old query context. dashboards: New list of dashboard IDs (REPLACES all bindings). confirm_params_replace: Confirmation for replacing params (REQUIRED when passing params).
Delete a chart by ID. The chart will be removed from all dashboards. Args: chart_id: ID of the chart to delete. confirm_delete: Deletion confirmation (REQUIRED).
Execute an arbitrary query against a dataset and retrieve data. Allows fetching data directly from a dataset without creating a chart. To get data from an existing chart, use chart_get_data instead. Args: query_context: JSON string with the query context. Format: { "datasource": {"id": <dataset_id>, "type": "table"}, "queries": [{ "columns": ["col1", "col2"], "metrics": [{"label": "count", "expressionType": "SIMPLE", "aggregate": "COUNT", "column": {"column_name": "id"}}], "filters": [{"col": "status", "op": "==", "val": "active"}], "orderby": [["col1", true]], "row_limit": 100, "time_range": "Last 7 days" }], "result_format": "json", "result_type": "full" } IMPORTANT: time_range is specified at the QUERY level, NOT inside extras. Allowed time_range values: "Last day", "Last week", "Last month", "Last year", "No filter", or "2024-01-01 : 2024-12-31".
Get data from a specific saved chart by its ID. IMPORTANT: works only if the chart was saved with query_context (usually after opening and saving via the Superset UI). If query_context is missing, use superset_chart_data with a manually constructed query. Args: chart_id: Chart ID.
Export charts with all dependencies (datasets, databases) as a ZIP file. The result is a base64-encoded ZIP file. It can be imported back via superset_chart_import. Args: chart_ids: Chart IDs separated by commas (e.g. "1,2,3"). Returns: JSON: {"format": "zip", "encoding": "base64", "data": "...", "size_bytes": N}
Import charts from a ZIP file (created via export). The ZIP must contain YAML files with chart configurations and dependencies. Args: file_path: Absolute path to the ZIP file on disk. overwrite: Overwrite existing objects with the same UUID (default False).
Create a copy of an existing chart with a new name. Copies all visualization parameters, type, dataset, and query_context. Dashboard bindings are NOT copied — specify new ones via the dashboards parameter. Args: chart_id: ID of the source chart to copy. slice_name: Name for the new copy. dashboards: List of dashboard IDs to bind the copy to (optional).
Warm up the cache for a chart. Useful for speeding up loading of frequently used charts. Args: chart_id: ID of the chart to warm up. dashboard_id: Dashboard ID for filter context (optional).
List database connections configured in Superset. Returns the ID, name, engine type, and status of each connection. IMPORTANT: always call before database_get to discover current IDs. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for searching. Examples: - By name: (filters:!((col:database_name,opr:ct,value:postgres))) - By type: (filters:!((col:backend,opr:eq,value:postgresql))) get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get detailed information about a database connection by ID. IMPORTANT: if the ID is unknown, call superset_database_list first. Args: database_id: Connection ID (integer from database_list result).
Create a new database connection. IMPORTANT: Superset validates database availability on creation. The URI must be reachable from the Superset server (not the client's localhost). Args: database_name: Human-readable connection name. sqlalchemy_uri: SQLAlchemy connection URI string. Examples: - PostgreSQL: postgresql://user:pass@host:5432/dbname - MySQL: mysql://user:pass@host:3306/dbname - SQLite: sqlite:///path/to/db.sqlite expose_in_sqllab: Whether to show in SQL Lab (default True). allow_ctas: Allow CREATE TABLE AS SELECT. allow_cvas: Allow CREATE VIEW AS SELECT. allow_dml: Allow INSERT/UPDATE/DELETE. allow_run_async: Allow asynchronous query execution. extra: JSON string with additional settings (engine_params, metadata_params).
Update a database connection. Pass only the fields you want to change. Args: database_id: Connection ID to update. database_name: New connection name. sqlalchemy_uri: New SQLAlchemy URI. CRITICAL: changing the URI breaks all datasets and charts using this connection. expose_in_sqllab: Whether to show in SQL Lab. allow_ctas: Allow CREATE TABLE AS SELECT. allow_cvas: Allow CREATE VIEW AS SELECT. allow_dml: Allow INSERT/UPDATE/DELETE. extra: JSON string with additional settings. confirm_uri_change: Confirmation for URI change (REQUIRED when changing sqlalchemy_uri).
Delete a database connection. All associated datasets will become broken. CRITICAL: deleting a connection breaks ALL datasets, charts, and dashboards using this DB. Args: database_id: Connection ID to delete. confirm_delete: Deletion confirmation (REQUIRED).
Test a database connection without creating it. IMPORTANT: the URI must be reachable from the Superset server. Args: database_name: Connection name (shown in error messages). sqlalchemy_uri: SQLAlchemy URI to test. extra: JSON string with additional settings.
List schemas available in a database. Useful for selecting a schema before querying tables or creating a dataset. Args: database_id: Database connection ID (from database_list).
List tables and views in the specified database schema. Useful for selecting a table before creating a dataset. Args: database_id: Database connection ID (from database_list). schema_name: Schema name (from database_schemas). Examples: "public", "source". Passed in RISON format without quotes.
List catalogs in a database (for engines that support catalogs). Not supported by all engines. PostgreSQL and MySQL typically do not use catalogs. Args: database_id: Database connection ID.
Get connection information (URI without password, parameters). Args: database_id: Database connection ID.
List available SQL functions in the database. Useful for building SQL queries with engine-specific functions. Args: database_id: Database connection ID.
Get objects related to a database connection (datasets, charts). Useful before deleting a connection to understand what will break. Args: database_id: Database connection ID.
Validate SQL query syntax without executing it (EXPLAIN-like check). IMPORTANT: not all database engines support SQL validation. PostgreSQL does. Args: database_id: Database connection ID. sql: SQL query to validate. schema: Schema for validation context (e.g. "public").
Validate database connection parameters without creating a connection. Args: engine: Database engine type: "postgresql", "mysql", "sqlite", "mssql", etc. parameters: Connection parameters dictionary: {"host": "...", "port": 5432, "database": "...", "username": "...", "password": "..."} configuration_method: Configuration method: "sqlalchemy_form" (default) or "dynamic_form".
Generate a SELECT * SQL query for a table (with LIMIT). Useful for quickly inspecting table structure and data. Args: database_id: Database connection ID. table_name: Table name. schema_name: Schema (e.g. "public"). If not specified, uses the default schema.
Get table metadata: columns, data types, indexes, and primary keys. Useful for understanding table structure before writing SQL queries. Args: database_id: Database connection ID. table_name: Table name. schema_name: Schema (e.g. "public"). If not specified, uses the default schema.
Export database connection configurations as a ZIP file. IMPORTANT: passwords are NOT exported for security reasons. Args: database_ids: Comma-separated connection IDs (e.g. "1,2"). Returns: JSON: {"format": "zip", "encoding": "base64", "data": "...", "size_bytes": N}
List supported database engine types for creating connections. Returns available engines: PostgreSQL, MySQL, SQLite, etc. Useful for selecting an engine when creating a new connection.
List Superset datasets with pagination. A dataset is a reference to a table/view or a virtual SQL query in Superset. IMPORTANT: always call before dataset_get to discover current IDs. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for searching. Examples: - By name: (filters:!((col:table_name,opr:ct,value:search_term))) - By schema: (filters:!((col:schema,opr:eq,value:public))) - By database: (filters:!((col:database,opr:rel_o_m,value:1))) get_all: Fetch ALL records with automatic pagination (ignores page/page_size). Returns: JSON string with the list of datasets.
Get detailed information about a dataset: columns, metrics, SQL. IMPORTANT: if the ID is unknown, call superset_dataset_list first. Args: dataset_id: Dataset ID (integer from dataset_list result). Returns: JSON string with dataset details.
Create a new dataset (physical or virtual). A physical dataset references an existing table/view in the database. A virtual dataset uses an arbitrary SQL query as the data source. Args: table_name: Table/view name (for physical) or dataset name (for virtual). database: Database connection ID (from superset_database_list). schema_name: Database schema (e.g. "public", "source"). If omitted, uses the DB default schema. sql: SQL query for a virtual dataset. If provided, creates a virtual dataset based on this query. Returns: JSON string with the created dataset details.
Update a dataset. Only pass the fields you want to change. Args: dataset_id: ID of the dataset to update. table_name: New table/dataset name. sql: New SQL query (only for virtual datasets). description: Dataset description (displayed in Superset UI). columns: JSON string describing columns. CRITICAL: passing columns REPLACES ALL dataset columns! To update a single column (e.g. verbose_name), pass ALL columns with their IDs. After an error, dataset_refresh_schema will restore columns from SQL. Format: [{"id": 123, "column_name": "id", "type": "INTEGER", ...}] metrics: JSON string describing metrics. Format: [{"metric_name": "count", "expression": "COUNT(*)", "metric_type": "count"}] confirm_columns_replace: Confirmation for replacing ALL columns (REQUIRED when passing columns). Returns: JSON string with the updated dataset details.
Refresh the dataset schema from the source (rescan columns and types). Useful after ALTER TABLE or any structural change to the underlying table. Args: dataset_id: Dataset ID. Returns: JSON string with the refresh result.
Delete a dataset. Charts using this dataset will stop working. CRITICAL: deleting a dataset breaks all linked charts and dashboards. Args: dataset_id: ID of the dataset to delete. confirm_delete: Deletion confirmation (REQUIRED). Returns: JSON string with the deletion result.
Create a copy of an existing dataset (with columns and metrics). Args: base_model_id: ID of the source dataset to copy. IMPORTANT: the field is called base_model_id, NOT base_id or dataset_id. table_name: Name for the new dataset (must be unique). Returns: JSON string with the duplicated dataset details.
Get objects related to a dataset (charts and dashboards). Useful before deleting a dataset to understand the impact. Args: dataset_id: Dataset ID. Returns: JSON string with related charts and dashboards.
Export datasets with dependencies (databases) to a ZIP file. The result is a base64-encoded ZIP. Can be imported via dataset_import. Args: dataset_ids: Comma-separated dataset IDs (e.g. "1,2,3"). Returns: JSON: {"format": "zip", "encoding": "base64", "data": "...", "size_bytes": N}
Import datasets from a ZIP file (created via export). Args: file_path: Absolute path to the ZIP file on disk. overwrite: Overwrite existing objects with matching UUIDs (default False). Returns: JSON string with the import result.
Get an existing dataset or create a new one for a table. If a dataset for the specified table already exists, returns it. If not, creates a new physical dataset. Args: database_id: Database connection ID (from superset_database_list). table_name: Table name in the database. schema_name: Database schema (e.g. "public", "source"). If omitted, uses the DB default schema. Returns: JSON string with the dataset details.
Execute a SQL query via SQL Lab and return the result. IMPORTANT: before executing, make sure the SQL query is correct. Use superset_database_table_metadata or superset_database_tables to find actual table and column names. Maximum 1000 rows in the result (queryLimit). Args: database_id: Database connection ID (from superset_database_list). sql: SQL query to execute. Examples: - SELECT * FROM public.my_table LIMIT 10 - SELECT count(*) FROM source.stat schema: Default schema for the query (e.g. "public", "source"). If not specified, the database default schema is used. catalog: Database catalog (for databases with catalog support, optional). tab_name: Tab name in SQL Lab UI (optional, for organization). template_params: JSON string with Jinja template parameters (optional). Example: '{"start_date": "2024-01-01"}'
Format a SQL query (pretty print with indentation). Args: sql: SQL query to format.
Retrieve results of a previously executed query by key. IMPORTANT: requires a configured Results Backend (Redis/S3) in Superset. Without it, returns 500. The key is taken from the results_key field of sqllab_execute response. Args: results_key: Results key from the superset_sqllab_execute response.
Estimate the cost of executing a SQL query (EXPLAIN). Not all database engines support this feature. PostgreSQL does. Args: database_id: Database connection ID. sql: SQL query to estimate. schema: Schema for context (e.g. "public").
Export query results to CSV format. IMPORTANT: requires a configured Results Backend (Redis/S3) in Superset. Args: client_id: Query client_id (from the superset_sqllab_execute result).
Retrieve the history of executed SQL queries. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for search. Examples: - By status: (filters:!((col:status,opr:eq,value:success))) - By database: (filters:!((col:database,opr:rel_o_m,value:1))) get_all: Retrieve ALL records with automatic pagination (ignores page/page_size).
Retrieve detailed information about a query from the history by ID. Args: query_id: Query ID (integer from query_list result).
Stop a running asynchronous query. Args: query_id: Query client_id to stop (string from sqllab_execute result).
Retrieve a list of saved SQL queries. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for search. Examples: - By label: (filters:!((col:label,opr:ct,value:search_term))) - By database: (filters:!((col:database,opr:rel_o_m,value:1))) get_all: Retrieve ALL records with automatic pagination (ignores page/page_size).
Create a saved SQL query for reuse. Args: label: Query name (displayed in the list). db_id: Database connection ID (from superset_database_list). sql: SQL query to save. schema: Default schema (e.g. "public"). description: Query description.
Retrieve a saved query by ID: SQL text, schema, description. Args: saved_query_id: Saved query ID (from saved_query_list).
Update a saved query. Pass only the fields to change. Args: saved_query_id: Saved query ID. label: New name. sql: New SQL query. schema: New default schema. description: New description.
Delete a saved query. Args: saved_query_id: Saved query ID to delete. confirm_delete: Deletion confirmation (REQUIRED).
Get information about the current authenticated user (mcp_service). Returns: JSON with username, name, email, roles, and active status.
Get the list of roles for the current user (mcp_service). Returns: JSON with IDs and names of all assigned roles.
Get the list of Superset users. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for searching. Examples: - By username: (filters:!((col:username,opr:ct,value:admin))) - Active only: (filters:!((col:active,opr:eq,value:!t))) - By role: (filters:!((col:roles,opr:rel_m_m,value:1))) get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get detailed information about a user by ID. IMPORTANT: if the ID is unknown, call superset_user_list first. Args: user_id: User ID (integer from user_list result).
Create a new Superset user. Args: first_name: User's first name. last_name: User's last name. username: Login name (must be unique). email: Email address (must be unique). password: Password. roles: List of role IDs to assign (from superset_role_list). If not specified, the default role (Public) will be assigned. active: Whether the account is active (defaults to True).
Update a user. Only pass the fields you want to change. IMPORTANT: roles REPLACES the entire role list (does not append). To add a single role: get the current roles via user_get, add the new ID to the list, then pass the full list. Args: user_id: ID of the user to update. first_name: New first name. last_name: New last name. email: New email (must be unique). roles: New list of role IDs (REPLACES all current roles). active: Activate/deactivate the account. confirm_roles_replace: Confirmation for role replacement (REQUIRED when passing roles).
Delete a Superset user. This operation is irreversible. CRITICAL: deleting the current service account (mcp_service) will lock out the entire MCP server. Deleting dashboard owners may change access to those dashboards. Args: user_id: ID of the user to delete. confirm_delete: Deletion confirmation (REQUIRED).
Get the list of Superset roles. Standard roles: Admin, Alpha, Gamma, sql_lab, Public. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for searching. Examples: - By name: (filters:!((col:name,opr:ct,value:admin))) get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get role information by ID. IMPORTANT: if the ID is unknown, call superset_role_list first. Args: role_id: Role ID (integer from role_list result).
Create a new role (without permissions). Permissions are added via role_permission_add. Args: name: Role name (must be unique).
Rename a role. Args: role_id: ID of the role to rename. name: New role name.
Delete a role. Users with this role will lose the associated permissions. BLOCKED for system roles: Admin, Alpha, Gamma, Public, sql_lab, no_access, la_report_*, la_region_*, la_developer. Args: role_id: ID of the role to delete. confirm_delete: Deletion confirmation (REQUIRED).
Get the list of all available permissions (permission_view_menu) in Superset. Each permission is a combination of an action (can_read, can_write, can_explore) and a resource. Args: page: Page number (starting from 0). page_size: Number of records per page (defaults to 100). q: RISON filter for searching. get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get the current list of permissions for a role. IMPORTANT: call this BEFORE role_permission_add to avoid losing existing permissions. Args: role_id: Role ID.
Set the permissions list for a role (FULL REPLACEMENT). WARNING: this endpoint REPLACES ALL role permissions with the provided list! To ADD a single permission: 1. Call superset_role_permissions_get to get current permission IDs 2. Add the new ID to the list 3. Pass the FULL list to this tool with confirm_full_replace=True Args: role_id: Role ID. permission_view_menu_ids: FULL list of permission IDs for the role. Permission IDs can be obtained via superset_permission_list. confirm_full_replace: Confirmation for full permission replacement (REQUIRED).
Grant a role access to a dashboard by automatically finding all dashboard datasets and adding datasource_access to the role's permissions. The tool automatically: 1. Finds all datasets used by the dashboard's charts 2. Finds permission_view_menu_id for datasource_access of each dataset 3. Checks which permissions the role already has 4. Adds missing datasource_access to the role's existing permissions 5. Checks for RLS rules on the datasets and warns if missing Without confirm_grant=True, shows the action plan (dry-run). Args: dashboard_id: Dashboard ID (from dashboard_list). role_id: ID of the role to grant access to (from role_list). confirm_grant: True to apply changes. False for dry-run only.
Revoke a role's access to a dashboard by removing datasource_access for the dashboard's datasets from the role's permissions. IMPORTANT: if a dataset is used by other dashboards that the role also has access to, revoking will break access to those dashboards as well. The tool will check and warn about this. Without confirm_revoke=True, shows the action plan (dry-run). Args: dashboard_id: Dashboard ID (from dashboard_list). role_id: ID of the role to revoke access from (from role_list). confirm_revoke: True to apply. False for dry-run only.
Get the list of Row Level Security rules. RLS adds a WHERE clause to queries for specific roles. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for searching. get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get detailed information about an RLS rule by ID. Args: rls_id: RLS rule ID (from rls_list).
Create a Row Level Security rule. RLS automatically adds a WHERE clause to queries for users with the specified roles accessing the specified datasets. Args: name: Rule name. clause: SQL WHERE condition without the WHERE keyword. Examples: - "region = 'Moscow'" - "user_id = {{ current_user_id() }}" - "status IN ('active', 'pending')" tables: List of dataset IDs the rule applies to (from dataset_list). roles: List of role IDs the rule applies to (from role_list). filter_type: Filter type: - "Regular" (default) — additional restriction for the specified roles - "Base" — base filter applied to all users group_key: Rule grouping key (optional). description: Rule description (optional).
Update an RLS rule. CRITICAL: Superset PUT API REPLACES the roles and tables fields entirely. If you pass only roles without tables, Superset will WIPE tables with an empty list (and vice versa). Therefore, this tool REQUIRES passing roles and tables simultaneously if either one is specified. For safe updates: 1. First get the current rule via rls_list 2. Pass BOTH roles AND tables (even if you only change one) Args: rls_id: ID of the RLS rule to update. name: New name. filter_type: New type: "Regular" or "Base". clause: New SQL WHERE condition (without the WHERE keyword). tables: List of dataset IDs (REPLACES all current). REQUIRED if roles is specified. roles: List of role IDs (REPLACES all current). REQUIRED if tables is specified. group_key: New grouping key. description: New description.
Delete an RLS rule. Restrictions for associated roles will be lifted. CRITICAL: deleting a deny-by-default rule (clause='1=0') will immediately expose ALL data to users with those roles. Args: rls_id: ID of the RLS rule to delete. confirm_delete: Deletion confirmation (REQUIRED).
List Superset tags. Tags are used to group and organize dashboards, charts, and datasets. IMPORTANT: always call before tag_get/tag_update to find current IDs. When creating a tag, the API returns {} without an ID — use tag_list to get the ID. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for search. Examples: - By name: (filters:!((col:name,opr:ct,value:search_term))) get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get tag information by ID. IMPORTANT: if the ID is unknown, call superset_tag_list first. Args: tag_id: Tag ID (integer from tag_list result).
Create a new tag and optionally attach it to Superset objects. IMPORTANT: Superset API returns {} on creation (without tag ID). To get the new tag's ID, call superset_tag_list after creation. Object attachment is only possible during creation via objects_to_tag. Direct attachment endpoints (POST/DELETE /api/v1/tag/{type}/{id}/) do not work in 6.0.1. Args: name: Tag name. description: Tag description (optional). objects_to_tag: JSON string with a list of objects to tag. Format: [["dashboard", 1], ["chart", 5], ["dataset", 3], ["saved_query", 2]] Each element is a pair [object_type, object_id]. Allowed types: "dashboard", "chart", "dataset", "saved_query".
Update a tag (rename or change description). IMPORTANT: the name field is REQUIRED in Superset 6.0.1 — even if the name is not changing, it must be provided. Without it, Superset returns 500. Args: tag_id: Tag ID to update. name: Tag name (REQUIRED, even if unchanged). description: New description (optional).
Delete a tag. All object attachments will be removed. Args: tag_id: Tag ID to delete. confirm_delete: Deletion confirmation (REQUIRED).
Get objects tagged with the specified tags. Returns dashboards, charts, datasets, and queries with the specified tags. Args: tags: Comma-separated tag names (e.g. "analytics,production"). If not specified, returns all tagged objects. page: Page number (starting from 0). page_size: Number of records per page (max 100). get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Bulk-create tags with object attachments. Allows creating multiple tags and attaching them to objects in a single request. Args: tags: JSON string with a list of tags. Format: [ {"name": "production", "objects_to_tag": [["dashboard", 1], ["chart", 5]]}, {"name": "analytics", "objects_to_tag": [["dataset", 3]]} ] objects_to_tag: pairs of [object_type, object_id]. Allowed types: "dashboard", "chart", "dataset", "saved_query".
List Superset reports and alerts. Reports send periodic screenshots of dashboards/charts. Alerts send notifications when a SQL condition is met. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for search. Examples: - By name: (filters:!((col:name,opr:ct,value:search_term))) - By type: (filters:!((col:type,opr:eq,value:Report))) - Active only: (filters:!((col:active,opr:eq,value:!t))) get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get detailed information about a report/alert by ID. IMPORTANT: if the ID is unknown, call superset_report_list first. Args: report_id: Report ID (integer from report_list result).
Create a report (periodic delivery) or alert (SQL-condition based). For Report: specify dashboard or chart — Superset will send a screenshot on schedule. For Alert: specify database and sql — Superset checks the condition and notifies on trigger. Args: name: Report/alert name. crontab: Cron schedule. Examples: - "0 9 * * *" — every day at 9:00 - "0 9 * * 1" — every Monday at 9:00 - "0 */6 * * *" — every 6 hours report_type: Type: "Report" (periodic delivery, default) or "Alert" (condition-based). dashboard: Dashboard ID for screenshot (for Report). chart: Chart ID for screenshot (for Report). database: Database connection ID (for Alert — SQL condition). sql: SQL query for condition check (for Alert). The alert triggers when the query returns a non-empty result. recipients: JSON string with recipient list. Format: [{"type": "Email", "recipient_config_json": {"target": "[email protected]"}}] active: Whether active (default True).
Update a report/alert. Pass only the fields to change. Args: report_id: Report ID to update. name: New name. crontab: New cron schedule (e.g. "0 9 * * *"). active: Enable/disable the report. recipients: JSON string with new recipient list (REPLACES all current recipients).
Delete a report/alert. The delivery schedule will be stopped. Args: report_id: Report ID to delete. confirm_delete: Deletion confirmation (REQUIRED).
List annotation layers. An annotation layer is a container for annotations (timeline events) that can be overlaid on charts. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
List annotations in the specified layer. Args: annotation_layer_id: Annotation layer ID (from annotation_layer_list). page: Page number (starting from 0). page_size: Number of records per page (max 100). get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get recent activity of the current user (views, edits). Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get the audit log of all Superset user actions. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for search. Examples: - By user: (filters:!((col:user,opr:rel_o_m,value:1))) - By action: (filters:!((col:action,opr:ct,value:explore))) get_all: Fetch ALL records with automatic pagination (ignores page/page_size).
Get the Superset navigation menu structure. Useful for understanding available sections and the current user's permissions.
Get the base URL of the configured Superset instance. Returns the URL used by the MCP server to connect to Superset.
Create a new annotation layer. A layer is a container for annotations that can be overlaid on time-series charts. Args: name: Layer name. descr: Layer description (optional).
Get annotation layer information by ID. IMPORTANT: if the ID is unknown, call annotation_layer_list first. Args: annotation_layer_id: Layer ID (from annotation_layer_list).
Update an annotation layer. Pass only the fields to change. Args: annotation_layer_id: Layer ID to update. name: New layer name. descr: New layer description.
Delete an annotation layer along with all its annotations. CRITICAL: deletes the layer AND all annotations within it permanently. Args: annotation_layer_id: Layer ID to delete. confirm_delete: Deletion confirmation (REQUIRED).
Create an annotation (timeline event) in the specified layer. Annotations are displayed as vertical lines or areas on time-series charts. Args: annotation_layer_id: Annotation layer ID (from annotation_layer_list). short_descr: Brief event description (displayed on the chart). start_dttm: Start datetime in ISO format. Example: "2024-01-01T00:00:00" end_dttm: End datetime in ISO format. Example: "2024-01-01T23:59:59" For a point-in-time event, set start_dttm = end_dttm. long_descr: Detailed event description (optional). json_metadata: JSON string with additional metadata (optional).
Get an annotation by ID. Args: annotation_layer_id: Annotation layer ID. annotation_id: Annotation ID (from annotation_list).
Update an annotation. Pass only the fields to change. Args: annotation_layer_id: Annotation layer ID. annotation_id: Annotation ID to update. short_descr: New brief description. start_dttm: New start datetime (ISO format: "2024-01-01T00:00:00"). end_dttm: New end datetime (ISO format). long_descr: New detailed description.
Delete an annotation from a layer. Args: annotation_layer_id: Annotation layer ID. annotation_id: Annotation ID to delete. confirm_delete: Deletion confirmation (REQUIRED).
Export ALL Superset assets into a single ZIP file. Includes: dashboards, charts, datasets, database connections (without passwords). Useful for backup or migration between instances. Returns: JSON: {"format": "zip", "encoding": "base64", "data": "...", "size_bytes": N}
Import Superset assets from a ZIP file (created via assets_export). CRITICAL: overwrite=True overwrites ALL matching objects (dashboards, charts, datasets, databases). This is irreversible. Args: file_path: Absolute path to the ZIP file on disk. overwrite: Overwrite existing objects with matching UUIDs (default False). confirm_overwrite: Overwrite confirmation (REQUIRED when overwrite=True).
List Superset user groups. A group combines users and roles. Users in a group inherit all roles assigned to the group. Args: page: Page number (starting from 0). page_size: Number of records per page (max 100). q: RISON filter for search. Examples: - By name: (filters:!((col:name,opr:ct,value:moscow))) get_all: Fetch ALL records with automatic pagination.
Get detailed information about a group by ID. Returns: name, label, description, list of roles and users. Args: group_id: Group ID (from group_list).
Create a new user group. A group combines users and roles. Users in a group automatically inherit all roles of the group. Args: name: Unique group name (e.g. "la_region_Moscow"). label: Display label (e.g. "Moscow region"). description: Group description. roles: List of role IDs to assign to the group. users: List of user IDs to add to the group.
Update a group. Only pass the fields you want to change. IMPORTANT: roles REPLACES the entire role list of the group (does not append). IMPORTANT: users REPLACES the entire user list of the group (does not append). To add a single role/user: fetch current ones via group_get, add the ID to the list, pass the complete list. Args: group_id: ID of the group to update. name: New group name. label: New label. description: New description. roles: New COMPLETE list of role IDs (REPLACES all current ones). users: New COMPLETE list of user IDs (REPLACES all current ones). confirm_roles_replace: Confirmation for role replacement (REQUIRED when roles is set). confirm_users_replace: Confirmation for user replacement (REQUIRED when users is set).
Delete a user group. Users in the group are NOT deleted, but they lose the roles that were assigned through this group. Args: group_id: ID of the group to delete. confirm_delete: Deletion confirmation (REQUIRED).
Add users to a group without removing existing ones. Convenience tool: fetches current group users, merges in new ones, and updates the group. Args: group_id: Group ID. user_ids: List of user IDs to add.
Remove users from a group without removing the rest. Args: group_id: Group ID. user_ids: List of user IDs to remove from the group.
Add roles to a group without removing existing ones. Args: group_id: Group ID. role_ids: List of role IDs to add.
Remove roles from a group without removing the rest. Args: group_id: Group ID. role_ids: List of role IDs to remove.
Audit access rights: user x dashboards/datasets/RLS permission matrix. For each user shows: - Groups they belong to - Effective roles (direct + inherited from groups) - Access to each dashboard (1/0) — based on datasource_access - Access to each dataset (1/0) - Available regions via RLS Args: page: Results page (starting from 0). page_size: Users per page (max 50). username_filter: Filter by username (substring match). include_admin: Include Admin users (they have access to everything).
概览
What is Mcp Superset?
Mcp Superset is a comprehensive MCP server for Apache Superset, providing 135+ tools covering full platform management including dashboards, charts, databases, datasets, SQL Lab, security, audit, and system administration.
How to use Mcp Superset?
Install via pip install mcp-superset or run with uvx mcp-superset. The server supports Streamable HTTP, SSE, and stdio transports.
Key features of Mcp Superset
- 135+ tools across 7 categories (dashboards, charts, databases, datasets, SQL Lab, security, system)
- 22 security tools: users, roles, permissions, RLS, groups, dashboard access grant/revoke
- 18 database tools: CRUD, schemas, tables, metadata, validation, connection testing
- 15 dashboard tools: CRUD, copy, publish/unpublish, native filters, export/import, embedded
- 11 chart tools: CRUD, copy, data retrieval, cache warmup, export/import
- 30+ built-in validations and safety checks (destructive operation confirmations, DDL/DML blocking)
- Supports Streamable HTTP, SSE, and stdio transports
Use cases of Mcp Superset
- Automate Superset administration (users, roles, permissions, RLS policies) via MCP
- Manage dashboards and charts programmatically (create, update, publish, export/import)
- Interact with databases and datasets: schema refresh, table exploration, connection testing
- Execute and format SQL queries, estimate costs, and export results
- Audit user entitlements with a permissions matrix (user × dashboards × datasets × RLS)
FAQ from Mcp Superset
What types of transports does Mcp Superset support?
Streamable HTTP, SSE, and stdio transports.
How is safety handled for destructive operations?
The server includes 30+ built-in validations: confirmation flags for destructive actions, DDL/DML blocking in SQL Lab, and automatic datasource_access synchronization.
How do I install Mcp Superset?
Install via pip install mcp-superset or run with uvx mcp-superset.
Can I manage security and access control through this server?
Yes, there are 22 security tools covering users, roles, permissions, Row Level Security, groups, and dashboard access grant/revoke.
What Superset features are covered?
The server covers dashboards (15 tools), charts (11), databases (18), datasets (11), SQL Lab (5), security (22), audit (permissions matrix), and system (21 tools including reports, annotations, tags, logs, assets).
其他 分类下的更多 MCP 服务器
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
评论