Skip to content

Add Superset MCP as an optional component #1231

@bmtcril

Description

@bmtcril

Superset exposes a new MCP for integrating with LLMs. It should be fairly easy to integrate if we care to.

https://superset.apache.org/user-docs/using-superset/using-ai-with-superset
https://superset.apache.org/admin-docs/configuration/mcp-server/

In my brief testing I've learned the following:

  • 6.0.0, 5.0.0, and master images did not actually have the MCP command installed I had to test with a random tag (apache/superset:GHA-py312-24535948316)
  • Getting things running was easy, but I did not try integrating with our authentication or permissions
  • The version I tested with seemed to have more limited tools than advertised

To get running in dev mode (no auth, admin user so RBAC not tested):

  • Find a base Docker image to build with that actually has the MCP capability (superset mcp command)
  • Add fastmcp to Superset's requirements.txt
  • Add MCP_AUTH_ENABLED = False and MCP_DEV_USERNAME="your superset admin user from tutor env" to the superset_config.py
  • Add the MCP server to the local-docker-compose-services Tutor patch (see below)
  • Add the MCP server to the caddyfile Tutor patch (see below)

local-docker-compose-services patch:

superset-mcp:
  {% include 'base-docker-compose-services' %}
    OPENEDX_LMS_ROOT_URL: "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}"
    OAUTH2_CLIENT_ID: {{ SUPERSET_OAUTH2_CLIENT_ID }}
    SUPERSET_ENV: production
  command: ["superset", "mcp", "run", "--host", "0.0.0.0", "--port", "5008"]
  ports:
    - "5008:5008"
  depends_on:
    - superset

caddyfile patch:

# Superset MCP
superset-mcp.local.openedx.io{$default_site_port} {
    import proxy "superset-mcp:5008"
}

Configure your AI to use the server, with a URL of "url": "http://superset-mcp.local.openedx.io/mcp"

Real implementation

To actually release this we would need to integrate SSO so people would get their actual Superset user and permissions. Superset claims that doing things this way is as data-secure as using the Superset dashboards, but it remains to be seen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions