This guide will help you set up a local environment to run Open WebUI with support for Ollama and MCPO (Model Context Protocol Orchestrator) using Docker.
You need to have Docker Desktop installed on your Windows system.
- Download Docker Desktop: https://www.docker.com/products/docker-desktop
Make sure Docker Desktop is running before proceeding with the installation.
Open WebUI with Ollama support is installed using a single container image.
Open your terminal (PowerShell) and run the following command:
docker run -d -p 3000:8080 --gpus=all -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama-d: Runs the container in "detached" mode (in the background).-p 3000:8080: Maps port 3000 on your local machine to port 8080 in the container (where Open WebUI runs by default).--gpus=all: Allows the container to access all available GPUs (useful for accelerating Ollama). If you don't have a GPU or don't want to use it, you can omit this option.-v ollama:/root/.ollama: Creates a volume namedollamato persist Ollama's models and data.-v open-webui:/app/backend/data: Creates a volume namedopen-webuito persist the application data for Open WebUI.--name open-webui: Assigns the nameopen-webuito the container for easier management.--restart always: Configures the container to automatically restart if it stops.ghcr.io/open-webui/open-webui:ollama: Specifies the Docker image to use.
Open WebUI is a feature-rich, user-friendly self-hosted AI platform designed to operate entirely offline. It supports various LLM runners like Ollama and OpenAI-compatible APIs, with built-in inference engine for RAG, making it a powerful AI deployment solution.
Learn more at the Open WebUI GitHub repository.
MCPO runs in another Docker container.
Run the following command in your terminal:
docker run -d -p 8000:8000 -v mcpo:/app/config --name mcpo --restart always ghcr.io/open-webui/mcpo:main mcpo --config /app/config/config.json-d: Runs the container in "detached" mode (in the background).-p 8000:8000: Maps port 8000 on your local machine to port 8000 in the container (where MCPO will run).-v mcpo:/app/config: Creates a volume namedmcpoand mounts it at/app/configinside the container. This volume will be used to store the MCPO configuration file.--name mcpo: Assigns the namemcpoto the container for easier management.--restart always: Configures the container to automatically restart if it stops.ghcr.io/open-webui/mcpo:main: Specifies the Docker image for MCPO.mcpo --config /app/config/config.json: The command executed inside the container to start MCPO, indicating the path to the configuration file within the mounted volume.
MCPO is a simple, secure MCP-to-OpenAPI proxy server that makes MCP tools usable, secure, and interoperable. It transforms raw MCP servers into OpenAPI-compatible HTTP servers, adding security, stability, and scalability using trusted web standards.
Learn more at the MCPO GitHub repository.
MCPO requires a configuration file (config.json) to define the MCP servers it will connect to.
Here is an example config.json file you can use as a base:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
},
"time": {
"command": "uvx",
"args": ["mcp-server-time", "--local-timezone=America/New_York"]
},
"mcp_sse": {
"type": "sse", // Explicitly define type
"url": "http://127.0.0.1:8001/sse",
"headers": {
"Authorization": "Bearer token",
"X-Custom-Header": "value"
}
},
"mcp_streamable_http": {
"type": "streamable_http",
"url": "http://127.0.0.1:8002/mcp"
} // Streamable HTTP MCP Server
}
}Create this file on your Windows system, for example, at C:\Users\YourUser\Documents\config.json.
Once the MCPO container is running (you can verify it with docker ps), you need to copy your local config.json file to the mcpo volume inside the container:
-
First, get the ID of the MCPO container. You can use
docker psand look for the container namedmcpo. -
Then, run the following command, replacing
"C:\path\to\config.json"with the actual path to yourconfig.jsonfile on Windows and<container_id>with the ID of the MCPO container:
docker cp "C:\\path\\to\\config.json" <container_id>:/app/config/config.jsonThis command copies the config.json file from your local system to the path /app/config/config.json inside the MCPO container, which is in the mcpo volume.
Restart Docker Desktop 🔄
Once both containers are running, you can access Open WebUI by opening your web browser and navigating to:
MCPO will be available at:
For this example, we will use the MCP server from Microsoft Docs available at: https://github.com/microsoftdocs/mcp
Update your config.json file with the following configuration:
{
"mcpServers": {
"microsoft.docs.mcp": {
"type": "streamable_http",
"url": "https://learn.microsoft.com/api/mcp"
}
}
}Once the file is updated, copy the new config.json to the MCPO container and restart the container to apply the changes.
- Open your web browser and navigate to http://localhost:3000
- Create a user account if this is your first time accessing Open WebUI
- Log in with your account
- Navigate to the Tools section in Open WebUI
- Add a new tool with the following URL:
http://host.docker.internal:8000 - You must add as many tools as MCP servers you have defined in your
config.jsonfile - For this example, the specific URL would be:
http://host.docker.internal:8000/microsoft.docs.mcp
- Go to the Models section in Open WebUI
- Select the model you want to configure
- Click on Advanced Params
- Change the Function Calling setting from "Default" to "Native"
- On the same model configuration page, scroll down to the Tools section
- Enable the MCP tools you added in the previous step
- Save the changes
Once these steps are completed, your model will be able to use MCP tools to access additional functionalities like searching Microsoft documentation:


