OpenWebUI MCP Server

A bridge between LLMs and OpenWebUI workspaces for managing projects.

README.md

OpenWebUI MCP Server

A Model Context Protocol (MCP) server for managing projects, notes, and knowledge bases in OpenWebUI.

Overview

open-webui-mcp provides a bridge between LLMs and your OpenWebUI workspace. It allows models to:

  • List and manage projects.
  • Create and update project-specific notes.
  • Associate knowledge bases with projects.
  • Propose and apply updates to project configurations based on chat history.
  • Upload files directly to knowledge bases.

Prerequisites

Quick Start

  1. Clone and install:

    git clone https://github.com/your-repo/open-webui-mcp.git
    cd open-webui-mcp
    bun install
    
  2. Configure environment variables:

    export OPENWEBUI_BASE_URL="http://localhost:3000"
    export OPENWEBUI_API_KEY="your-api-key"
    export OPENROUTER_API_KEY="your-openrouter-key"
    
  3. Build and run:

    bun run build
    bun run start
    

Project Mapping

The server uses a projects.json file to map project IDs to OpenWebUI folders and resources. This allows for a structured way to manage project-specific context.

Example `projects.json`

{
  "version": "1.0",
  "projects": [
    {
      "id": "project-1",
      "name": "My Project",
      "folder_id": "folder-uuid",
      "note_ids": [],
      "knowledge_base_ids": []
    }
  ]
}

Safety Model (Propose/Evaluate/Apply)

To ensure safe updates to project configurations, the server implements a three-step workflow:

  1. Propose: The model analyzes a conversation and generates a ProposedChangeSet.
  2. Evaluate: An LLM (via OpenRouter) evaluates the proposal for safety and relevance, assigning a score (0-1).
  3. Apply: If the proposal is deemed safe (score > threshold), it can be applied to the project.

Documentation

Troubleshooting

  • Connection Errors: Ensure OPENWEBUI_BASE_URL is accessible and the API key is correct.
  • Permission Denied: Check if your OpenWebUI API key has sufficient permissions to manage folders, notes, and knowledge bases.
  • Evaluation Failures: Ensure your OPENROUTER_API_KEY is valid and has credits.
  • Missing Projects: Verify that projects.json exists in your DATA_DIR and is valid JSON.

Tools 4

list_projectsLists all projects configured in the projects.json file.
manage_notesCreate or update project-specific notes.
upload_to_knowledge_baseUpload files directly to a project's associated knowledge base.
propose_config_updatePropose updates to project configurations for evaluation.

Environment Variables

OPENWEBUI_BASE_URLrequiredThe base URL of your OpenWebUI instance
OPENWEBUI_API_KEYrequiredAPI key for authenticating with OpenWebUI
OPENROUTER_API_KEYrequiredAPI key for the evaluation LLM via OpenRouter

Try it

List all my current projects in OpenWebUI.
Create a new note for the 'Project Alpha' project summarizing our recent meeting.
Upload the file 'research_data.pdf' to the knowledge base for 'Project Beta'.
Propose a configuration update to add a new knowledge base folder to 'Project Gamma'.

Frequently Asked Questions

What are the key features of OpenWebUI MCP Server?

List and manage OpenWebUI projects. Create and update project-specific notes. Associate knowledge bases with projects. Safe propose-evaluate-apply workflow for configuration updates. Direct file uploads to knowledge bases.

What can I use OpenWebUI MCP Server for?

Synchronizing project documentation between LLM chat sessions and OpenWebUI. Automating the organization of research files into project-specific knowledge bases. Managing complex project configurations safely through LLM-assisted proposals. Maintaining structured project notes directly from within an AI workspace.

How do I install OpenWebUI MCP Server?

Install OpenWebUI MCP Server by running: git clone https://github.com/adaofeliz/open-webui-mcp.git && cd open-webui-mcp && bun install

What MCP clients work with OpenWebUI MCP Server?

OpenWebUI MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep OpenWebUI MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare