aminghadersohi opened a new pull request, #35877:
URL: https://github.com/apache/superset/pull/35877

   ## Summary
   
   This PR contains miscellaneous improvements, bug fixes, and documentation 
enhancements for the Superset MCP service. This PR is being created as a 
placeholder for ongoing improvements and will be updated with additional 
changes.
   
   **Current changes:**
   - ✅ Renamed `MCP_ADMIN_USERNAME` to `MCP_DEV_USERNAME` for clarity
   - ✅ Enhanced MCP service instructions with common chart types and query 
examples
   
   **Additional changes coming soon:**
   - Bug fixes and improvements based on feedback
   - Performance optimizations
   - Additional documentation enhancements
   
   ## Changes
   
   ### 1. Configuration Naming Improvement
   
   **Renamed `MCP_ADMIN_USERNAME` to `MCP_DEV_USERNAME`**
   - More accurately reflects the purpose (development/testing user)
   - Avoids confusion with actual admin privileges
   - Better aligns with development workflow terminology
   
   **Files changed:**
   - `superset/mcp_service/mcp_config.py` - Updated default config key
   - `superset/mcp_service/auth.py` - Updated config reference
   - Documentation files updated to reflect new naming
   
   ### 2. Enhanced MCP Service Documentation
   
   **Added comprehensive chart type reference to MCP instructions**
   
   LLM clients now have better guidance on:
   
   **Interactive Charts** (support sorting, filtering, drill-down):
   - `table` - Standard table view with sorting and filtering
   - `pivot_table_v2` - Pivot table with grouping and aggregations
   - `echarts_timeseries_line` - Time series line chart
   - `echarts_timeseries_bar` - Time series bar chart
   - `echarts_timeseries_area` - Time series area chart
   - `echarts_timeseries_scatter` - Time series scatter plot
   - `mixed_timeseries` - Combined line/bar time series
   
   **Common Visualization Types:**
   - `big_number` - Single metric display
   - `big_number_total` - Total value display
   - `pie` - Pie chart for proportions
   - `funnel` - Funnel chart for conversion analysis
   - `gauge_chart` - Gauge/speedometer visualization
   - `heatmap_v2` - Heat map for correlation analysis
   - `sankey_v2` - Sankey diagram for flow visualization
   - `sunburst_v2` - Sunburst chart for hierarchical data
   - `treemap_v2` - Tree map for hierarchical proportions
   - `word_cloud` - Word cloud visualization
   - `world_map` - Geographic world map
   - `box_plot` - Box plot for distribution analysis
   - `bubble` - Bubble chart for 3-dimensional data
   
   **Query Examples:**
   ```python
   # List all interactive tables
   filters=[{"col": "viz_type", "opr": "in", "value": ["table", 
"pivot_table_v2"]}]
   
   # List time series charts
   filters=[{"col": "viz_type", "opr": "sw", "value": "echarts_timeseries"}]
   
   # Search by name
   search="sales"
   ```
   
   **Benefits:**
   - LLM clients can better understand available visualization options
   - Improved chart type selection based on data and use case
   - Better query construction with concrete examples
   
   ## Testing
   
   **All MCP service tests passing:**
   ```bash
   $ env PYTHONPATH=. pytest tests/unit_tests/mcp_service/ -q
   178 passed in 6.99s
   ```
   
   **Manual testing:**
   - ✅ Verified renamed config works with both old and new keys (backward 
compatible)
   - ✅ Tested MCP service startup with new configuration
   - ✅ Confirmed LLM clients receive enhanced instructions
   
   ## Migration Notes
   
   ### Configuration Update
   
   If you're using `MCP_ADMIN_USERNAME` in your `superset_config.py`:
   
   ```python
   # Old (still works, but deprecated)
   MCP_ADMIN_USERNAME = "admin"
   
   # New (recommended)
   MCP_DEV_USERNAME = "admin"
   ```
   
   **Backward compatibility:** The old config key still works but will show a 
deprecation notice in logs.
   
   ## Why This PR?
   
   This PR serves as a collection point for smaller improvements and fixes that 
don't warrant individual PRs but are important for MCP service quality and 
usability. Keeping them together:
   
   1. **Reduces PR overhead** - Smaller changes bundled logically
   2. **Easier review** - Related improvements reviewed together
   3. **Flexible updates** - Can add more changes before merge
   4. **Clean history** - One PR for misc improvements vs many tiny PRs
   
   ## Related PRs
   
   - **PR9:** DevContainer multi-config setup (base for this PR)
   - **PR8:** Field-level permissions security layer
   - **PR7:** MCP tool documentation (token-optimized)
   
   ## Checklist
   
   - [x] All tests passing (178/178 MCP tests)
   - [x] Pre-commit hooks passing
   - [x] Configuration backward compatible
   - [x] Documentation updated
   - [x] No breaking changes
   - [ ] Additional improvements to be added (PR remains open for updates)
   
   ## Future Additions to This PR
   
   This PR will be updated with additional improvements including:
   - Session management enhancements for HA deployments
   - Additional bug fixes based on user feedback
   - Performance optimizations
   - Documentation improvements
   
   **Note:** This is an intentionally flexible PR to avoid creating many small 
PRs for minor improvements. Additional commits will be added before final 
review.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to