Skip to content

tobecrazy/webui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open WebUI with MCP Servers

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.

Prerequisites

  • 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

Installation

  1. Clone or download this repository to your local machine
  2. Configure your MCP servers (optional):
    • Copy mcpo_config_example.json to mcpo_config.json if you don't have one already
    • Update API keys and other settings as needed (see Configuration section)

Usage

Starting the Services

Run the following command to start all services:

./runServer.sh

This 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-recreate

Accessing the Web UI

Once the services are running, you can access the Open WebUI at:

http://localhost:3721

Stopping the Services

To stop all services:

docker compose down

Components

Open WebUI

  • Container name: open-webui
  • Image: ghcr.io/open-webui/open-webui:main
  • Port: 3721 (mapped from container port 8080)
  • Persistent volume: open-webui for storing application data

Open WebUI is a web-based user interface that provides access to various AI capabilities through MCP servers.

MCPO (Model Context Protocol Orchestrator)

  • Container name: mcpo
  • Image: ghcr.io/open-webui/mcpo:main
  • Port: 3722 (mapped from container port 8000)
  • Configuration: Uses mcpo_config.json mounted from the host

MCPO manages and orchestrates multiple MCP servers that provide various functionalities:

  1. Memory Server: Provides memory capabilities for storing and retrieving information
  2. Time Server: Provides time-related functions with Shanghai timezone support
  3. QuickChart Server: Generates charts and visualizations
  4. Excel Server: Processes Excel files and data
  5. AMap Server: Provides mapping and location services (requires API key)
  6. Fetch Server: Handles HTTP requests and responses

Configuration

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.

Example Configuration

An example configuration file (mcpo_config_example.json) is provided as a template. To use it:

cp mcpo_config_example.json mcpo_config.json

Then edit mcpo_config.json to add your API keys and customize settings.

API Keys

Some MCP servers require API keys to function properly:

  • AMap Server: Requires an AMap API key. Replace YOUR_API_KEY_HERE with your actual API key.

To obtain an AMap API key, visit the AMap Developer Platform.

Security Notes

  • Never commit your mcpo_config.json file 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

Troubleshooting

Common Issues

  1. Services fail to start:

    • Check Docker logs: docker logs open-webui or docker logs mcpo
    • Ensure ports 3721 and 3722 are not in use by other applications
  2. Cannot connect to Web UI:

    • Verify containers are running: docker ps
    • Check if the service is accessible on the correct port
  3. MCP servers not working:

    • Verify API keys are correctly set in mcpo_config.json
    • Check MCPO logs for connection errors: docker logs mcpo

License

This project uses components that may have their own licenses. Please refer to the original repositories for license information:

About

webui with MCP Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages