aminghadersohi opened a new pull request, #36553:
URL: https://github.com/apache/superset/pull/36553
### SUMMARY
Enable FastMCP background task protocol (SEP-1686) for MCP tools, allowing
long-running operations to execute asynchronously with progress reporting.
**Changes:**
- Upgrade `fastmcp` dependency from `>=2.13.0.2` to `>=2.14.0`
- Add `task` parameter to `@tool` decorator infrastructure in both
`superset_core.mcp` and `core_mcp_injection.py`
- Enable `task=True` for three long-running tools:
- `execute_sql` - SQL query execution
- `generate_chart` - chart creation with validation and preview generation
- `generate_dashboard` - dashboard creation with chart layout
**Benefits:**
- Tools can now run in the background without blocking the MCP client
- Progress reporting via `ctx.report_progress()` shows step-by-step execution
- Better UX for complex operations that may take several seconds
- Clients can track, cancel, and retrieve results asynchronously
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A - API change, no UI modifications.
### TESTING INSTRUCTIONS
1. Install updated dependencies: `pip install -e .[fastmcp]`
2. Start the MCP server: `python -m superset.mcp_service`
3. Connect with an MCP client that supports the task protocol
4. Execute `execute_sql`, `generate_chart`, or `generate_dashboard`
5. Verify that progress is reported and operations complete successfully
### ADDITIONAL INFORMATION
- [x] Introduces new feature or API
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Removes existing feature or API
--
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]