Skip to main content
Version: Next

Using AI with Superset

Superset supports AI assistants through the Model Context Protocol (MCP). Connect Claude, ChatGPT, or other MCP-compatible clients to explore your data, build charts, create dashboards, and run SQL -- all through natural language.

info

Requires Superset 5.0+. Your admin must enable and deploy the MCP server before you can connect. See the MCP Server admin guide for setup instructions.


What Can AI Do with Superset?​

Explore Your Data​

Ask your AI assistant to browse what's available in your Superset instance:

  • List datasets -- see all datasets you have access to, with filtering and search
  • Get dataset details -- column names, types, available metrics, and filters
  • List charts and dashboards -- find existing visualizations by name or keyword
  • Get chart and dashboard details -- understand what a chart shows, its query, and configuration

Example prompts:

"What datasets are available?" "Show me the columns in the sales_orders dataset" "Find dashboards related to revenue"

Build Charts​

Describe the visualization you want and AI creates it for you:

  • Create charts from natural language -- describe what you want to see and AI picks the right chart type, metrics, and dimensions
  • Preview before saving -- generate_chart defaults to save_chart=False, showing the chart in Explore before it's committed. Ask AI to save once you're satisfied.
  • Modify existing charts -- update_chart also supports preview mode so you can review changes before saving
  • Get Explore links -- open any chart in Superset's Explore view for further refinement

Example prompts:

"Create a bar chart showing monthly revenue by region from the sales dataset" "Update chart 42 to use a line chart instead" "Give me a link to explore this chart further"

Create Dashboards​

Build dashboards from a collection of charts:

  • Generate dashboards -- create a new dashboard with a set of charts, automatically laid out
  • Add charts to existing dashboards -- place a chart on an existing dashboard with automatic positioning

Example prompts:

"Create a dashboard called 'Q4 Sales Overview' with charts 10, 15, and 22" "Add the revenue trend chart to the executive dashboard"

Run SQL Queries​

Execute SQL directly through your AI assistant:

  • Run queries -- execute SQL with full Superset RBAC enforcement (you can only query data your roles allow)
  • Open SQL Lab -- get a link to SQL Lab pre-populated with a query, ready to run and explore

Example prompts:

"Run this query: SELECT region, SUM(revenue) FROM sales GROUP BY region" "Open SQL Lab with a query to show the top 10 customers by order count"

Analyze Chart Data​

Pull the raw data behind any chart:

  • Get chart data -- retrieve the data a chart displays, with support for JSON, CSV, and Excel export formats
  • Inspect results -- useful for verifying what a visualization shows or feeding data into other tools

Example prompts:

"Get the data behind chart 42" "Export chart 15 data as CSV"

Check Instance Status​

  • Health check -- verify your Superset instance is up and the MCP connection is working
  • Instance info -- get high-level statistics about your Superset instance (number of datasets, charts, dashboards)

Example prompts:

"Is Superset healthy?" "How many dashboards are in this instance?"


Connecting Your AI Client​

Once your admin has deployed the MCP server, connect your AI client using the instructions below.

Claude Desktop​

Edit your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"superset": {
"url": "http://localhost:5008/mcp"
}
}
}

Restart Claude Desktop. The hammer icon in the chat bar confirms the connection.

If your admin has enabled JWT authentication, you may need to include a token:

{
"mcpServers": {
"superset": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"http://your-superset-host:5008/mcp",
"--header",
"Authorization: Bearer YOUR_TOKEN"
]
}
}
}

Claude Code (CLI)​

Add to your project's .mcp.json:

{
"mcpServers": {
"superset": {
"type": "url",
"url": "http://localhost:5008/mcp"
}
}
}

ChatGPT​

  1. Click your profile icon > Settings > Apps and Connectors
  2. Enable Developer Mode in Advanced Settings
  3. In the chat composer, press + > Add sources > App > Connect more > Create app
  4. Enter a name and your MCP server URL
  5. Click I understand and continue
info

ChatGPT MCP connectors require a Pro, Team, Enterprise, or Edu plan.

Ask your admin for the MCP server URL and any authentication tokens you need.


Tips for Best Results​

  • Be specific -- "Create a bar chart of monthly revenue by region from the sales dataset" works better than "Make me a chart"
  • Start with exploration -- ask what datasets and charts exist before creating new ones
  • Review AI-generated content -- always check chart configurations and SQL before saving or sharing
  • Use Explore for refinement -- ask AI for an Explore link, then fine-tune interactively in the Superset UI
  • Check permissions if you get errors -- AI respects Superset's RBAC, so you can only access data your roles allow

Available Tools Reference​

Exploration & Discovery​

