You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "betodealmeida (via GitHub)" <gi...@apache.org> on 2025/06/24 16:23:18 UTC
Re: [I] [SIP-171] Proposal for Model Context Protocol (MCP) Service [superset]
betodealmeida commented on issue #33870:
URL: https://github.com/apache/superset/issues/33870#issuecomment-3001127174
Love this!
One thing that I would like to see in Superset in general, not just for MCP, is the a ability to run blueprints either in-app or in a separate app. For example, if SQL Lab was written as a blueprint we could mount it in the main Superset app:
```python
# superset/app.py
from superset.sqllab import blueprint as sqllab_bp
def create_app(
superset_config_module: Optional[str] = None,
superset_app_root: Optional[str] = None,
) -> Flask:
app = SupersetApp(__name__)
app.register_blueprint(sqllab_bp)
```
But if someone wants to scale horizontally they could run the SQL Lab blueprint app in a separate Flask app in a separate container. We could imagine something like this:
```python
# superset_config.py
SQLLAB_ENDPOINT: str | None = "http://10.0.0.1:9000"
```
```python
# superset/app.py
from superset.sqllab import blueprint as sqllab_bp
def create_app(
superset_config_module: Optional[str] = None,
superset_app_root: Optional[str] = None,
) -> Flask:
app = SupersetApp(__name__)
if not SQLLAB_ENDPOINT:
app.register_blueprint(sqllab_bp)
SQLLAB_ENDPOINT = url_for("sqllab_bp.index", _external=True)
```
Then we'd expose `SQLLAB_ENDPOINT` to the frontend, for all SQL Lab API calls.
If we did this for MCP, users would have the option of running a single app, with the MCP blueprint mounted directly in the Superset app; or run a separate app for the MCP server via `superset mcp run --port 5008`. The former is easier for beginners and for testing, while the latter is more robust and scalable.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org