A Docker-based environment that integrates OpenWebUI with Jupyter Notebook and MCP (Model Context Protocol) server for enhanced AI-powered code execution and visualization capabilities. It allows someone without programming experience to generate animations similar to those of 3Blue1Brown.
This project provides a complete containerized solution that combines:
- OpenWebUI: Web interface for AI interactions
- Jupyter Notebook: Code execution environment with Manim support for mathematical visualizations
- MCP Server: Model Context Protocol server for git repository file operations
- 🐳 Docker Compose Setup: Easy deployment with single command
- 📊 Jupyter Integration: Code execution with mathematical visualization support (Manim)
- 🔧 MCP Server: Git repository file operations via Model Context Protocol
- 🎯 Multiple Model Support: Compatible with Google Gemini, OpenAI, and local Ollama models
- 📦 Standalone Executables: Create portable executables for easy distribution
- Docker Desktop installed and running
- Git installed (for MCP functionality)
pyinstaller --onefile --add-data "./*:." docker-wrap.py
-
Using Docker Compose (Recommended):
docker compose down docker compose build docker compose up -d
-
Using the Standalone Executable:
- Run the
docker-wrap.exe
(from dist folder) while Docker Desktop is running - This will automatically execute the Docker Compose commands
- Run the
After deployment, access the services at:
- OpenWebUI: http://localhost:3000
- Jupyter Notebook: http://localhost:8888 (Token:
123456
) - MCP Server: http://localhost:8000
-
Enable MCP External Tool:
- URL:
http://host.docker.internal:8000/git-files-server
- Set 'Function Calling' to 'Native' in Advanced Parameters
- URL:
-
Configure Code Execution:
- Jupyter URL:
http://host.docker.internal:8888
- Token:
123456
- Documentation
- Jupyter URL:
Configure your AI models with these URLs:
Provider | URL |
---|---|
Google Gemini | https://generativelanguage.googleapis.com/v1beta/openai |
OpenAI | https://api.openai.com/v1 |
Ollama (Local - needs to be installed) | http://host.docker.internal:11434 |
- Image:
ghcr.io/open-webui/open-webui:latest
- Port: 3000 → 8080
- Purpose: Main web interface for AI interactions
- Base:
jupyter/minimal-notebook:latest
- Port: 8888
- Features:
- Manim support for mathematical visualizations
- Pre-installed packages: pandas, manim, manimlib, manimgl
- System dependencies for Cairo and Pango rendering
- Base:
python:3.11-slim
- Port: 8000
- Purpose: Git repository file operations via Model Context Protocol
Use this prompt with Gemini 2.5 Pro (tested):
Using the available MCP tools, create a visualization of a red ball falling on a table. When it touches the table it turns green and the forces that act upon it are shown (weight and vertical force N of the table). Do not use any latex or additional packages/libraries. The code should be able to be executed as is. Return it in a python cell. Use explicit imports for every Manim class. The manim command needed to create the visualization should included in the python script (as if it was executed from the terminal). The python file needs to save itself first prior to calling the terminal resembling command. When executed the visualization should be saved directly. Also print the location when the file is saved after the manim command is executed. Use the code from https://github.com/3b1b/manim
Execute the generated code ('run code') and if errors, copy-paste these errors back to the model. At the end, when the final animation is created, it can be found inside the jupyter_files
folder
openwebui-jupyter-mcp-stack/
├── docker-compose.yml # Main orchestration file
├── Dockerfile.jupyter # Jupyter container configuration
├── Dockerfile.mcp # MCP server container configuration
├── run_server.py # MCP server implementation
├── docker-wrap.py # Docker automation script
├── docker-wrap.spec # PyInstaller specification file
├── dist/ # Distribution folder
│ └── docker-wrap.exe # Standalone executable for Windows
├── LICENSE # Project license file
└── README.md # This file
The setup includes persistent volumes to maintain data across container restarts:
- OpenWebUI data: Stored in
open-webui
volume - Jupyter files: Mapped to
./jupyter_files
directory
Important: When deleting containers, preserve the volumes in Docker Desktop to keep your settings and data.
- Port Conflicts: Ensure ports 3000, 8888, and 8000 are available
- Docker Issues: Make sure Docker Desktop is running before executing commands
- MCP Connection: Verify the MCP server URL in OpenWebUI settings
- Jupyter Access: Use token
123456
if prompted for authentication
Feel free to submit issues and enhancement requests. When contributing:
- Test changes with Docker Compose
- Update documentation as needed
- Ensure all services remain functional
This project configuration is provided as-is for educational and development purposes.