ToolDescription
health_checkVerify the MCP server is running and connected
get_instance_infoGet instance statistics (dataset, chart, dashboard counts)
get_home_page_infoGet a summary of home page resources
get_superset_config_infoExpose active Superset configuration details
get_schemaDiscover available charts, datasets, and dashboards with schema info
list_recent_activityList recent activity from the activity feed
list_chart_typesEnumerate available chart types

Datasets​

ToolDescription
list_datasetsList datasets with filtering and search
get_dataset_infoGet dataset metadata (columns, metrics, filters)
get_dataset_by_nameLook up a dataset by name

Charts​

ToolDescription
list_chartsList charts with filtering and search
get_chart_infoGet chart metadata and configuration
get_chart_by_nameLook up a chart by name
get_chart_dataRetrieve chart data (JSON, CSV, or Excel)
get_chart_data_by_urlRetrieve chart data from a chart URL
get_chart_data_by_explore_urlRetrieve chart data from an Explore URL
get_chart_previewGenerate a chart preview (URL, ASCII, table, or Vega-Lite)
get_chart_thumbnailFetch the cached thumbnail image for a chart
generate_chartCreate a new chart from a specification (defaults to preview mode — review before saving)
update_chartModify an existing chart's configuration (supports save_chart=False for preview mode)
update_chart_previewUpdate a cached chart preview without saving
delete_chartDelete a chart
list_chart_ownersList the owners of a chart
generate_explore_linkGenerate an Explore URL for interactive visualization
get_explore_linkGet an Explore link from MCP context
get_explore_link_by_urlGet an Explore link from a chart URL
get_explore_thumbnailFetch the cached thumbnail for an Explore view
open_explore_linkOpen an Explore link in the browser

Dashboards​

ToolDescription
list_dashboardsList dashboards with filtering and search
get_dashboard_infoGet dashboard metadata and layout
get_dashboard_by_nameLook up a dashboard by name
get_dashboard_thumbnailFetch the cached thumbnail image for a dashboard
generate_dashboardCreate a new dashboard with specified charts
update_dashboardModify an existing dashboard's metadata
delete_dashboardDelete a dashboard
add_chart_to_existing_dashboardAdd a chart to an existing dashboard
remove_chart_from_dashboardRemove a chart from a dashboard
move_chart_to_dashboardMove a chart from one dashboard to another
update_chart_positionReposition a chart within a dashboard
list_charts_in_dashboardList all charts within a specific dashboard
list_dashboard_ownersList the owners of a dashboard
open_dashboardOpen a dashboard in the browser
add_filter_to_dashboardAdd a native filter to a dashboard
list_dashboard_filtersList native filters on a dashboard
update_dashboard_filterUpdate a native filter on a dashboard
delete_dashboard_filterRemove a native filter from a dashboard
get_dashboard_filter_infoGet details about a specific dashboard filter
set_tab_orderReorder tabs in a tabbed dashboard
create_tabAdd a new tab to a tabbed dashboard
delete_tabRemove a tab from a tabbed dashboard
rename_tabRename a dashboard tab

SQL & Saved Queries​

ToolDescription
execute_sqlRun a SQL query with RBAC enforcement
open_sql_lab_with_contextOpen SQL Lab with a pre-populated query
open_sql_in_browserOpen a SQL query in the browser
list_saved_queriesList saved SQL queries from SQL Lab
create_saved_queryCreate a new saved query
update_saved_queryUpdate an existing saved query
delete_saved_queryDelete a saved query

Databases​

ToolDescription
list_databasesList configured database connections
get_database_infoGet details about a specific database connection
get_database_dialect_infoGet dialect details for a database

Reports & Alerts​

ToolDescription
list_reportsList configured alerts and reports
create_reportCreate a new alert or report
update_reportUpdate an existing alert or report
delete_reportDelete a report
get_report_infoGet details about a specific report

Users, Roles & Permissions​

ToolDescription
get_usersList users in the Superset instance
list_rolesList all roles
get_role_infoGet details and permissions for a specific role
list_permissionsList all available permissions
get_permission_infoGet details about a specific permission

Troubleshooting​

"Connection refused" or "Cannot connect"​

  • Confirm the MCP server URL with your admin
  • For Claude Desktop: fully quit the app (not just close the window) and restart after config changes
  • Check that the URL path ends with /mcp (e.g., http://localhost:5008/mcp)

"Permission denied" or missing data​

  • Superset's RBAC controls what you can access through AI, just like in the Superset UI
  • Ask your admin to verify your roles and permissions
  • Try accessing the same data through the Superset web UI to confirm your access

"Response too large"​

  • Ask for smaller result sets: use filters, reduce page_size, or request specific columns
  • Example: "Show me the top 10 rows from the sales dataset" instead of "Show me all sales data"

AI doesn't see Superset tools​

  • Verify the connection in your AI client (e.g., the hammer icon in Claude Desktop)
  • Ask the AI "What Superset tools are available?" to confirm the connection
  • Restart your AI client if you recently changed the configuration