aminghadersohi opened a new pull request, #35160:
URL: https://github.com/apache/superset/pull/35160
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
This PR introduces the basic scaffold for the Superset MCP (Model Context
Protocol) service, enabling AI agents to interact programmatically with Apache
Superset.
**Rationale:**
Breaking this into smaller PRs makes it easier for reviewers to evaluate the
changes incrementally rather than reviewing a large implementation all at once.
**What's Included:**
- CLI commands: `superset mcp run` and `superset mcp setup`
- Basic FastMCP server using HTTP transport
- Flask integration for Superset context
- Configuration setup script
- Development environment support
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
N/A - This PR adds backend service scaffolding only, no UI changes.
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
1. **Verify the MCP service can be imported without errors:**
```bash
python -c "import superset.mcp_service; print('✅ MCP service imports
successfully')"
```
Expected output: `✅ MCP service imports successfully`
2. **Test the CLI commands are available:**
```bash
superset --help | grep mcp
```
Expected output: Shows `mcp` command group
3. **Run the setup command:**
```bash
superset mcp setup
```
Expected: Creates/updates `superset_config.py` with MCP settings
4. **Test the MCP server startup (optional):**
```bash
# Note: This requires superset to be running and fastmcp installed
superset mcp run --help
```
Expected: Shows help for MCP server options
5. **Verify no impact on existing Superset:**
```bash
# Start Superset normally
superset run -p 8088 --with-threads --reload
# Navigate to http://localhost:8088
# Verify all existing functionality works as expected
```
6. **Run pre-commit checks:**
```bash
pre-commit run --all-files
```
All checks should pass (mypy, ruff, pylint)
7. **Test Node.js proxy (if Node.js available):**
```bash
cd superset/mcp_service
node index.js --help
```
Expected: Shows Node.js MCP proxy options
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [x] Introduces new feature or API
- [ ] Removes existing feature or API
**Notes:**
- Foundational scaffold with minimal functionality, completely isolated from
existing code
- Requires `fastmcp` library (added to `requirements/development.in`)
- Zero risk - no impact on existing Superset functionality
--
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]