You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "cabsil (via GitHub)" <gi...@apache.org> on 2026/03/17 22:17:06 UTC
[D] Starting mcp server in 6.1.0rc1 in docker [superset]
GitHub user cabsil created a discussion: Starting mcp server in 6.1.0rc1 in docker
Hello,
I am trying to start mcp server as a docker container but I don't find any doc to do that. So I tried by copying the superset container and changing the arg to mcp. But I am always getting the error when I am trying to connect to the mcp server.
`2026-03-17 22:01:42,790:WARNING:root:Failed to validate request: No application found. Either work inside a view function or push an application context. See [http://flask-sqlalchemy.pocoo.org/contexts/.](http://flask-sqlalchemy.pocoo.org/contexts/)
`
Here is my container :
`
superset_mcp:
env_file:
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
image: *superset-image
container_name: superset_mcp_app
command: ["/app/docker/docker-bootstrap.sh", "mcp"]
user: "root"
restart: unless-stopped
ports:
- 5008:5008
depends_on:
superset-init:
condition: service_completed_successfully
volumes:
- ./docker:/app/docker
- ./superset-core:/app/superset-core
- superset_home:/app/superset_home
- ./docker/flask_singleton_patch.py:/app/superset/mcp_service/flask_singleton.py
`
Any advice to solve this ?
Thanks in advance
Christophe
GitHub link: https://github.com/apache/superset/discussions/38703
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Starting mcp server in 6.1.0rc1 in docker [superset]
Posted by "cabsil (via GitHub)" <gi...@apache.org>.
GitHub user cabsil edited a discussion: Starting mcp server in 6.1.0rc1 in docker
Hello,
I am trying to start mcp server as a docker container but I don't find any doc to do that. So I tried by copying the superset container and changing the arg to mcp. But I am always getting the error when I am trying to connect to the mcp server.
`2026-03-17 22:01:42,790:WARNING:root:Failed to validate request: No application found. Either work inside a view function or push an application context. See [http://flask-sqlalchemy.pocoo.org/contexts/.](http://flask-sqlalchemy.pocoo.org/contexts/)
`
Here is my container :
`
superset_mcp:
env_file:
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
image: *superset-image
container_name: superset_mcp_app
command: ["/app/docker/docker-bootstrap.sh", "mcp"]
user: "root"
restart: unless-stopped
ports:
- 5008:5008
depends_on:
superset-init:
condition: service_completed_successfully
volumes:
- ./docker:/app/docker
- ./superset-core:/app/superset-core
- superset_home:/app/superset_home
`
Any advice to solve this ?
Thanks in advance
Christophe
GitHub link: https://github.com/apache/superset/discussions/38703
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Starting mcp server in 6.1.0rc1 in docker [superset]
Posted by "cabsil (via GitHub)" <gi...@apache.org>.
GitHub user cabsil added a comment to the discussion: Starting mcp server in 6.1.0rc1 in docker
I think Dosu is giving information about the previous implementation and not what's in 6.1.0rc1. Any other advice ?
Thanks
GitHub link: https://github.com/apache/superset/discussions/38703#discussioncomment-16189312
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Starting mcp server in 6.1.0rc1 in docker [superset]
Posted by "cabsil (via GitHub)" <gi...@apache.org>.
GitHub user cabsil edited a discussion: Starting mcp server in 6.1.0rc1 in docker
Hello,
I am trying to start mcp server as a docker container but I don't find any doc to do that. So I tried by copying the superset container and changing the arg to mcp. But I am always getting the error when I am trying to connect to the mcp server.
`2026-03-17 22:01:42,790:WARNING:root:Failed to validate request: No application found. Either work inside a view function or push an application context. See [http://flask-sqlalchemy.pocoo.org/contexts/.](http://flask-sqlalchemy.pocoo.org/contexts/)
`
Here is my container :
`
superset_mcp:
env_file:
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
image: *superset-image
container_name: superset_mcp_app
command: ["/app/docker/docker-bootstrap.sh", "mcp"]
user: "root"
restart: unless-stopped
ports:
- 5008:5008
depends_on:
superset-init:
condition: service_completed_successfully
volumes:
- ./docker:/app/docker
- ./superset-core:/app/superset-core
- superset_home:/app/superset_home
`
Any advice to solve this ?
Thanks in advance
Christophe
GitHub link: https://github.com/apache/superset/discussions/38703
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Starting mcp server in 6.1.0rc1 in docker [superset]
Posted by "cabsil (via GitHub)" <gi...@apache.org>.
GitHub user cabsil edited a discussion: Starting mcp server in 6.1.0rc1 in docker
Hello,
I am trying to start mcp server as a docker container but I don't find any doc to do that. So I tried by copying the superset container and changing the arg to mcp. But I am always getting the error when I am trying to connect to the mcp server.
`2026-03-17 22:01:42,790:WARNING:root:Failed to validate request: No application found. Either work inside a view function or push an application context. See [http://flask-sqlalchemy.pocoo.org/contexts/.](http://flask-sqlalchemy.pocoo.org/contexts/)
`
Here is my container :
`
superset_mcp:
env_file:
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
image: *superset-image
container_name: superset_mcp_app
command: ["/app/docker/docker-bootstrap.sh", "mcp"]
user: "root"
restart: unless-stopped
ports:
- 5008:5008
depends_on:
superset-init:
condition: service_completed_successfully
volumes:
- ./docker:/app/docker
- ./superset-core:/app/superset-core
- superset_home:/app/superset_home
`
Any advice to solve this ?
Thanks in advance
Christophe
GitHub link: https://github.com/apache/superset/discussions/38703
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Starting mcp server in 6.1.0rc1 in docker [superset]
Posted by "manimovassagh (via GitHub)" <gi...@apache.org>.
GitHub user manimovassagh added a comment to the discussion: Starting mcp server in 6.1.0rc1 in docker
The Dosu answer above is partially outdated. In 6.1.0rc1, the MCP server setup changed. Here's what actually works:
The error `No application found. Either work inside a view function or push an application context` means the Flask app context isn't being initialized before the MCP server tries to access SQLAlchemy/database resources.
You need to make sure the app context is pushed before the MCP service starts. Try this approach:
**Option 1: Use the CLI command with proper environment**
```yaml
superset_mcp:
env_file:
- path: docker/.env
required: true
- path: docker/.env-local
required: false
image: *superset-image
container_name: superset_mcp_app
command: ["python", "-c", "from superset.app import create_app; app = create_app(); app.app_context().push(); from superset.mcp.server import run_mcp; run_mcp(port=5008)"]
user: "root"
restart: unless-stopped
ports:
- 5008:5008
depends_on:
superset-init:
condition: service_completed_successfully
volumes:
- ./docker:/app/docker
- ./superset-core:/app/superset-core
- superset_home:/app/superset_home
```
**Option 2: Create a small wrapper script**
Create `docker/docker-mcp.sh`:
```bash
#!/bin/bash
set -e
# Source the common environment
. /app/docker/docker-bootstrap.sh app
# Run MCP server with Flask app context
python -c "
from superset.app import create_app
app = create_app()
with app.app_context():
from superset.mcp.server import run_mcp
run_mcp(host='0.0.0.0', port=5008)
"
```
Then set `command: ["/bin/bash", "/app/docker/docker-mcp.sh"]`
The key insight is that unlike the main Superset app (where gunicorn/Flask handles the context lifecycle), the MCP server runs as a standalone process and needs explicit context setup. Make sure `ENABLE_MCP_SERVICE = True` is set in your `superset_config.py` as well.
Also double-check that your `.env` file includes all the database connection variables (`SUPERSET_SECRET_KEY`, `SQLALCHEMY_DATABASE_URI`, etc.) -- the MCP container needs the same config as the main app.
GitHub link: https://github.com/apache/superset/discussions/38703#discussioncomment-16233635
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Starting mcp server in 6.1.0rc1 in docker [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Starting mcp server in 6.1.0rc1 in docker
<!-- Greeting -->
Hi @cabsil! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
<!-- Answer -->
Hi Christophe,
The issue is that the [docker-bootstrap.sh script doesn't support an "mcp" argument](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docker/docker-bootstrap.sh) - it only handles `worker`, `beat`, `app`, and `app-gunicorn`. The MCP service also requires a separate ASGI server (uvicorn) and can't run within Flask's application context, which is why you're seeing that error.
To run the MCP server in Docker:
1. **Enable MCP** in your Superset configuration:
```python
ENABLE_MCP_SERVICE = True
```
2. **Modify your container command** to run MCP directly instead of using docker-bootstrap.sh:
```yaml
command: ["superset", "mcp", "run", "--port", "5008"]
```
Or create a custom entrypoint script that runs uvicorn with the MCP service.
The MCP service is designed to run as a [separate ASGI process outside the Flask application](https://github.com/apache/superset/issues/33870), not as part of the standard Superset worker/app infrastructure.
Let me know if you need help creating a custom bootstrap script for the MCP container!
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=426ff784-b75d-459b-8d1d-5925c7b3f639) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/38703#discussioncomment-16184489
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Starting mcp server in 6.1.0rc1 in docker [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Starting mcp server in 6.1.0rc1 in docker
<!-- Greeting -->
Hi @cabsil! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
<!-- Answer -->
Hi Christophe,
The issue is that the [docker-bootstrap.sh script doesn't support an "mcp" argument](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docker/docker-bootstrap.sh) - it only handles `worker`, `beat`, `app`, and `app-gunicorn`. The MCP service also requires a separate ASGI server (uvicorn) and can't run within Flask's application context, which is why you're seeing that error.
To run the MCP server in Docker:
1. **Enable MCP** in your Superset configuration:
```python
ENABLE_MCP_SERVICE = True
```
2. **Modify your container command** to run MCP directly instead of using docker-bootstrap.sh:
```yaml
command: ["superset", "mcp", "run", "--port", "5008"]
```
Or create a custom entrypoint script that runs uvicorn with the MCP service.
The MCP service is designed to run as a [separate ASGI process outside the Flask application](https://github.com/apache/superset/issues/33870), not as part of the standard Superset worker/app infrastructure.
Let me know if you need help creating a custom bootstrap script for the MCP container!
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/426ff784-b75d-459b-8d1d-5925c7b3f639?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/426ff784-b75d-459b-8d1d-5925c7b3f639?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/426ff784-b75d-459b-8d1d-5925c7b3f639?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/426ff784-b75d-459b-8d1d-5925c7b3f639?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/426ff784-b75d-45
9b-8d1d-5925c7b3f639?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/426ff784-b75d-459b-8d1d-5925c7b3f639?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report) | [Other](https://app.dosu.dev/response-feedback/426ff784-b75d-459b-8d1d-5925c7b3f639?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge) [](https://cursor.com/link/prompt?text=Hi%20Christophe%2C%0A%0AThe%20issue%20is%20that%20the%20%5Bdocker-bootstrap.sh%20script%20doesn%27t%20support%20an%20%22mcp%22%20argument%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/docker/docker-bootstrap.sh%29%20-%20it%20only%20handles%20%60worker%60%2C%20%60beat%60%2C%20%60app%60%2C%20and%20%60app-gunicorn%60.%20The%20MCP%20service%20also%20requires%20a%20separate%20ASGI%20server%20%28uvicorn%29%20and%20can%27t%20run%20within%20Flask%27s%20application%20context%2C%20which%20is%20why%20you%27re%20seeing%20that%20error.%0A%0ATo%20run%20the%20MCP%20server%20in%20Docker%3A%0A%0A1.%20%2A%2AEnable%20MCP%2A%2A%20in%20your%20Superset%20co
nfiguration%3A%0A%20%20%20%60%60%60python%0A%20%20%20ENABLE_MCP_SERVICE%20%3D%20True%0A%20%20%20%60%60%60%0A%0A2.%20%2A%2AModify%20your%20container%20command%2A%2A%20to%20run%20MCP%20directly%20instead%20of%20using%20docker-bootstrap.sh%3A%0A%20%20%20%60%60%60yaml%0A%20%20%20command%3A%20%5B%22superset%22%2C%20%22mcp%22%2C%20%22run%22%2C%20%22--port%22%2C%20%225008%22%5D%0A%20%20%20%60%60%60%0A%0A%20%20%20Or%20create%20a%20custom%20entrypoint%20script%20that%20runs%20uvicorn%20with%20the%20MCP%20service.%0A%0AThe%20MCP%20service%20is%20designed%20to%20run%20as%20a%20%5Bseparate%20ASGI%20process%20outside%20the%20Flask%20application%5D%28https%3A//github.com/apache/superset/issues/33870%29%2C%20not%20as%20part%20of%20the%20standard%20Superset%20worker/app%20infrastructure.%0A%0ALet%20me%20know%20if%20you%20need%20help%20creating%20a%20custom%20bootstrap%20script%20for%20the%20MCP%20container%21) [](https://go.dosu.dev/discord-bot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=join-discord) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/38703)
GitHub link: https://github.com/apache/superset/discussions/38703#discussioncomment-16184489
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Starting mcp server in 6.1.0rc1 in docker [superset]
Posted by "syafiqmuda (via GitHub)" <gi...@apache.org>.
GitHub user syafiqmuda added a comment to the discussion: Starting mcp server in 6.1.0rc1 in docker
based on the option 1, I just copy and paste into the `docker-compose-image-tag.yml` when I try start the docker, it keep restarting for the "superset_mcp_app"
GitHub link: https://github.com/apache/superset/discussions/38703#discussioncomment-16461651
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org