Starting mcp server in 6.1.0rc1 in docker #38703
Replies: 3 comments 1 reply
-
|
Hi @cabsil! I'm Dosu and I’m helping the superset team. Hi Christophe, The issue is that the docker-bootstrap.sh script doesn't support an "mcp" argument - it only handles To run the MCP server in Docker:
The MCP service is designed to run as a separate ASGI process outside the Flask application, 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! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
I think Dosu is giving information about the previous implementation and not what's in 6.1.0rc1. Any other advice ? Thanks |
Beta Was this translation helpful? Give feedback.
-
|
The Dosu answer above is partially outdated. In 6.1.0rc1, the MCP server setup changed. Here's what actually works: The error 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 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_homeOption 2: Create a small wrapper script Create #!/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 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 Also double-check that your |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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_homeAny advice to solve this ?
Thanks in advance
Christophe
Beta Was this translation helpful? Give feedback.
All reactions