A personal setup guide for supercharging Open-WebUI with Docker Sandboxes and Model Context Protocol (MCP) servers.
Note
This is a configuration guide, not a software product. It describes how I set up my own local AI Architect environment. Your results may vary depending on your Docker setup and Open-WebUI version.
I was tired of Open-WebUI's default Python sandbox (Pyodide) failing to run advanced libraries or web servers like Streamlit. I needed an AI assistant that could not only write code but execute it natively, spin up servers, and query local databases autonomously.
By replacing the default browser-based sandbox with a Dockerized Jupyter God Mode Sandbox and attaching MCP Servers via npx and uvx, I unlocked the true potential of Open-WebUI. This repository is my blueprint for how you can replicate the exact same setup.
Open WebUI: A ChatGPT-style app that runs 100% locally on your machine. You download it like any Mac app, and it gives you a feature-rich interface to chat with AI.
God Mode Sandbox: A background Docker container running Jupyter and pre-loaded with heavy-duty data science libraries (pandas, scikit-learn, matplotlib, streamlit).
MCP Servers: Model Context Protocol plugins that give the AI the ability to read your local filesystem, query SQLite databases, search the web (Brave), and interact with GitHub APIs.
flowchart LR
A(["👤 You"]) --> B["🖥️ Open-WebUI\nport 8080"]
subgraph "Execution Engines"
B --> C["📦 Pyodide Sandbox\n(WebAssembly, Default)"]
B --> D["🐳 God Mode Docker Sandbox\nport 8888 (Jupyter)"]
end
subgraph "MCP Superpowers"
B --> E["📁 Filesystem (npx)"]
B --> F["🗄️ SQLite/Postgres (uvx)"]
B --> G["🔍 Brave Search (npx)"]
B --> H["🐙 GitHub (npx)"]
end
D -.-> I["🌐 Streamlit Preview\nport 8501"]
Note: The Docker Sandbox runs locally on your machine and shares a volume mount at
~/openwebui_sandbox/workspacefor easy file access.
| Requirement | Tested Version | Notes |
|---|---|---|
| macOS | 12+ | Windows/Linux: paths may need to be adjusted |
| Docker | 20+ | Required for the Jupyter Sandbox |
| Node.js | 18+ | npx is required for JS-based MCPs |
| Python (uv) | any | uvx is recommended for Python-based MCPs |
| Open-WebUI | latest | Installed and running locally |
Run these steps in order to deploy the Docker sandbox.
# Step 1 – Clone this repo and navigate to the docker sandbox
git clone https://github.com/SudhirRathore/openwebui-advanced-setup.git
cd openwebui-advanced-setup/docker-sandbox
# Step 2 – Build and Run the Container (runs in background automatically)
chmod +x build_and_run.sh
./build_and_run.shExpected output from Step 2:
Building God Mode Sandbox image...
Running new Sandbox...
Sandbox is running on port 8888 (Jupyter) and port 8501 (Streamlit).
- Go to Settings > Admin Settings > Tools > Code Execution.
- Set the Engine to
Jupyter. - Set Jupyter URL to:
http://localhost:8888 - Set Jupyter Auth Token to:
godmode_secret(leave password blank). - Save settings.
| # | What | Before | After | Note |
|---|---|---|---|---|
| 1 | Execution | Pyodide (Browser restricted) | Jupyter Docker Container | AI can now run network requests and spawn servers |
| 2 | Python Libraries | Basic only (numpy, pandas) |
streamlit, scikit-learn, fastapi, plotly |
Data science unlocked |
| 3 | File I/O | Virtual memory | Mapped host volume ~/openwebui_sandbox |
Charts/CSVs appear instantly on your Mac |
| 4 | Web Search | None | Brave Search via MCP | Real-time stateless search capability |
| 5 | Database Access | None | SQLite/Postgres via uvx MCP |
Direct AI database querying |
Navigate to Settings > Admin Settings > External > Tool Servers and add these commands:
- Filesystem (Node):
npx -y @modelcontextprotocol/server-filesystem /Users/yourusername/Desktop - GitHub (Node):
npx -y @modelcontextprotocol/server-github(RequiresGITHUB_PERSONAL_ACCESS_TOKEN) - Brave (Node):
npx -y @modelcontextprotocol/server-brave-search(RequiresBRAVE_API_KEY) - SQLite (Python):
uvx mcp-server-sqlite --db-path /path/to/database.db - Postgres (Python):
uvx mcp-server-postgres postgresql://user:pass@localhost/dbname
- Docker Required. The God Mode sandbox requires Docker to be running on your machine.
- Port Conflicts. Ensure ports
8888and8501are not being used by other applications before running the script. - macOS-focused. The
build_and_run.shscript assumes macOS volume mounts ($HOME/openwebui_sandbox). Windows users will need to adapt the path format.
- Add Windows and Linux path support to the Docker volume mount
- Add a
docker-compose.ymlalternative for easier deployment - Document how to add custom Python packages dynamically without rebuilding
- Add screenshot of the Streamlit preview working inside Open-WebUI
- Open WebUI — The frontend app
- Model Context Protocol — The MCP server specifications
MIT — Copyright (c) 2026 Sudhir Rathore