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

   ### SUMMARY
   
   Adds a new MCP mutation tool `create_plugin` that allows admin users to 
register dynamic (custom) plugins via the MCP service.
   
   The tool lives under `superset/mcp_service/plugin/` and follows the 
established mutation pattern used by `create_virtual_dataset`.
   
   **Key details:**
   - Tool name: `create_plugin`
   - Fields: `name` (required), `key` (required, unique plugin identifier 
matching package.json), `bundle_url` (required, full URL to the built plugin 
bundle)
   - Permission: `DynamicPlugin` / `write` — admin-only, same access level as 
the existing `DynamicPluginsView`
   - Feature-gated: returns a structured error if the `DYNAMIC_PLUGINS` feature 
flag is disabled
   - Handles duplicate-field `IntegrityError` gracefully without raising
   - Registered in `mcp_service/app.py` and included in the tool listing in 
instructions
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — backend-only change.
   
   ### TESTING INSTRUCTIONS
   
   1. Enable the `DYNAMIC_PLUGINS` feature flag in `superset_config.py`
   2. Connect to the MCP service as an admin user
   3. Call `create_plugin` with valid `name`, `key`, and `bundle_url`
   4. Verify the plugin appears in the Superset UI under Settings → Custom 
Plugins
   5. Verify that calling `create_plugin` with a duplicate `key` returns a 
structured error (not an exception)
   6. Verify that calling `create_plugin` without admin permissions is rejected
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags: `DYNAMIC_PLUGINS` must be enabled
   - [ ] 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


-- 
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