Skip to main content
Glama

Superset MCP Integration

by aptro

Superset MCP 集成

MCP 服务器用于与 Apache Superset 交互,使 AI 代理能够以编程方式连接和控制 Superset 实例。

设置说明

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Superset Integration:

npx -y @smithery/cli install @aptro/superset-mcp --client claude

手动安装

  1. 本地设置 Superset运行此脚本以在本地启动 Superset:
    git clone --branch 4.1.1 --depth 1 https://github.com/apache/superset && \ cd superset && \ docker compose -f docker-compose-image-tag.yml up
    一旦 Superset 运行,您应该能够使用默认凭据通过http://localhost:8088访问它:
    • 用户名:admin
    • 密码:admin
  2. 克隆此存储库将此存储库克隆到您的本地机器。
  3. 配置环境变量使用您的 Superset 凭据在根目录中创建一个.env文件:
    SUPERSET_BASE_URL=http://localhost:8088 # Change to your Superset URL SUPERSET_USERNAME=your_username SUPERSET_PASSWORD=your_password
  4. 安装依赖项
    uv pip install .
  5. 为 Claude 安装 MCP 配置与 Claude 桌面应用程序一起使用:
    mcp install main.py

与 Claude 一起使用

设置完成后,您可以通过 Claude 使用自然语言请求与 Superset 实例进行交互。以下是一些示例:

仪表板管理

  • 查看仪表板:“显示我所有的 Superset 仪表板”
  • 获取仪表板详细信息:“显示 ID 为 5 的仪表板的详细信息”
  • 创建仪表板:“创建一个名为‘销售概览’的新仪表板”
  • 更新仪表板:“更新仪表板 3,使其标题为‘更新销售报告’”
  • 删除仪表板:“删除 ID 为 7 的仪表板”

图表管理

  • 列出所有图表:“我的 Superset 实例中有哪些图表?”
  • 查看图表详情:“显示 ID 为 10 的图表详情”
  • 创建图表:“使用数据集 3 创建新的条形图”
  • 更新图表:“更新图表 5 以使用线形图而不是条形图”
  • 删除图表:“删除 ID 为 12 的图表”

数据库和数据集操作

  • 列出数据库:“显示所有连接到 Superset 的数据库”
  • 列出数据集:“我的 Superset 实例中有哪些可用的数据集?”
  • 获取数据库表:“ID 为 1 的数据库中有哪些表?”
  • 执行 SQL :“在数据库 1 上运行此 SQL 查询:SELECT * FROM users LIMIT 10”
  • 创建数据集:“从数据库 2 中的表‘customers’创建一个新的数据集”
  • 更新数据库:“更新数据库 3 的连接设置”
  • 删除数据库:“删除 ID 为 4 的数据库连接”
  • 验证 SQL :“此 SQL 对数据库 2 有效吗:SELECT * FROM customer JOIN orders”
  • 获取数据库目录:“显示数据库 1 中可用的目录”
  • 获取数据库功能:“数据库 2 中有哪些可用功能?”
  • 检查相关对象:“哪些仪表板和图表使用数据库 1?”

SQL 实验室功能

  • 执行查询:“运行此 SQL 查询:SELECT COUNT(*) FROM orders”
  • 格式化 SQL :“格式化此 SQL 查询:SELECT id,name,age FROM users WHERE age>21”
  • 估计查询成本:“估计此查询的成本:SELECT * FROM large_table”
  • 获取已保存的查询:“显示我所有已保存的 SQL 查询”
  • 获取查询结果:“获取键值为‘abc123’的查询结果”

用户和系统信息

  • 查看用户信息:“我以谁的身份登录?”
  • 获取用户角色:“我在 Superset 中拥有什么角色?”
  • 查看最近活动:“显示我的 Superset 实例中的最近活动”
  • 获取菜单数据:“我可以访问哪些菜单项?”
  • 获取基本 URL :“我连接到的 Superset 实例的 URL 是什么?”

标签管理

  • 列出标签:“显示我的 Superset 实例中的所有标签”
  • 创建标签:“创建一个名为‘财务’的新标签”
  • 删除标签:“删除ID为5的标签”
  • 标记对象:“将标签‘财务’添加到仪表板 3”
  • 删除标签:“从图表 7 中删除‘财务’标签”

可用的 MCP 工具

该插件提供了 Claude 可以使用的以下 MCP 工具:

验证

  • superset_auth_check_token_validity - 检查当前访问令牌是否有效
  • superset_auth_refresh_token - 刷新访问令牌
  • superset_auth_authenticate_user - 使用 Superset 进行身份验证

仪表板

  • superset_dashboard_list - 列出所有仪表板
  • superset_dashboard_get_by_id - 获取特定的仪表板
  • superset_dashboard_create - 创建新的仪表板
  • superset_dashboard_update - 更新现有仪表板
  • superset_dashboard_delete - 删除仪表板

图表

  • superset_chart_list - 列出所有图表
  • superset_chart_get_by_id - 获取特定图表
  • superset_chart_create - 创建新图表
  • superset_chart_update - 更新现有图表
  • superset_chart_delete - 删除图表

数据库

  • superset_database_list - 列出所有数据库
  • superset_database_get_by_id - 获取特定数据库
  • superset_database_create - 创建新的数据库连接
  • superset_database_get_tables - 列出数据库中的表
  • superset_database_schemas - 获取数据库的模式
  • superset_database_test_connection - 测试数据库连接
  • superset_database_update - 更新现有的数据库连接
  • superset_database_delete - 删除数据库连接
  • superset_database_get_catalogs - 获取数据库的目录
  • superset_database_get_connection - 获取数据库连接信息
  • superset_database_get_function_names - 获取数据库支持的函数名称
  • superset_database_get_related_objects - 获取与数据库关联的图表和仪表板
  • superset_database_validate_sql - 针对数据库验证任意 SQL
  • superset_database_validate_parameters - 验证数据库连接参数

数据集

  • superset_dataset_list - 列出所有数据集
  • superset_dataset_get_by_id - 获取特定数据集
  • superset_dataset_create - 创建新的数据集

SQL实验室

  • superset_sqllab_execute_query - 执行 SQL 查询
  • superset_sqllab_get_saved_queries - 列出已保存的 SQL 查询
  • superset_sqllab_format_sql - 格式化 SQL 查询
  • superset_sqllab_get_results - 获取查询结果
  • superset_sqllab_estimate_query_cost - 估计查询成本
  • superset_sqllab_export_query_results - 将查询结果导出为 CSV
  • superset_sqllab_get_bootstrap_data - 获取 SQL Lab 引导数据

查询

  • superset_query_list - 列出所有查询
  • superset_query_get_by_id - 获取特定查询
  • superset_query_stop - 停止正在运行的查询

已保存的查询

  • superset_saved_query_get_by_id - 获取特定的已保存查询
  • superset_saved_query_create - 创建一个新的已保存查询

用户信息

  • superset_user_get_current - 获取当前用户信息
  • superset_user_get_roles - 获取用户角色

活动

  • superset_activity_get_recent - 获取最近的活动数据

系统

  • superset_menu_get - 获取菜单数据
  • superset_config_get_base_url - 获取 Superset 实例的基本 URL

标签

  • superset_tag_list - 列出所有标签
  • superset_tag_create - 创建新标签
  • superset_tag_get_by_id - 获取特定标签
  • superset_tag_objects - 获取与标签关联的对象
  • superset_tag_delete - 删除标签
  • superset_tag_object_add - 为对象添加标签
  • superset_tag_object_remove - 从对象中删除标签

探索工具

  • superset_explore_form_data_create - 创建用于图表探索的表单数据
  • superset_explore_form_data_get - 获取用于图表探索的表单数据
  • superset_explore_permalink_create - 创建用于图表探索的永久链接
  • superset_explore_permalink_get - 获取图表探索的永久链接

高级数据类型

  • superset_advanced_data_type_convert - 将值转换为高级数据类型
  • superset_advanced_data_type_list - 列出可用的高级数据类型

环境变量

多变的描述默认
超集基址您的 Superset 实例的 URLhttp://localhost:8088
超级集用户名Superset 的用户名没有任何
超级密码超级集密码没有任何

故障排除

  • 如果遇到身份验证问题,请在.env文件中验证您的凭据
  • 确保 Superset 正在运行,并且可以通过.env文件中指定的 URL 访问
  • 检查您使用的 Superset 版本是否兼容(已使用 4.1.1 版本测试)
  • 确保 MCP 服务器使用的端口未被其他应用程序使用

安全说明

  • 您的 Superset 凭证仅存储在本地.env文件中
  • 访问令牌存储在项目目录中的.superset_token文件中
  • 所有身份验证都直接在 MCP 服务器和 Superset 实例之间进行
  • 不会向 Claude 或任何第三方传输任何凭证
  • 对于生产用途,请考虑使用更安全的身份验证方法

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

MCP 服务器使 AI 代理能够以编程方式连接和控制 Apache Superset 实例,允许用户管理仪表板、图表、数据库、数据集并通过自然语言交互运行 SQL 查询。

  1. 设置说明
    1. 通过 Smithery 安装
    2. 手动安装
  2. 与 Claude 一起使用
    1. 仪表板管理
    2. 图表管理
    3. 数据库和数据集操作
    4. SQL 实验室功能
    5. 用户和系统信息
    6. 标签管理
  3. 可用的 MCP 工具
    1. 验证
    2. 仪表板
    3. 图表
    4. 数据库
    5. 数据集
    6. SQL实验室
    7. 查询
    8. 已保存的查询
    9. 用户信息
    10. 活动
    11. 系统
    12. 标签
    13. 探索工具
    14. 高级数据类型
  4. 环境变量
    1. 故障排除
      1. 安全说明
        1. 贡献
          1. 执照

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              An MCP server implementation that standardizes how AI applications access tools and context, providing a central hub that manages tool discovery, execution, and context management with a simplified configuration system.
              Last updated -
              9
              Python
              MIT License
            • -
              security
              A
              license
              -
              quality
              An MCP server that extends AI agents' context window by providing tools to store, retrieve, and search memories, allowing agents to maintain history and context across long interactions.
              Last updated -
              5
              TypeScript
              MIT License
            • -
              security
              A
              license
              -
              quality
              An MCP server that enables AI assistants to control a web browser through natural language commands, allowing them to navigate websites and extract information via SSE transport.
              Last updated -
              505
              Python
              MIT License
              • Apple
            • -
              security
              A
              license
              -
              quality
              An MCP server that bridges AI agents with GUI automation capabilities, allowing them to control mouse, keyboard, windows, and take screenshots to interact with desktop applications.
              Last updated -
              Python
              MIT License
              • Apple
              • Linux

            View all related MCP servers

            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/aptro/superset-mcp'

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