This project provides a Docker Compose setup for running Open WebUI with Model Context Protocol (MCP) servers. It simplifies the deployment process by using pre-built Docker images and providing a customizable configuration.
- Docker (version 20.10.0 or higher recommended)
- Docker Compose (version 2.0.0 or higher recommended)
- At least 2GB of free RAM for running the containers
- Clone or download this repository to your local machine
- Configure your MCP servers (optional):
- Copy
mcpo_config_example.jsontomcpo_config.jsonif you don't have one already - Update API keys and other settings as needed (see Configuration section)
- Copy
Run the following command to start all services:
./runServer.shThis script uses Docker Compose to start the services in detached mode and force recreation of containers.
Alternatively, you can run the Docker Compose command directly:
docker compose up -d --force-recreateOnce the services are running, you can access the Open WebUI at:
http://localhost:3721
To stop all services:
docker compose down- Container name:
open-webui - Image:
ghcr.io/open-webui/open-webui:main - Port: 3721 (mapped from container port 8080)
- Persistent volume:
open-webuifor storing application data
Open WebUI is a web-based user interface that provides access to various AI capabilities through MCP servers.
- Container name:
mcpo - Image:
ghcr.io/open-webui/mcpo:main - Port: 3722 (mapped from container port 8000)
- Configuration: Uses
mcpo_config.jsonmounted from the host
MCPO manages and orchestrates multiple MCP servers that provide various functionalities:
- Memory Server: Provides memory capabilities for storing and retrieving information
- Time Server: Provides time-related functions with Shanghai timezone support
- QuickChart Server: Generates charts and visualizations
- Excel Server: Processes Excel files and data
- AMap Server: Provides mapping and location services (requires API key)
- Fetch Server: Handles HTTP requests and responses
The mcpo_config.json file defines the MCP servers that will be available to the Open WebUI. Each server has its own configuration including command, arguments, and environment variables.
An example configuration file (mcpo_config_example.json) is provided as a template. To use it:
cp mcpo_config_example.json mcpo_config.jsonThen edit mcpo_config.json to add your API keys and customize settings.
Some MCP servers require API keys to function properly:
- AMap Server: Requires an AMap API key. Replace
YOUR_API_KEY_HEREwith your actual API key.
To obtain an AMap API key, visit the AMap Developer Platform.
- Never commit your
mcpo_config.jsonfile with actual API keys to public repositories - Consider using environment variables or a secrets manager for production deployments
- The example configuration file (
mcpo_config_example.json) should never contain actual API keys
-
Services fail to start:
- Check Docker logs:
docker logs open-webuiordocker logs mcpo - Ensure ports 3721 and 3722 are not in use by other applications
- Check Docker logs:
-
Cannot connect to Web UI:
- Verify containers are running:
docker ps - Check if the service is accessible on the correct port
- Verify containers are running:
-
MCP servers not working:
- Verify API keys are correctly set in
mcpo_config.json - Check MCPO logs for connection errors:
docker logs mcpo
- Verify API keys are correctly set in
This project uses components that may have their own licenses. Please refer to the original repositories for license information: