Skip to main content
Glama

superset-mcp

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

前置要求

  • uv — Python 包管理器

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

设置(耗时约 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 创建一个显示各地区销售额的柱状图"

Install Server
A
security – no known vulnerabilities
F
license - not found
B
quality - B tier

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thedeceptio/superset-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server