Skip to main content
Glama

superset-mcp

用于 Apache Superset 的 MCP (Model Context Protocol) 服务器。为 AI 助手提供对您的 Superset 实例的完全访问权限——包括仪表板、图表、数据集、数据库和 SQL 执行功能。

前置要求

  • uv — Python 包管理器

  • 拥有一个正在运行的 Apache Superset 实例的访问权限

Related MCP server: Zaturn

设置(耗时约 1 分钟)

1. 克隆仓库

git clone <repo-url>
cd superset-mcp

2. 配置凭据

cp .env.example .env

编辑 .env 文件:

SUPERSET_URL=http://your-superset-host:8088
SUPERSET_USERNAME=your-username
SUPERSET_PASSWORD=your-password

3. 测试是否正常工作

uv run superset-mcp

您应该能看到 MCP 服务器启动且没有报错。按 Ctrl+C 停止。


连接到您的 AI 客户端

将 /ABSOLUTE/PATH/TO/superset-mcp 替换为您克隆仓库的实际路径。

Claude Code

添加到 ~/.claude/settings.json(或项目级的 .claude/settings.json):

{
  "mcpServers": {
    "superset": {
      "command": "uv",
      "args": ["--directory", "/ABSOLUTE/PATH/TO/superset-mcp", "run", "superset-mcp"],
      "env": {
        "SUPERSET_URL": "http://your-superset-host:8088",
        "SUPERSET_USERNAME": "your-username",
        "SUPERSET_PASSWORD": "your-password"
      }
    }
  }
}

或者在终端运行:

claude mcp add superset -- uv --directory /ABSOLUTE/PATH/TO/superset-mcp run superset-mcp

Claude Desktop

添加到 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "superset": {
      "command": "uv",
      "args": ["--directory", "/ABSOLUTE/PATH/TO/superset-mcp", "run", "superset-mcp"],
      "env": {
        "SUPERSET_URL": "http://your-superset-host:8088",
        "SUPERSET_USERNAME": "your-username",
        "SUPERSET_PASSWORD": "your-password"
      }
    }
  }
}

Cursor

添加到项目中的 .cursor/mcp.json 或全局的 ~/.cursor/mcp.json:

{
  "mcpServers": {
    "superset": {
      "command": "uv",
      "args": ["--directory", "/ABSOLUTE/PATH/TO/superset-mcp", "run", "superset-mcp"],
      "env": {
        "SUPERSET_URL": "http://your-superset-host:8088",
        "SUPERSET_USERNAME": "your-username",
        "SUPERSET_PASSWORD": "your-password"
      }
    }
  }
}

可用工具

仪表板 (Dashboards)

工具

描述

list_dashboards

列出所有仪表板(支持可选搜索)

get_dashboard

通过 ID 或 slug 获取仪表板

get_dashboard_charts

获取仪表板中的所有图表

get_dashboard_datasets

获取仪表板使用的所有数据集

create_dashboard

创建新仪表板

update_dashboard

更新标题、布局、元数据

publish_dashboard

发布草稿仪表板

copy_dashboard

复制仪表板

delete_dashboard

删除仪表板

图表 (Charts)

工具

描述

list_charts

列出所有图表(支持可选搜索)

get_chart

通过 ID 或 UUID 获取图表

get_chart_data

获取图表的最新数据

create_chart

创建新图表

update_chart

更新图表属性

delete_chart

删除图表

数据集 (Datasets)

工具

描述

list_datasets

列出所有数据集

get_dataset

通过 ID 或 UUID 获取数据集

create_dataset

从表或 SQL 查询创建数据集

get_or_create_dataset

获取现有数据集或创建新数据集

refresh_dataset

从源表同步列信息

update_dataset

更新数据集属性

get_dataset_related_objects

查看哪些图表/仪表板使用了该数据集

delete_dataset

删除数据集

数据库 (Databases)

工具

描述

list_databases

列出所有数据库连接

get_database

通过 ID 获取数据库连接

list_schemas

列出数据库中的模式 (schemas)

list_tables

列出模式中的表

get_table_metadata

获取表的列信息

get_select_star

获取表的 SELECT * 模板

SQL

工具

描述

execute_sql

运行 SQL 查询并获取结果

format_sql

格式化 SQL 查询

estimate_query_cost

估算查询成本(如果支持)

list_saved_queries

列出已保存的 SQL 查询

save_query

保存 SQL 查询


示例提示词

连接到 AI 助手后,您可以尝试:

  • "列出所有已发布的仪表板"

  • "创建一个名为 'Sales Overview' 的新仪表板"

  • "显示仪表板 11 中的所有图表"

  • "在数据库 2 上运行 SQL 查询:SELECT count() FROM orders"*

  • "'Revenue' 仪表板使用了哪些数据集?"

  • "使用数据集 5 创建一个显示各地区销售额的柱状图"

Available Tools

34 tools
copy_dashboardC

Create a copy of a dashboard.

Inputs: id_or_slug (required). Returns: object

create_chartC

Create a new chart.

Inputs: slice_name (required), viz_type (required), datasource_id (required), datasource_type, +3 more. Returns: object

create_dashboardC

Create a new dashboard.

Inputs: title (required), slug, published, json_metadata, +1 more. Returns: object

create_datasetB

Create a dataset from a table or SQL query.

Inputs: database_id (required), table_name (required), schema, sql, +1 more. Returns: object

delete_chartC

Delete a chart by ID.

Inputs: pk (required). Returns: object

delete_dashboardC

Delete a dashboard by ID.

Inputs: pk (required). Returns: object

delete_datasetB

Delete a dataset by ID.

Inputs: pk (required). Returns: object

estimate_query_costC

Estimate the cost of running a SQL query (supported databases only).

Inputs: database_id (required), sql (required), schema. Returns: object

execute_sqlB

Execute a SQL query and return results.

Inputs: database_id (required), sql (required), schema, limit. Returns: object

format_sqlB

Format/pretty-print a SQL query.

Inputs: sql (required). Returns: object

get_chartC

Get a chart by ID or UUID.

Inputs: id_or_uuid (required). Returns: object

get_chart_dataC

Fetch the latest data for a chart.

Inputs: pk (required). Returns: object

get_dashboardB

Get a single dashboard by ID or slug.

Inputs: id_or_slug (required). Returns: object

get_dashboard_chartsB

Get all charts in a dashboard.

Inputs: id_or_slug (required). Returns: object

get_dashboard_datasetsB

Get all datasets used by a dashboard.

Inputs: id_or_slug (required). Returns: object

get_databaseB

Get a database connection by ID.

Inputs: pk (required). Returns: object

get_datasetB

Get a dataset by ID or UUID.

Inputs: id_or_uuid (required). Returns: object

get_or_create_datasetB

Get an existing dataset or create it if it doesn't exist.

Inputs: database_id (required), table_name (required), schema. Returns: object

get_select_starC

Get a SELECT * query for a table (with schema).

Inputs: database_id (required), table_name (required), schema. Returns: object

get_table_metadataC

Get column metadata for a table.

Inputs: database_id (required), table_name (required), schema. Returns: object

list_chartsC

List charts. Optionally filter by name.

Inputs: page, page_size, search. Returns: object

list_dashboardsB

List dashboards. Optionally filter by title with search.

Inputs: page, page_size, search. Returns: object

list_databasesB

List all database connections configured in Superset.

Inputs: page, page_size. Returns: object

list_datasetsC

List datasets (virtual or physical tables).

Inputs: page, page_size, search. Returns: object

list_saved_queriesB

List saved SQL queries.

Inputs: page, page_size. Returns: object

list_schemasB

List all schemas in a database.

Inputs: database_id (required). Returns: object

list_tablesB

List tables in a database schema.

Inputs: database_id (required), schema. Returns: object

publish_dashboardC

Set a dashboard as published.

Inputs: pk (required). Returns: object

refresh_datasetC

Refresh the dataset's columns and metrics from the source.

Inputs: pk (required). Returns: object

save_queryC

Save a SQL query.

Inputs: label (required), sql (required), database_id (required), schema, +1 more. Returns: object

update_chartC

Update a chart's properties.

Inputs: pk (required), slice_name, description, viz_type, +2 more. Returns: object

update_dashboardC

Update an existing dashboard.

Inputs: pk (required), title, published, json_metadata, +1 more. Returns: object

update_datasetC

Update a dataset's properties.

Inputs: pk (required), table_name, description, sql, +3 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 34 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose targeting specific resources (charts, dashboards, datasets, databases, queries) and actions (create, get, list, update, delete, execute, format, etc.), with no apparent overlap or ambiguity. For example, get_chart, get_chart_data, and list_charts serve different functions without confusion.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, such as create_chart, delete_dashboard, list_datasets, and update_dataset, with no deviations in style or convention. This predictability makes the tool set easy to navigate and understand.

    Tool Count3/5

    With 34 tools, the count is borderline high for typical MCP server scopes, which often range from 3-15 tools. While it covers a comprehensive Superset domain, it may feel heavy and potentially overwhelming for agents, though not extreme like 50+ tools.

    Completeness5/5

    The tool surface provides complete CRUD/lifecycle coverage for charts, dashboards, datasets, and queries, along with execution, formatting, and metadata operations. There are no obvious gaps; agents can perform all core workflows from creation to deletion and analysis without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      MCP server enabling AI agents to programmatically connect to and control Apache Superset instances, allowing users to manage dashboards, charts, databases, datasets, and run SQL queries through natural language interactions.
      60
      195
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An open-source MCP server that connects to various data sources (SQL databases, CSV, Parquet files), allowing AI models to execute SQL queries and generate data visualizations for analytics and business intelligence.
      12
      75
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      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.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that enables AI assistants to query databases, execute SQL, and manage Metabase resources like dashboards, cards, and collections through natural language.
      22
      MIT